X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax.cgi;h=491cd42c53297c377d268257133caf9edb2d0ea9;hb=3ed9d0fa90662f037f3fb2f50632ccb34066a979;hp=124e5d8192732e4b70ce8133738a68b5d185f058;hpb=48ddc2a473201e09daaff99b3dd22d56ebe8f939;p=freeside.git diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi old mode 100755 new mode 100644 index 124e5d819..491cd42c5 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -14,7 +14,7 @@ TD.sectionhead { .grid TH { background-color: #cccccc; padding: 0px 3px 2px } .row0 TD { background-color: #eeeeee; padding: 0px 3px 2px; text-align: right} .row1 TD { background-color: #ffffff; padding: 0px 3px 2px; text-align: right} -TD.rowhead { font-weight: bold; text-align: left } +TD.rowhead { font-weight: bold; text-align: left; padding: 0px 3px } .bigmath { font-size: large; font-weight: bold; font: sans-serif; text-align: center } .total { font-style: italic } @@ -73,8 +73,9 @@ TD.rowhead { font-weight: bold; text-align: left } % # construct base links that limit to the tax rates described by this row % my $rowlink = ';taxnum=' . $row->{taxnums}; % # and also the package class, if we're limiting package class -% $rowlink .= ';pkgclass='.$row->{pkgclass} -% if $params{breakdown}->{pkgclass}; +% if ( $params{breakdown}->{pkgclass} ) { +% $rowlink .= ';classnum=' . ($row->{pkgclass} || 0); +% } % % if ( $row->{total} ) { @@ -141,6 +142,23 @@ TD.rowhead { font-weight: bold; text-align: left } % $rownum++; % $prev_row = $row; % } # foreach my $row +% # at the end of everything + +% if ( $report->{outside} > 0 ) { + + + + <% emt('Out of taxable region') %> + + + + <% $money_sprintf->( $report->{outside } ) %> + + + + + +% } <& /elements/footer.html &> @@ -170,8 +188,9 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { $agentname = $agent->agentname; } -if ( $cgi->param('taxname') =~ /^([\w ]+)$/ ) { - $params{taxname} = $1; +# allow anything in here; FS::Report::Tax will treat it as unsafe +if ( length($cgi->param('taxname')) ) { + $params{taxname} = $cgi->param('taxname'); } else { die "taxname required"; } @@ -193,7 +212,9 @@ my $money_sprintf = sub { }; my $dateagentlink = "begin=$beginning;end=$ending"; -$dateagentlink .= $params{agentnum} if $params{agentnum}; +if ( $params{agentnum} ) { + $dateagentlink .= ';agentnum=' . $params{agentnum}; +} my $saleslink = $p. "search/cust_bill_pkg.cgi?$dateagentlink;nottax=1"; my $taxlink = $p. "search/cust_bill_pkg.cgi?$dateagentlink;istax=1"; my $exemptlink = $p. "search/cust_tax_exempt_pkg.cgi?$dateagentlink";