$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";
}
$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});