Restore incomplete lot save confirmation

This commit is contained in:
gitea_admin committed 2026-09-08 14:47:37 +02:00
1 parent 51a5e630a8
commit 7daf8b7096
2 files changed
+18 -25

No files matched your search

+1 -10
View File
@@ -90,15 +90,6 @@ try {
$purchaseDate = trim((string) ($data['purchaseDate'] ?? ''));
$receiptQty = isset($data['receiptQty']) && $data['receiptQty'] !== '' ? (float) $data['receiptQty'] : 0.0;
$targetQty = isset($data['targetQty']) && $data['targetQty'] !== '' ? (float) $data['targetQty'] : null;
if ($lotNumber === '' || $manufacturerPartyId === null || $manufacturerLotNumber === '' || $mfgDate === '' || $expiryDate === '' || $purchaseDate === '') {
throw new InvalidArgumentException('Alle Chargenfelder sind Pflichtfelder');
}
if ($lotId <= 0 && $receiptQty <= 0) {
throw new InvalidArgumentException('Eingangsmenge muss groesser als 0 sein');
}
if ($lotId > 0 && $targetQty !== null && $targetQty <= 0) {
throw new InvalidArgumentException('Menge muss groesser als 0 sein');
}
if ($lotId > 0) {
$lotStmt = $pdo->prepare(
"SELECT id
@@ -128,7 +119,7 @@ try {
0.0,
$lotNumber,
$targetQty,
$lotId > 0 && $lotNumber === ''
$lotNumber === ''
);
sync_open_lot_activation_selection($pdo, $productId);
refresh_lager_stock_lot_forecast_for_product($pdo, $productId);