|
@@ -115,7 +115,7 @@ class BatchService
|
|
|
public function checkBatchOrderInfo($batches)
|
|
public function checkBatchOrderInfo($batches)
|
|
|
{
|
|
{
|
|
|
if (!is_array($batches))$batches = $batches->toArray();
|
|
if (!is_array($batches))$batches = $batches->toArray();
|
|
|
- $ids = array_column($batches->toArray(),"id");
|
|
|
|
|
|
|
+ $ids = array_column($batches,"id");
|
|
|
$batches = Batch::query()->whereIn("id",$ids)->with("orders.orderCommodities")->get();
|
|
$batches = Batch::query()->whereIn("id",$ids)->with("orders.orderCommodities")->get();
|
|
|
foreach ($batches as $batch){
|
|
foreach ($batches as $batch){
|
|
|
if (!$batch->orders)continue;
|
|
if (!$batch->orders)continue;
|