Podrobna financni statistika jednotlivych stavu (na zadost Lotka)
authorThomas Mudrunka <tomas@mudrunka.cz>
Fri, 19 Oct 2012 16:17:09 +0000 (18:17 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Fri, 19 Oct 2012 16:17:09 +0000 (18:17 +0200)
assistants/stats/financial.inc.php

index fe03f8bb731d1b2ddc6835d8c48f3a308a2c19d3..e67e0676609067f91ffc8ef051cb777d4348af91 100644 (file)
@@ -26,6 +26,8 @@ $queries += array( //TODO: use build_query_select()!!!
                => 'SELECT COUNT(item_id),SUM(item_price_out),SUM(item_price_in),(SUM(item_price_out)-SUM(item_price_in)) as sale_profit FROM item WHERE item_valid_till=0 AND status_id = 3'.$month_sql_sold,
        "Skladem celkem $month"
                => 'SELECT COUNT(item_id),SUM(item_price_in) FROM item WHERE item_valid_till=0 AND status_id = 1'.$month_sql,
+       "Stavy (podrobně)"
+               => 'SELECT status_id, status_name, SUM(item_price_in), SUM(item_price_out) FROM status LEFT JOIN item USING(status_id) WHERE item_valid_till=0 GROUP BY status_id;',
        "Bilance celkem =(prodej - všechny nákupy) $month"
                => "SELECT (
                                SUM(item_price_out)
This page took 0.087163 seconds and 4 git commands to generate.