[freeside-commits] freeside/FS/FS/cust_main Billing.pm,1.13,1.14

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Oct 11 12:00:35 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv21347/FS/FS/cust_main

Modified Files:
	Billing.pm 
Log Message:
external taxes support package locations RT10093

Index: Billing.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Billing.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- Billing.pm	24 Sep 2010 03:14:38 -0000	1.13
+++ Billing.pm	11 Oct 2010 19:00:33 -0000	1.14
@@ -1048,18 +1048,14 @@
        )
     {
 
-      if ( $conf->exists('tax-pkg_address') && $cust_pkg->locationnum ) {
-        return "fatal: Can't (yet) use tax-pkg_address with taxproducts";
-      }
-
       foreach my $class (@classes) {
-        my $err_or_ref = $self->_gather_taxes( $part_pkg, $class );
+        my $err_or_ref = $self->_gather_taxes( $part_pkg, $class, $cust_pkg );
         return $err_or_ref unless ref($err_or_ref);
         $taxes{$class} = $err_or_ref;
       }
 
       unless (exists $taxes{''}) {
-        my $err_or_ref = $self->_gather_taxes( $part_pkg, '' );
+        my $err_or_ref = $self->_gather_taxes( $part_pkg, '', $cust_pkg );
         return $err_or_ref unless ref($err_or_ref);
         $taxes{''} = $err_or_ref;
       }
@@ -1226,11 +1222,14 @@
   my $self = shift;
   my $part_pkg = shift;
   my $class = shift;
+  my $cust_pkg = shift;
 
   local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG;
 
-  my @taxes = ();
   my $geocode = $self->geocode('cch');
+  $geocode = $cust_pkg->geocode('cch')
+    if ( $conf->exists('tax-pkg_address') && $cust_pkg->locationnum );
+  my @taxes = ();
 
   my @taxclassnums = map { $_->taxclassnum }
                      $part_pkg->part_pkg_taxoverride($class);



More information about the freeside-commits mailing list