From 4da324b232354f0a3d4f4a1393d12c9ca018dc29 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Fri, 25 Nov 2011 02:29:22 +0100 Subject: [PATCH] Upresnena detekce uplne chybejicich polozek --- assistants/stats/reserve.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assistants/stats/reserve.inc.php b/assistants/stats/reserve.inc.php index e9f89c9..ec2d34a 100644 --- a/assistants/stats/reserve.inc.php +++ b/assistants/stats/reserve.inc.php @@ -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'. -- 2.30.2