[freeside-commits] freeside/FS/FS agent.pm,1.19,1.20

Ivan,,, ivan at wavetail.420.am
Tue Apr 14 10:16:18 PDT 2009


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

Modified Files:
	agent.pm 
Log Message:
add configuration option to control recurring_flag behavior, RT#3843

Index: agent.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/agent.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- agent.pm	10 Mar 2009 16:14:08 -0000	1.19
+++ agent.pm	14 Apr 2009 17:16:16 -0000	1.20
@@ -225,16 +225,21 @@
 
   my $taxclass = '';
   if ( $options{invnum} ) {
+
     my $cust_bill = qsearchs('cust_bill', { 'invnum' => $options{invnum} } );
     die "invnum ". $options{'invnum'}. " not found" unless $cust_bill;
-    my @taxclasses =
-      map  { $_->part_pkg->taxclass }
+
+    my @part_pkg =
+      map  { $_->part_pkg }
       grep { $_ }
       map  { $_->cust_pkg }
       $cust_bill->cust_bill_pkg;
-    unless ( grep { $taxclasses[0] ne $_ } @taxclasses ) { #unless there are
-                                                           #different taxclasses      $taxclass = $taxclasses[0];
-    }
+
+    my @taxclasses = map $_->taxclass, @part_pkg;
+
+    $taxclass = $taxclasses[0]
+      unless grep { $taxclasses[0] ne $_ } @taxclasses; #unless there are
+                                                        #different taxclasses
   }
 
   #look for an agent gateway override first



More information about the freeside-commits mailing list