diff options
author | ivan <ivan> | 2011-02-10 01:20:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-02-10 01:20:03 +0000 |
commit | 5a4db25ecf6a56c0777c52c4d172c675dad0791b (patch) | |
tree | 9c9cb2a3bc17e8e8d964bfecd0f3300d11015987 /httemplate | |
parent | 406b21cab11a2a89f359d40d10d6b37e60eddc1e (diff) |
fix cch tax report for more than one cust_bill_pkg_tax_rate_location per line item, RT#11483
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/search/report_newtax.cgi | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/httemplate/search/report_newtax.cgi b/httemplate/search/report_newtax.cgi index 78514624c..559d89ded 100755 --- a/httemplate/search/report_newtax.cgi +++ b/httemplate/search/report_newtax.cgi @@ -123,8 +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(COALESCE(amount, cust_bill_pkg.setup+cust_bill_pkg.recur)) ". - " $taxwhere AND cust_bill_pkg.pkgnum = 0"; + my $sql = "SELECT SUM(amount) $taxwhere AND cust_bill_pkg.pkgnum = 0"; my $x = scalar_sql($t, [ map { $_, $_ } @params ], $sql ); $tax += $x; |