Opravena haluz s wishlistem
authorThomas Mudrunka <tomas@mudrunka.cz>
Fri, 25 Nov 2011 01:15:52 +0000 (02:15 +0100)
committerThomas Mudrunka <tomas@mudrunka.cz>
Fri, 25 Nov 2011 01:15:52 +0000 (02:15 +0100)
assistants/stats/reserve.inc.php
assistants/stats/stock.inc.php

index 827781490af2390823975990b6eba186691f61e6..e9f89c9d1d36a178919688477282d817d02121a6 100644 (file)
@@ -1,6 +1,11 @@
 <?php
 $queries += array(
-       "Nutno koupit"
+       "Nakoupit: Došlo úplně (Urgent WishList)"
+               => '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)',
+       "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'.
                ' FROM item LEFT JOIN model USING(model_id) LEFT JOIN room USING(room_id)'.
index 8067a77f8f2b71c093f9b0397d80224e3046e6cb..b71d0228c5033dfa35f45826417a534c318428e7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 $queries += array(
-       "Ceník + Počet kusů skladem"
+       "Ceník + Počet kusů skladem (PriceList + Stock)"
                => 'SELECT room_id,room_name,model_id,model_name,model_barcode,model_price_out,COUNT(item_id),SUM(item_quantity)'.
                ' FROM item LEFT JOIN model USING(model_id) LEFT JOIN room USING(room_id)'.
                ' WHERE item_valid_till=0 AND status_id=1'.
This page took 0.146402 seconds and 4 git commands to generate.