Upresnena detekce uplne chybejicich polozek
authorThomas Mudrunka <tomas@mudrunka.cz>
Fri, 25 Nov 2011 01:29:22 +0000 (02:29 +0100)
committerThomas Mudrunka <tomas@mudrunka.cz>
Fri, 25 Nov 2011 01:29:22 +0000 (02:29 +0100)
assistants/stats/reserve.inc.php

index e9f89c9d1d36a178919688477282d817d02121a6..ec2d34ac09a9b31cbcddf9972ace6ba74cb49cc4 100644 (file)
@@ -4,7 +4,7 @@ $queries += array(
                => 'SELECT model_id,model_name,model_barcode,model_reserve,model_reserve as item_quantity_to_buy'.
                ' FROM model'.
                ' WHERE model_reserve>0 AND NOT EXISTS'.
-               ' (SELECT item_id FROM item WHERE model.model_id=item.model_id AND status_id=1)',
+               ' (SELECT item_id FROM item WHERE model.model_id=item.model_id AND status_id=1 AND item_quantity>0 AND item_valid_till=0)',
        "Nakoupit: Dochází (WishList)"
                => 'SELECT room_id,room_name,model_id,model_name,model_barcode,model_reserve,'.
                ' COUNT(item_id),SUM(item_quantity),model_reserve-SUM(item_quantity) as item_quantity_to_buy'.
This page took 0.128544 seconds and 4 git commands to generate.