[freeside-commits] freeside/FS/bin freeside-prepaidd,1.5,1.6
Ivan,,,
ivan at wavetail.420.am
Tue Aug 24 13:09:53 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv7141/bin
Modified Files:
freeside-prepaidd
Log Message:
insurance against prepaid double-billing, RT#9689
Index: freeside-prepaidd
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-prepaidd,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- freeside-prepaidd 5 Apr 2008 07:00:26 -0000 1.5
+++ freeside-prepaidd 24 Aug 2010 20:09:51 -0000 1.6
@@ -41,10 +41,19 @@
my $work_cust_pkg = $cust_pkg;
my $cust_main = $cust_pkg->cust_main;
+
+ #insurance: somehow winding up here without things properly applied...
+ my $a_error = $cust_main->apply_payments_and_credits;
+ if ( $a_error ) {
+ warn "Error applying payments&credits, customer #". $cust_main->custnum;
+ next;
+ }
+
if ( $cust_main->total_unapplied_payments > 0
- or $cust_main->total_credited > 0
+ || $cust_main->total_credited > 0
)
{
+
#this needs a flag to say only do the prepaid packages...
# and only try em if the renewal price matches.. but this will do for now
my $b_error = $cust_main->bill;
More information about the freeside-commits
mailing list