projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't bill prepaid packages in freeside-daily, RT#26274
[freeside.git]
/
FS
/
FS
/
Cron
/
bill.pm
diff --git
a/FS/FS/Cron/bill.pm
b/FS/FS/Cron/bill.pm
index
98ce8fa
..
807d5cf
100644
(file)
--- 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;
#$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;
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).
}
#we're at now now (and later).
@@
-99,6
+100,7
@@
sub bill {
'resetup' => ( $opt{'s'} ? $opt{'s'} : 0 ),
'not_pkgpart' => $opt{'g'}, #$not_pkgpart,
'one_recur' => $opt{'o'},
'resetup' => ( $opt{'s'} ? $opt{'s'} : 0 ),
'not_pkgpart' => $opt{'g'}, #$not_pkgpart,
'one_recur' => $opt{'o'},
+ 'no_prepaid' => 1,
);
if ( $opt{'m'} ) {
);
if ( $opt{'m'} ) {
@@
-127,7
+129,11
@@
sub bill {
} else {
my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } );
} 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 );
+ }
}
}