diff options
Diffstat (limited to 'FS/FS/Cron/bill.pm')
-rw-r--r-- | FS/FS/Cron/bill.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 4d77fd08d..9926fea9e 100644 --- a/FS/FS/Cron/bill.pm +++ b/FS/FS/Cron/bill.pm @@ -24,6 +24,8 @@ sub bill { my($time)= $opt{'d'} ? str2time($opt{'d'}) : $^T; $time += $opt{'y'} * 86400 if $opt{'y'}; + my $invoice_time = $opt{'n'} ? $^T : $time; + # select * from cust_main where my $where_pkg = <<"END"; 0 < ( select count(*) from cust_pkg @@ -102,8 +104,9 @@ END if $error; } - my $error = $cust_main->bill( 'time' => $time, - 'resetup' => $opt{'s'}, + my $error = $cust_main->bill( 'time' => $time, + 'invoice_time' => $invoice_time, + 'resetup' => $opt{'s'}, ); warn "Error billing, custnum ". $cust_main->custnum. ": $error" if $error; |