[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 3639f310be1be6953fe04b4da9296f6cdedb27d9

Mark Wells mark at 420.am
Mon Jul 22 18:10:03 PDT 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  3639f310be1be6953fe04b4da9296f6cdedb27d9 (commit)
      from  79be33a1c66fd9ba7d2da685b3a487fff172c252 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3639f310be1be6953fe04b4da9296f6cdedb27d9
Author: Mark Wells <mark at freeside.biz>
Date:   Mon Jul 22 18:07:58 2013 -0700

    change behavior of disable_cron_billing option, #19873

diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm
index 8dc2add..df4b6e7 100644
--- a/FS/FS/Cron/bill.pm
+++ b/FS/FS/Cron/bill.pm
@@ -41,9 +41,10 @@ sub bill {
   #$FS::cust_event::DEBUG = $opt{'l'} if $opt{'l'};
 
   my $conf = new FS::Conf;
+  my $disable_bill = 0;
   if ( $conf->exists('disable_cron_billing') ) {
     warn "disable_cron_billing set, skipping billing\n" if $debug;
-    return;
+    $disable_bill = 1;
   }
 
   #we're at now now (and later).
@@ -127,7 +128,11 @@ sub bill {
       } else {
 
         my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } );
-        $cust_main->bill_and_collect( %args, 'debug' => $debug );
+        if ( $disable_bill ) {
+          $cust_main->collect( %args, 'debug' => $debug );
+        } else {
+          $cust_main->bill_and_collect( %args, 'debug' => $debug );
+        }
 
       }
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Cron/bill.pm |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list