[freeside-commits] freeside/FS/FS/Cron bill.pm,1.25,1.26

Ivan,,, ivan at wavetail.420.am
Fri Jul 17 15:26:40 PDT 2009


Update of /home/cvs/cvsroot/freeside/FS/FS/Cron
In directory wavetail.420.am:/tmp/cvs-serv30598/FS/FS/Cron

Modified Files:
	bill.pm 
Log Message:
commit pkgpart exclusion for billing run, RT#5495

Index: bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Cron/bill.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- bill.pm	30 Jun 2009 12:28:38 -0000	1.25
+++ bill.pm	17 Jul 2009 22:26:38 -0000	1.26
@@ -21,6 +21,7 @@
 #  -l: debugging level
 #  -m: Experimental multi-process mode uses the job queue for multi-process and/or multi-machine billing.
 #  -r: Multi-process mode dry run option
+#  -g: Don't bill these pkgparts
 
 sub bill {
   my %opt = @_;
@@ -39,6 +40,9 @@
 
   $opt{'invoice_time'} = $opt{'n'} ? $^T : $opt{'time'};
 
+  my $not_pkgpart = $opt{g} ? { map { $_=>1 } split(/,\s*/, $opt{g}) }
+                            : {};
+
   ###
   # get a list of custnums
   ###
@@ -74,6 +78,7 @@
                                  #(not, when using -m, freeside-queued)
           'check_freq'   => $check_freq,
           'resetup'      => ( $opt{'s'} ? $opt{'s'} : 0 ),
+          'not_pkgpart'  => $not_pkgpart,
       );
 
       if ( $opt{'m'} ) {
@@ -152,6 +157,8 @@
   push @search, "cust_main.agentnum =  ". $opt{'a'}
     if $opt{'a'};
 
+  #it would be useful if i recognized $opt{g} / $not_pkgpart...
+
   if ( @ARGV ) {
     push @search, "( ".
       join(' OR ', map "cust_main.custnum = $_", @ARGV ).



More information about the freeside-commits mailing list