X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=assistants%2Fsell.inc.php;h=268f88f54db304bfd312fa688b60755d9524301e;hb=7c1f53f75b0c7fc77877f924ded2b37ac4c3ffad;hp=73e096e3fae2a3475384aa8255a2999dc87aace3;hpb=f2a3e8b01989810cd7400ed061fc529fe4b26eee;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);