projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
httemplate
/
search
/
report_tax-xls.cgi
diff --git
a/httemplate/search/report_tax-xls.cgi
b/httemplate/search/report_tax-xls.cgi
index
773b403
..
c914d5a
100755
(executable)
--- 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;
}
$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";
}
} 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++;
$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++;
$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});
$x++;
$ws->write($y, $x, $row->{tax_paid} || 0, $f->{currency});
@@
-221,11
+222,11
@@
foreach my $row (@rows) {
}
# at the end of everything
}
# at the end of everything
-if ( $report->{out
side
} > 0 ) {
+if ( $report->{out
_sales
} > 0 ) {
my $f = $format[0];
$ws->set_row($y, 30); # height
$ws->write($y, 0, mt('Out of taxable region'), $f->{rowhead_outside});
my $f = $format[0];
$ws->set_row($y, 30); # height
$ws->write($y, 0, mt('Out of taxable region'), $f->{rowhead_outside});
- $ws->write($y, 1, $report->{out
side
}, $f->{currency_outside});
+ $ws->write($y, 1, $report->{out
_sales
}, $f->{currency_outside});
$y++;
}
$y++;
}
@@
-292,6
+293,15
@@
foreach my $row (@rows) {
$prev_row = $row;
}
$prev_row = $row;
}
+if ( $report->{out_credit} > 0 ) {
+ my $f = $format[0];
+ $ws->set_row($y, 30); # height
+ $ws->write($y, 0, mt('Out of taxable region'), $f->{rowhead_outside});
+ $ws->write($y, 1, $report->{out_credit}, $f->{currency_outside});
+ $y++;
+}
+
+
for my $x (0..4) {
$ws->set_column($x, $x, $widths[$x]);
}
for my $x (0..4) {
$ws->set_column($x, $x, $widths[$x]);
}