[freeside-commits] branch FREESIDE_3_BRANCH updated. baf5cfb99275c060748ec1c212e646759af6e96b

Mark Wells mark at 420.am
Mon Dec 8 02:03:44 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  baf5cfb99275c060748ec1c212e646759af6e96b (commit)
      from  a34e47965f71b62f49f20262736a7e3fc794b637 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit baf5cfb99275c060748ec1c212e646759af6e96b
Author: Mark Wells <mark at freeside.biz>
Date:   Mon Dec 8 04:00:23 2014 -0600

    fix problems with tax detail searches, #27698

diff --git a/httemplate/search/cust_tax_exempt_pkg.cgi b/httemplate/search/cust_tax_exempt_pkg.cgi
index 40b9ed7..267c938 100644
--- a/httemplate/search/cust_tax_exempt_pkg.cgi
+++ b/httemplate/search/cust_tax_exempt_pkg.cgi
@@ -118,6 +118,12 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
   push @where,  "cust_main.custnum = $1";
 }
 
+if ( $cgi->param('classnum') eq '0' ) {
+  push @where,  "part_pkg.classnum IS NULL";
+} elsif ( $cgi->param('classnum') =~ /^(\d+)$/ ) {
+  push @where,  "part_pkg.classnum = $1";
+}
+
 if ( $cgi->param('out') ) {
   # wtf? how would you ever get exemptions on a non-taxable package location?
 
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index 3e9d765..83f2fc5 100644
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -73,8 +73,9 @@ TD.rowhead { font-weight: bold; text-align: left; padding: 0px 3px }
 %   # construct base links that limit to the tax rates described by this row
 %   my $rowlink = ';taxnum=' . $row->{taxnums};
 %   # and also the package class, if we're limiting package class
-%   $rowlink .= ';pkgclass='.$row->{pkgclass}
-%     if $params{breakdown}->{pkgclass};
+%   if ( $params{breakdown}->{pkgclass} ) {
+%     $rowlink .= ';classnum=' . ($row->{pkgclass} || 0);
+%   }
 %
 %   if ( $row->{total} ) {
   </TBODY><TBODY CLASS="total">
@@ -210,7 +211,9 @@ my $money_sprintf = sub {
 };
 
 my $dateagentlink = "begin=$beginning;end=$ending";
-$dateagentlink .= $params{agentnum} if $params{agentnum};
+if ( $params{agentnum} ) {
+  $dateagentlink .= ';agentnum=' . $params{agentnum};
+}
 my $saleslink  = $p. "search/cust_bill_pkg.cgi?$dateagentlink;nottax=1";
 my $taxlink    = $p. "search/cust_bill_pkg.cgi?$dateagentlink;istax=1";
 my $exemptlink = $p. "search/cust_tax_exempt_pkg.cgi?$dateagentlink";

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/cust_tax_exempt_pkg.cgi |    6 ++++++
 httemplate/search/report_tax.cgi          |    9 ++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list