Commit | Line | Data |
---|---|---|
049a7400 TM |
1 | <?php |
2 | $queries += array( | |
bfb8a227 TM |
3 | "Nakoupit: Došlo úplně (Urgent WishList)" |
4 | => 'SELECT model_id,model_name,model_barcode,model_reserve,model_reserve as item_quantity_to_buy'. | |
5 | ' FROM model'. | |
6 | ' WHERE model_reserve>0 AND NOT EXISTS'. | |
7 | ' (SELECT item_id FROM item WHERE model.model_id=item.model_id AND status_id=1)', | |
8 | "Nakoupit: Dochází (WishList)" | |
049a7400 TM |
9 | => 'SELECT room_id,room_name,model_id,model_name,model_barcode,model_reserve,'. |
10 | ' COUNT(item_id),SUM(item_quantity),model_reserve-SUM(item_quantity) as item_quantity_to_buy'. | |
11 | ' FROM item LEFT JOIN model USING(model_id) LEFT JOIN room USING(room_id)'. | |
12 | ' WHERE item_valid_till=0 AND status_id=1'. | |
13 | ' GROUP BY model_id,room_id'. | |
14 | ' HAVING SUM(item_quantity)<model_reserve'. | |
15 | ' ORDER BY room_id,model_id;', | |
16 | ); |