X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax.cgi;h=124e5d8192732e4b70ce8133738a68b5d185f058;hb=06fd3d9f3ca53b2d2f7595e55be4b129ca69511c;hp=08f255fe409398e2b117586e6be0652dc0d2fbb6;hpb=03ab761a53bffa14d09f23fb8b9702806a1c6b79;p=freeside.git 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';