X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=assistants%2Fsell.inc.php;h=268f88f54db304bfd312fa688b60755d9524301e;hb=1d2cac6acaa325d8f03c74a1067feea26a2669c5;hp=73e096e3fae2a3475384aa8255a2999dc87aace3;hpb=eca3fc1db94c023c08354046b96cca0401fc49fc;p=mirrors%2FSokoMan.git diff --git a/assistants/sell.inc.php b/assistants/sell.inc.php index 73e096e..268f88f 100644 --- a/assistants/sell.inc.php +++ b/assistants/sell.inc.php @@ -50,6 +50,7 @@ switch($SUBPATH[0]) { $quantity_stored = $this->db->map_unique('item_serial', $item_serial, 'item_quantity', 'item', false); if(!is_numeric($quantity_stored)) $quantity_stored = 0; $item_quantity = $quantity_stored - $quantity_removed; + if($item_quantity < 0) $this->post_redirect_get("$URL_INTERNAL/1","You don't have enough stored items!"); echo("Stock: ".$quantity_stored."
Disposing/Selling: ".$quantity_removed."
Keeping: ".$item_quantity);