projects
/
textcart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9cadd7
)
Rerun of Sales Summary Report
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 6 Apr 2011 23:02:58 +0000
(
01:02
+0200)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 6 Apr 2011 23:02:58 +0000
(
01:02
+0200)
reporting/rep114.php
patch
|
blob
|
history
diff --git
a/reporting/rep114.php
b/reporting/rep114.php
index 96f743e76834c5920f3bfcac8b6b83513070d847..11735980d452c48f8e829415ee158b109db00995 100644
(file)
--- a/
reporting/rep114.php
+++ b/
reporting/rep114.php
@@
-34,7
+34,7
@@
function getTaxTransactions($from, $to, $tax_id)
$todate = date2sql($to);
\r
$sql = "SELECT d.debtor_no, d.name AS cust_name, d.tax_id,
- CASE WHEN net_amount IS NULL THEN
+ CASE WHEN net_amount IS NULL
OR amount=0
THEN
SUM(CASE WHEN dt.type=".ST_CUSTCREDIT." THEN (ov_amount+ov_freight+ov_discount)*-1
ELSE (ov_amount+ov_freight+ov_discount) END *dt.rate) ELSE
SUM(CASE WHEN dt.type=".ST_CUSTCREDIT." THEN -net_amount ELSE net_amount END *ex_rate) END AS total,