From: Thomas Mudrunka Date: Wed, 12 Jun 2013 12:30:52 +0000 (+0200) Subject: Vykopnuti nulovejch poctu ze soupisky X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=913ab62e0c3a0cf6e3cff7c48b464259595f5b6e;p=mirrors%2FSokoMan.git Vykopnuti nulovejch poctu ze soupisky --- diff --git a/assistants/stats/roster.inc.php b/assistants/stats/roster.inc.php index 5bf6c80..6b525e4 100644 --- a/assistants/stats/roster.inc.php +++ b/assistants/stats/roster.inc.php @@ -3,5 +3,5 @@ $queries += array( "Inventurni soupiska věcí se seriáky (Warehouse roster countable)"=> "select model_id, model_name, barcode_name, COUNT(item_serial), GROUP_CONCAT(item_serial separator ', ') from item LEFT JOIN barcode USING(barcode_id) LEFT JOIN model USING(model_id) WHERE item_valid_till=0 AND status_id=1 AND model_countable=1 GROUP BY model_id ORDER BY model_name", "Inventurni soupiska věcí na počet (Warehouse roster uncountable)"=> - "select model_id, model_name, barcode_name, SUM(item_quantity) from item LEFT JOIN barcode USING(barcode_id) LEFT JOIN model USING(model_id) WHERE item_valid_till=0 AND status_id=1 AND model_countable=0 GROUP BY model_id ORDER BY model_name" + "select model_id, model_name, barcode_name, SUM(item_quantity) from item LEFT JOIN barcode USING(barcode_id) LEFT JOIN model USING(model_id) WHERE item_valid_till=0 AND status_id=1 AND model_countable=0 AND item_quantity>0 GROUP BY model_id ORDER BY model_name" );