Ilości ujemne w zamówieniu (Ilość)

This commit is contained in:
2026-03-30 09:43:59 +02:00
parent 9023b9a5ed
commit 7da3865110
5 changed files with 49 additions and 32 deletions
+3
View File
@@ -22,6 +22,9 @@ try {
$price = (float)str_replace(',', '.', $data['price_per_unit'] ?? 0);
$qty = (int)($data['quantity'] ?? 1);
if ($qty < 1) {
die(json_encode(['success' => false, 'error' => 'Ilość musi być większa od zera.']));
}
$stmt->execute([
trim($data['product_name']),