summaryrefslogtreecommitdiff
path: root/httemplate/search/report_tax.cgi
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-05-20 09:38:38 -0700
committerMark Wells <mark@freeside.biz>2014-05-20 09:39:05 -0700
commit48ddc2a473201e09daaff99b3dd22d56ebe8f939 (patch)
tree6d3e414183c5a2556d487e20a79d3b2da75716db /httemplate/search/report_tax.cgi
parent2aca98d97a5ac486880c677a7b518db91628a695 (diff)
option to handle credited tax date range differently, #28497
Diffstat (limited to 'httemplate/search/report_tax.cgi')
-rwxr-xr-xhttemplate/search/report_tax.cgi11
1 files changed, 11 insertions, 0 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index 08f255fe4..124e5d819 100755
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -176,6 +176,12 @@ if ( $cgi->param('taxname') =~ /^([\w ]+)$/ ) {
die "taxname required";
}
+if ( $cgi->param('credit_date') eq 'cust_credit_bill' ) {
+ $params{credit_date} = 'cust_credit_bill';
+} else {
+ $params{credit_date} = 'cust_bill';
+}
+
warn "PARAMS:\n".Dumper(\%params)."\n\n" if $DEBUG;
my $report = FS::Report::Tax->report_internal(%params);
@@ -193,6 +199,11 @@ my $taxlink = $p. "search/cust_bill_pkg.cgi?$dateagentlink;istax=1";
my $exemptlink = $p. "search/cust_tax_exempt_pkg.cgi?$dateagentlink";
my $creditlink = $p. "search/cust_bill_pkg.cgi?$dateagentlink;credit=1;istax=1";
+if ( $params{'credit_date'} eq 'cust_credit_bill' ) {
+ $creditlink =~ s/begin/credit_begin/;
+ $creditlink =~ s/end/credit_end/;
+}
+
my %pkgclass_name = map { $_->classnum, $_->classname } qsearch('pkg_class');
$pkgclass_name{''} = 'Unclassified';