Obrana proti debilite
authorThomas Mudrunka <tomas@mudrunka.cz>
Sat, 4 Aug 2012 16:18:46 +0000 (18:18 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Sat, 4 Aug 2012 16:18:46 +0000 (18:18 +0200)
assistants/sell.inc.php

index 73e096e3fae2a3475384aa8255a2999dc87aace3..268f88f54db304bfd312fa688b60755d9524301e 100644 (file)
@@ -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."<br />Disposing/Selling: ".$quantity_removed."<br />Keeping: ".$item_quantity);
This page took 0.09747 seconds and 4 git commands to generate.