@@ -248,7 +248,8 @@ class AutomaticPurchases
|
||||
foreach ($request->snapshot['lines'] as $index => $line) {
|
||||
if ($line['item']['id'] === $item && $p['remaining'][$index] > 0) {
|
||||
$unreserved += max(0, $p['remaining'][$index] - $p['reserved'][$index]);
|
||||
$origins[] = ['warehouse_request_id' => $request->id, 'version' => $p['version'], 'line_index' => $index, 'destination' => $line['destination'], 'equipment' => $line['equipment'], 'remaining_milli' => $p['remaining'][$index], 'reserved_milli' => $p['reserved'][$index]];
|
||||
$origins[] = ['warehouse_request_id' => $request->id, 'version' => $p['version'], 'line_index' => $index, 'destination' => $line['destination'], 'equipment' => $line['equipment'], 'remaining_milli' => $p['remaining'][$index], 'reserved_milli' => $p['reserved'][$index],
|
||||
...(isset($line['production']) ? ['production' => $line['production']] : [])];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user