X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax-xls.cgi;h=c914d5adc3bd60b3c0b51d6600f17a58090e0571;hb=9ece94ae50eaa9c326fc801d904565bbbd28b9ed;hp=9b02457b01456d776418165a8bcd4ea7f22ec5a5;hpb=83a9d7e9afedfa270dcdf942df04fb50989afc4f;p=freeside.git diff --git a/httemplate/search/report_tax-xls.cgi b/httemplate/search/report_tax-xls.cgi index 9b02457b0..c914d5adc 100755 --- a/httemplate/search/report_tax-xls.cgi +++ b/httemplate/search/report_tax-xls.cgi @@ -24,8 +24,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"; } @@ -207,11 +208,11 @@ foreach my $row (@rows) { $x++; $ws->write_string($y, $x, " \N{U+2212} ", $f->{bigmath}); # MINUS SIGN $x++; - $ws->write($y, $x, $row->{credit} || 0, $f->{currency}); + $ws->write($y, $x, $row->{tax_credited} || 0, $f->{currency}); $x++; $ws->write_string($y, $x, " = ", $f->{bigmath}); $x++; - $ws->write($y, $x, $row->{tax} - $row->{credit}, $f->{currency}); + $ws->write($y, $x, $row->{tax} - $row->{tax_credited}, $f->{currency}); $x++; $ws->write($y, $x, $row->{tax_paid} || 0, $f->{currency});