Fixed A Bug in Item Sales Summary Report
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 29 Nov 2016 15:20:32 +0000 (16:20 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 29 Nov 2016 15:20:32 +0000 (16:20 +0100)
reporting/rep309.php

index f52dc22aa2cbd4a39c7e9bad6c28e4cdb156f32e..6b769bf322a37ca822eb846aa9d51c11a28351ae 100644 (file)
@@ -51,7 +51,7 @@ function getTransactions($category, $from, $to)
                AND trans.tran_date<='$to'
                AND line.quantity<>0
                AND item.mb_flag <>'F'
-               AND line.debtor_trans_type = ".ST_SALESINVOICE;
+               AND (line.debtor_trans_type = ".ST_SALESINVOICE." OR line.debtor_trans_type = ".ST_CUSTCREDIT.")";
                if ($category != 0)
                        $sql .= " AND item.category_id = ".db_escape($category);
                $sql .= " GROUP BY item.category_id,