Wishlist se nyni zobrazuje pro vsechny mistnosti dohromady
authorThomas Mudrunka <tomas@mudrunka.cz>
Wed, 30 Nov 2011 21:23:47 +0000 (22:23 +0100)
committerThomas Mudrunka <tomas@mudrunka.cz>
Wed, 30 Nov 2011 21:23:47 +0000 (22:23 +0100)
assistants/stats/reserve.inc.php

index ec2d34ac09a9b31cbcddf9972ace6ba74cb49cc4..a2a4c131fff529b81bfffcfbb609f9f14f46a574 100644 (file)
@@ -6,11 +6,11 @@ $queries += array(
                ' WHERE model_reserve>0 AND NOT EXISTS'.
                ' (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,'.
+               => 'SELECT model_id,model_name,model_barcode,model_reserve,'.
                ' COUNT(item_id),SUM(item_quantity),model_reserve-SUM(item_quantity) as item_quantity_to_buy'.
-               ' FROM item LEFT JOIN model USING(model_id) LEFT JOIN room USING(room_id)'.
+               ' FROM item LEFT JOIN model USING(model_id)'.
                ' WHERE item_valid_till=0 AND status_id=1'.
-               ' GROUP BY model_id,room_id'.
+               ' GROUP BY model_id'.
                ' HAVING SUM(item_quantity)<model_reserve'.
-               ' ORDER BY room_id,model_id;',
+               ' ORDER BY model_id;',
 );
This page took 0.202943 seconds and 4 git commands to generate.