[freeside-commits] freeside/FS/FS cust_bill_ApplicationCommon.pm, 1.7.2.3, 1.7.2.4
Ivan,,,
ivan at wavetail.420.am
Fri Feb 26 19:00:23 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15260
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_bill_ApplicationCommon.pm
Log Message:
fix rare "Illegal division by zero" error applying things when using weights, RT#7491
Index: cust_bill_ApplicationCommon.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_ApplicationCommon.pm,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -u -w -d -r1.7.2.3 -r1.7.2.4
--- cust_bill_ApplicationCommon.pm 4 Oct 2008 22:35:59 -0000 1.7.2.3
+++ cust_bill_ApplicationCommon.pm 27 Feb 2010 03:00:20 -0000 1.7.2.4
@@ -239,9 +239,11 @@
}
@items = @newitems;
- } while ( $lessflag );
+ } while ( $lessflag && @items );
- #and now that we've fallen out of the loop, distribute the rest equally...
+ if ( @items ) {
+
+ #and now that we've fallen out of the loop, distribute the rest equally
# should cust_bill_pay_pkg and cust_credit_bill_pkg amount columns
# become real instead of numeric(10,2) ??? no..
@@ -288,10 +290,10 @@
" to line item (cust_bill_pkg ". $_->[0]->billpkgnum. ")\n"
foreach @equi_apply;
}
-
-
push @apply, @equi_apply;
+ }
+
#$remaining_amount -= $applytotal;
last unless $remaining_amount;
More information about the freeside-commits
mailing list