commit melhorias compras3
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 10:56:58 +02:00
parent 4fac443dda
commit efd97e265b
130 changed files with 8917 additions and 363 deletions
+2 -1
View File
@@ -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']] : [])];
}
}
}