From: Thomas Mudrunka Date: Mon, 12 May 2014 17:21:39 +0000 (+0200) Subject: zapujceny HW X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8248c7125a50c5fe61f4ac95046e1ab2fc5379e6;p=mirrors%2FSokoMan.git zapujceny HW --- diff --git a/assistants/stats/financial.inc.php b/assistants/stats/financial.inc.php index 92bc51b..fae0ee2 100644 --- a/assistants/stats/financial.inc.php +++ b/assistants/stats/financial.inc.php @@ -33,4 +33,6 @@ $queries += array( //TODO: use build_query_select()!!! SUM(item_price_out) -(SELECT SUM(item_price_in) FROM item WHERE item_valid_till=0$month_sql_bought) ) FROM item WHERE item_valid_till=0 AND ( status_id = 3 )$month_sql_sold", + "Zapůjčený HW dle LMS id" + => 'SELECT item_customer, SUM(item_price_in) FROM item WHERE status_id=6 AND item_valid_till=0 GROUP BY item_customer ORDER BY SUM(item_price_in) DESC;' );