projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb8d487
)
freeside-daily -g and -m cooperation (and no HASH() queue noise with -m)
author
ivan
<ivan>
Thu, 8 Oct 2009 06:00:18 +0000
(06:00 +0000)
committer
ivan
<ivan>
Thu, 8 Oct 2009 06:00:18 +0000
(06:00 +0000)
FS/FS/Cron/bill.pm
patch
|
blob
|
history
FS/FS/cust_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Cron/bill.pm
b/FS/FS/Cron/bill.pm
index
d727d92
..
dbb6c66
100644
(file)
--- a/
FS/FS/Cron/bill.pm
+++ b/
FS/FS/Cron/bill.pm
@@
-40,8
+40,9
@@
sub bill {
$opt{'invoice_time'} = $opt{'n'} ? $^T : $opt{'time'};
$opt{'invoice_time'} = $opt{'n'} ? $^T : $opt{'time'};
- my $not_pkgpart = $opt{g} ? { map { $_=>1 } split(/,\s*/, $opt{g}) }
- : {};
+ #hashref here doesn't work with -m
+ #my $not_pkgpart = $opt{g} ? { map { $_=>1 } split(/,\s*/, $opt{g}) }
+ # : {};
###
# get a list of custnums
###
# get a list of custnums
@@
-78,7
+79,7
@@
sub bill {
#(not, when using -m, freeside-queued)
'check_freq' => $check_freq,
'resetup' => ( $opt{'s'} ? $opt{'s'} : 0 ),
#(not, when using -m, freeside-queued)
'check_freq' => $check_freq,
'resetup' => ( $opt{'s'} ? $opt{'s'} : 0 ),
- 'not_pkgpart' => $not_pkgpart,
+ 'not_pkgpart' => $
opt{'g'}, #$
not_pkgpart,
);
if ( $opt{'m'} ) {
);
if ( $opt{'m'} ) {
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
8ec1275
..
8dcbd8d
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-2462,7
+2462,7
@@
An array ref of specific packages (objects) to attempt billing, instead trying a
=item not_pkgpart
=item not_pkgpart
-A hashref of pkgparts to exclude from this billing run.
+A hashref of pkgparts to exclude from this billing run
(can also be specified as a comma-separated scalar)
.
=item invoice_time
=item invoice_time
@@
-2489,6
+2489,10
@@
sub bill {
my $invoice_time = $options{'invoice_time'} || $time;
$options{'not_pkgpart'} ||= {};
my $invoice_time = $options{'invoice_time'} || $time;
$options{'not_pkgpart'} ||= {};
+ $options{'not_pkgpart'} = { map { $_ => 1 }
+ split(/\s*,\s*/, $options{'not_pkgpart'})
+ }
+ unless ref($options{'not_pkgpart'});
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';