From: Thomas Mudrunka Date: Fri, 25 Nov 2011 01:29:22 +0000 (+0100) Subject: Upresnena detekce uplne chybejicich polozek X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=4da324b232354f0a3d4f4a1393d12c9ca018dc29;p=mirrors%2FSokoMan.git Upresnena detekce uplne chybejicich polozek --- 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'.