summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorivan <ivan>2011-04-15 22:02:11 +0000
committerivan <ivan>2011-04-15 22:02:11 +0000
commit636dd1f25af52d35efe7a323a5765ff5adeadf83 (patch)
tree4d2ec27ad405eef39b2eb3d7bd4834652369dc8d /httemplate/search
parent3983d5ee6135e5d3f57a111e890bebd22e11da97 (diff)
link new tax report to cust_credit_bill_pkg for credits, RT#12332
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/cust_credit_bill_pkg.html26
1 files changed, 12 insertions, 14 deletions
diff --git a/httemplate/search/cust_credit_bill_pkg.html b/httemplate/search/cust_credit_bill_pkg.html
index a73e61c39..f34603508 100644
--- a/httemplate/search/cust_credit_bill_pkg.html
+++ b/httemplate/search/cust_credit_bill_pkg.html
@@ -345,7 +345,18 @@ my $join_cust =
my $join_pkg;
-my $join_cust_bill_pkg = 'LEFT JOIN cust_bill_pkg USING ( billpkgnum )';
+my $join_cust_bill_pkg = 'LEFT JOIN cust_bill_pkg USING ( billpkgnum';
+if ( $cgi->param('iscredit') eq 'rate' ) {
+ $join_pkg .= ', billpkgtaxratelocationnum )';
+} elsif ( $conf->exists('tax-pkg_address') ) {
+ $join_pkg .= ', billpkgtaxlocationnum )';
+ push @where, "billpkgtaxratelocationnum IS NULL";
+} else {
+ $join_pkg .= ' )';
+ push @where, "billpkgtaxratelocationnum IS NULL";
+}
+
+ )';
if ( $cgi->param('nottax') ) {
@@ -375,19 +386,6 @@ if ( $cgi->param('nottax') ) {
s/cust_pkg\.locationnum/cust_bill_pkg_tax_location.locationnum/g for @where;
}
- #if ( $cgi->param('iscredit') ) {
- $join_pkg .= ' JOIN cust_credit_bill_pkg USING ( billpkgnum';
- if ( $cgi->param('iscredit') eq 'rate' ) {
- $join_pkg .= ', billpkgtaxratelocationnum )';
- } elsif ( $conf->exists('tax-pkg_address') ) {
- $join_pkg .= ', billpkgtaxlocationnum )';
- push @where, "billpkgtaxratelocationnum IS NULL";
- } else {
- $join_pkg .= ' )';
- push @where, "billpkgtaxratelocationnum IS NULL";
- }
- #}
-
} else {
#die?