diff options
author | Mark Wells <mark@freeside.biz> | 2015-08-14 14:43:02 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-08-14 14:43:02 -0700 |
commit | 039381569561964c572407409fe61f6d4da97afe (patch) | |
tree | 7080c02827c6ec5055fac9ebd7446e77e248b411 /httemplate/search/report_tax-xls.cgi | |
parent | d19d491320789ae2e621d35cc7d67ac1c7696367 (diff) |
fix anomalous behavior in line item report with consolidated taxes, needed for #26770, from...#18676, I think?
Diffstat (limited to 'httemplate/search/report_tax-xls.cgi')
-rwxr-xr-x | httemplate/search/report_tax-xls.cgi | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/httemplate/search/report_tax-xls.cgi b/httemplate/search/report_tax-xls.cgi index d0ef434f4..743f14788 100755 --- a/httemplate/search/report_tax-xls.cgi +++ b/httemplate/search/report_tax-xls.cgi @@ -146,7 +146,7 @@ my $colhead = $format[0]->{colhead}; # print header $ws->merge_range($y, 1, $y, 5, 'Sales', $colhead); $ws->merge_range($y, 6, $y+1, 8, 'Rate', $colhead); -$ws->merge_range($y, 9, $y, 14, 'Tax', $colhead); +$ws->merge_range($y, 9, $y, 15, 'Tax', $colhead); $y++; $colhead = $format[0]->{colhead_small}; @@ -156,16 +156,17 @@ $ws->write($y, 9, 'Estimated', $colhead); $ws->write($y, 10, 'Invoiced', $colhead); $ws->write($y, 12, 'Credited', $colhead); $ws->write($y, 14, 'Net due', $colhead); +$ws->write($y, 15, 'Collected',$colhead); $y++; # print data -my $rownum = 0; +my $rownum = 1; my $prev_row = { pkgclass => 'DUMMY PKGCLASS' }; foreach my $row (@rows) { $x = 0; if ( $row->{pkgclass} ne $prev_row->{pkgclass} ) { - $rownum = 0; + $rownum = 1; if ( $params{breakdown}->{pkgclass} ) { $ws->merge_range($y, 0, $y, 14, $pkgclass_name{$row->{pkgclass}}, @@ -206,6 +207,8 @@ foreach my $row (@rows) { $ws->write_string($y, $x, " = ", $f->{bigmath}); $x++; $ws->write($y, $x, $row->{tax} - $row->{credit}, $f->{currency}); + $x++; + $ws->write($y, $x, $row->{tax_paid} || 0, $f->{currency}); $rownum++; $y++; |