Ilości ujemne w zamówieniu (Ilość)
This commit is contained in:
@@ -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']),
|
||||
|
||||
Reference in New Issue
Block a user