[freeside-commits] freeside/FS/bin freeside-prepaidd,1.1,1.2

Ivan,,, ivan at wavetail.420.am
Sat Oct 21 22:18:39 PDT 2006


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

Modified Files:
	freeside-prepaidd 
Log Message:
add price plan option for prepaid packages to cancel instead of suspend

Index: freeside-prepaidd
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-prepaidd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- freeside-prepaidd	21 Sep 2005 12:47:49 -0000	1.1
+++ freeside-prepaidd	22 Oct 2006 05:18:37 -0000	1.2
@@ -37,8 +37,12 @@
                      " AND ( cancel IS NULL OR cancel = 0)"
     } )
   ) {
-    my $error = $cust_pkg->suspend;
-    warn "Error suspended package ". $cust_pkg->pkgnum.
+
+    my $action = $cust_pkg->part_pkg->option('recur_action') || 'suspend';
+
+    my $error = $cust_pkg->$action();
+
+    warn "Error ${action}ing package ". $cust_pkg->pkgnum.
          " for custnum ". $cust_pkg->custnum.
          ": $error\n"
       if $error;
@@ -65,8 +69,8 @@
 
 =head1 DESCRIPTION
 
-Runs continuously and suspendes any prepaid customer packages which have
-passed their renewal date (next bill date).
+Runs continuously and suspends or cancels any prepaid customer packages which
+have passed their renewal date (next bill date).
 
 =head1 SEE ALSO
 



More information about the freeside-commits mailing list