summaryrefslogtreecommitdiff
path: root/httemplate/search/report_receivables.cgi
diff options
context:
space:
mode:
authorivan <ivan>2003-11-06 14:08:14 +0000
committerivan <ivan>2003-11-06 14:08:14 +0000
commit5a77da3b812de3d218edc3faba3aefc777e5ca71 (patch)
treeea01acc64b806c58f570dbfc0915d0af61742e23 /httemplate/search/report_receivables.cgi
parent1203c14b5b34bc848c3176899767a4fbc13f914a (diff)
ack! count credits, not payments twice
Diffstat (limited to 'httemplate/search/report_receivables.cgi')
-rwxr-xr-xhttemplate/search/report_receivables.cgi24
1 files changed, 12 insertions, 12 deletions
diff --git a/httemplate/search/report_receivables.cgi b/httemplate/search/report_receivables.cgi
index f0274d026..1fd7d03c7 100755
--- a/httemplate/search/report_receivables.cgi
+++ b/httemplate/search/report_receivables.cgi
@@ -12,8 +12,8 @@ select *,
,0
)
- coalesce(
- ( select sum(amount) from cust_bill_pay
- where cust_bill.invnum = cust_bill_pay.invnum )
+ ( select sum(amount) from cust_credit_bill
+ where cust_bill.invnum = cust_credit_bill.invnum )
,0
)
@@ -33,8 +33,8 @@ select *,
,0
)
- coalesce(
- ( select sum(amount) from cust_bill_pay
- where cust_bill.invnum = cust_bill_pay.invnum )
+ ( select sum(amount) from cust_credit_bill
+ where cust_bill.invnum = cust_credit_bill.invnum )
,0
)
@@ -55,8 +55,8 @@ select *,
,0
)
- coalesce(
- ( select sum(amount) from cust_bill_pay
- where cust_bill.invnum = cust_bill_pay.invnum )
+ ( select sum(amount) from cust_credit_bill
+ where cust_bill.invnum = cust_credit_bill.invnum )
,0
)
@@ -77,8 +77,8 @@ select *,
,0
)
- coalesce(
- ( select sum(amount) from cust_bill_pay
- where cust_bill.invnum = cust_bill_pay.invnum )
+ ( select sum(amount) from cust_credit_bill
+ where cust_bill.invnum = cust_credit_bill.invnum )
,0
)
@@ -98,8 +98,8 @@ select *,
,0
)
- coalesce(
- ( select sum(amount) from cust_bill_pay
- where cust_bill.invnum = cust_bill_pay.invnum )
+ ( select sum(amount) from cust_credit_bill
+ where cust_bill.invnum = cust_credit_bill.invnum )
,0
)
@@ -121,8 +121,8 @@ where 0 <
,0
)
- coalesce(
- ( select sum(amount) from cust_bill_pay
- where cust_bill.invnum = cust_bill_pay.invnum )
+ ( select sum(amount) from cust_credit_bill
+ where cust_bill.invnum = cust_credit_bill.invnum)
,0
)