Leere Felder speichern?
Die folgenden Felder werden leer gespeichert:
diff --git a/modules/erp/lager/api/lot.php b/modules/erp/lager/api/lot.php index 710d21b..b91446f 100644 --- a/modules/erp/lager/api/lot.php +++ b/modules/erp/lager/api/lot.php @@ -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); diff --git a/modules/shared/auth/ui/home.php b/modules/shared/auth/ui/home.php index 352593f..03fff66 100644 --- a/modules/shared/auth/ui/home.php +++ b/modules/shared/auth/ui/home.php @@ -357,13 +357,13 @@ function auth_render_lager_open_lots(array $lagerProducts, string $manufacturerO . 'Einkaufsdatum: ' . auth_format_lager_date($lot['purchase_date'] ?? null) . '
' . 'Leere Felder speichern?
Die folgenden Felder werden leer gespeichert:
Möchtest du diese offene Charge wirklich löschen?
Du kannst das nicht rückgängig machen. Bestätige durch Eingabe von DELETE.
Leere Felder speichern?
Die folgenden Felder werden leer gespeichert: