diff options
| author | ivan <ivan> | 2011-02-10 01:03:59 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2011-02-10 01:03:59 +0000 |
| commit | 428faf8a60752ea3d571edc876dd83ebc6875a3c (patch) | |
| tree | d5d7cd0b3ca309a82259a7349e306952b33b90f9 /httemplate/search/report_newtax.cgi | |
| parent | 6b10752baaf502c7cad8c777c1d2ef4e96168161 (diff) | |
fix cch tax report for more than one cust_bill_pkg_tax_rate_location per line item, RT#11483
Diffstat (limited to 'httemplate/search/report_newtax.cgi')
| -rwxr-xr-x | httemplate/search/report_newtax.cgi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/httemplate/search/report_newtax.cgi b/httemplate/search/report_newtax.cgi index 6a2cbb0d1..78514624c 100755 --- a/httemplate/search/report_newtax.cgi +++ b/httemplate/search/report_newtax.cgi @@ -123,7 +123,7 @@ foreach my $t (qsearch({ table => 'cust_bill_pkg', my $taxwhere = "FROM cust_bill_pkg $addl_from $where AND payby != 'COMP' ". "AND ". join( ' AND ', map { "( $_ = ? OR ? = '' AND $_ IS NULL)" } @taxparam ); - my $sql = "SELECT SUM(cust_bill_pkg.setup+cust_bill_pkg.recur) ". + my $sql = "SELECT SUM(COALESCE(amount, cust_bill_pkg.setup+cust_bill_pkg.recur)) ". " $taxwhere AND cust_bill_pkg.pkgnum = 0"; my $x = scalar_sql($t, [ map { $_, $_ } @params ], $sql ); |
