[freeside-commits] freeside/FS/FS cust_bill.pm,1.163,1.163.2.1

Ivan,,, ivan at wavetail.420.am
Thu Mar 1 09:24:51 PST 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv30502

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_bill.pm 
Log Message:
backport fix for "Can't call method "part_pkg" on an undefined value at .../cust_bill.pm line 434" to 1.7

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.163
retrieving revision 1.163.2.1
diff -u -d -r1.163 -r1.163.2.1
--- cust_bill.pm	7 Feb 2007 00:46:28 -0000	1.163
+++ cust_bill.pm	1 Mar 2007 17:24:49 -0000	1.163.2.1
@@ -432,12 +432,16 @@
       my @open_lineitems = $self->open_cust_bill_pkg;
 
       my $max_pay_weight =
-        max( map { $_->cust_pkg->part_pkg->pay_weight || 0 }
-	         @open_lineitems
+        max( map  { $_->part_pkg->pay_weight || 0 }
+             grep { $_ }
+             map  { $_->cust_pkg }
+	          @open_lineitems
 	   );
       my $max_credit_weight =
-        max( map { $_->cust_pkg->part_pkg->credit_weight || 0 }
-	         @open_lineitems
+        max( map  { $_->part_pkg->credit_weight || 0 }
+	     grep { $_ } 
+             map  { $_->cust_pkg }
+                  @open_lineitems
            );
 
       #if both are the same... payments first?  it has to be something



More information about the freeside-commits mailing list