% # Row label
% # Special: If this report is showing all taxes, link the row label to
% # the detailed tax report for that taxname/country.
% if ( $all ) {
% my $newcgi = CGI->new($cgi);
% $newcgi->delete('all');
% $newcgi->param('country', $row->{country});
% $newcgi->param('taxname', $row->{taxname});
% $newcgi->param('breakdown', qw(city district));
<% $row->{label} |h %>
% } else { # on the per-taxname report, just show the label with no link
<% $row->{label} |h %>
% }
|
% # Total sales
<% $money_sprintf->( $row->{sales} ) %>
|
% # Exemptions: customer
<% $money_sprintf->( $row->{exempt_cust} ) %>
|
% # package
<% $money_sprintf->( $row->{exempt_pkg} ) %>
|
% # monthly (note this uses $exemptlink; it's a completely separate report)
<% $money_sprintf->( $row->{exempt_monthly} ) %>
|
% # credited sales
<% $money_sprintf->( $row->{sales_credited} ) %>
|
% # taxable sales
">
<% $money_sprintf->( $row->{taxable} ) %>
|
× |
<% $row->{rate} %> |
% # estimated tax
= |
% if ( $row->{estimated} ) {
<% $money_sprintf->( $row->{estimated} ) %>
% }
|
% # invoiced tax
<% $money_sprintf->( $row->{tax} ) %>
|
% # credited tax
− |
%# currently broken
<% $money_sprintf->( $row->{tax_credited} ) %>
%#
|
% # net tax due
= |
<% $money_sprintf->( $row->{tax} - $row->{tax_credited} ) %> |
% # tax collected
|
<% $money_sprintf->( $row->{tax_paid} ) %> |
% $rownum++;
% $prev_row = $row;
% } # foreach my $row
% # at the end of everything