diff options
author | ivan <ivan> | 2002-07-07 13:30:02 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-07-07 13:30:02 +0000 |
commit | 32b6d9deddc928f98dcad15ff306015d7e0070c5 (patch) | |
tree | 6fa55230f57ab896800e434f001cf17ef8f90d87 /httemplate | |
parent | 6a22335d0376846dfbbfda0bb952719b30ce2d30 (diff) |
calculate owed as subquery here too
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/search/cust_bill.cgi | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/httemplate/search/cust_bill.cgi b/httemplate/search/cust_bill.cgi index f4ead7042..d2a3573d4 100755 --- a/httemplate/search/cust_bill.cgi +++ b/httemplate/search/cust_bill.cgi @@ -79,9 +79,7 @@ if ( $cgi->keywords ) { @cust_bill = qsearch( 'cust_bill', {}, - 'cust_bill.*, - charged - coalesce(sum(cust_bill_pay.amount),0) - - coalesce(sum(cust_credit_bill.amount),0) as owed', + "cust_bill.*, $owed as owed" "$extra_sql $orderby $limit" ); } else { |