[freeside-commits] freeside/FS/FS cust_pkg.pm,1.83,1.84

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Sep 17 23:32:52 PDT 2007


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

Modified Files:
	cust_pkg.pm 
Log Message:
allow assignment of auto recharge values AND rollover

Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- cust_pkg.pm	7 Sep 2007 03:45:16 -0000	1.83
+++ cust_pkg.pm	18 Sep 2007 06:32:50 -0000	1.84
@@ -1754,6 +1754,26 @@
   }
 }
 
+=item recharge USAGE_VALUE_HASHREF 
+
+USAGE_VALUE_HASHREF is a hashref of svc_acct usage columns and the amounts
+to which they should be set (see L<FS::svc_acct>).  Currently seconds,
+upbytes, downbytes, and totalbytes are appropriate keys.
+
+All svc_accts which are part of this package have their values incremented.
+
+=cut
+
+sub recharge {
+  my ($self, $valueref) = @_;
+
+  foreach my $cust_svc ($self->cust_svc){
+    my $svc_x = $cust_svc->svc_x;
+    $svc_x->recharge($valueref)
+      if $svc_x->can("recharge");
+  }
+}
+
 =back
 
 =head1 BUGS



More information about the freeside-commits mailing list