Fixed A Bug in Item Sales Summary Report
[fa-stable.git] / reporting / rep309.php
index 1bb9ba06a7df49c8abd83794b3da93cd48c800a0..172034243c92ee8550c5924c608624e48b571131 100644 (file)
@@ -50,7 +50,7 @@ function getTransactions($category, $from, $to)
                AND trans.tran_date>='$from'
                AND trans.tran_date<='$to'
                AND line.quantity<>0
-               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,