[freeside-commits] freeside/httemplate/search report_tax.cgi, 1.65, 1.66 cust_bill_pkg.cgi, 1.45, 1.46

Ivan,,, ivan at wavetail.420.am
Thu Jul 21 16:33:11 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv30206

Modified Files:
	report_tax.cgi cust_bill_pkg.cgi 
Log Message:
fix tax reports for taxclass+non-taxclass cases, RT#13160

Index: report_tax.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_tax.cgi,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -w -d -r1.65 -r1.66
--- report_tax.cgi	6 Nov 2010 23:45:42 -0000	1.65
+++ report_tax.cgi	21 Jul 2011 23:33:09 -0000	1.66
@@ -366,12 +366,13 @@
 
   } else {
 
-    $regions{$label}->{'url_param'} .= ';taxclassNULL=1'
-      if $cgi->param('show_taxclasses');
-
     my $same_sql = $r->sql_taxclass_sameregion;
     $mywhere .= " AND $same_sql" if $same_sql;
 
+    $regions{$label}->{'url_param'} .= ';taxclassNULL=1'
+      if $cgi->param('show_taxclasses')
+      || $same_sql;
+
   }
 
   my $fromwhere = "$from_join_cust_pkg $mywhere"; # AND payby != 'COMP' ";

Index: cust_bill_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_bill_pkg.cgi,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -w -d -r1.45 -r1.46
--- cust_bill_pkg.cgi	19 May 2011 19:03:56 -0000	1.45
+++ cust_bill_pkg.cgi	21 Jul 2011 23:33:09 -0000	1.46
@@ -73,6 +73,7 @@
                    \&FS::UI::Web::cust_fields,
                  ],
                  'sort_fields' => [
+                   '',
                    'setup', #broken in $unearned case i guess
                    ( $unearned ? ('', '') : () ),
                    ( $use_usage eq 'recurring' ? 'recur - usage' :
@@ -201,11 +202,8 @@
   #
   #} else {
 
-    push @where,
-      ' ( '. join(' OR ',
-                    map ' part_pkg.taxclass = '.dbh->quote($_),
-                        $cgi->param('taxclass')
-                 ).
+    push @where, ' part_pkg.taxclass IN ( '.
+                   join(', ', map dbh->quote($_), $cgi->param('taxclass') ).
       ' ) ';
 
   #}
@@ -312,6 +310,7 @@
     die "unknown base region for empty taxclass" unless $cust_main_county;
 
     my $same_sql = $cust_main_county->sql_taxclass_sameregion;
+    $same_sql =~ s/taxclass/part_pkg.taxclass/g;
     push @where, $same_sql if $same_sql;
 
   }



More information about the freeside-commits mailing list