summaryrefslogtreecommitdiff
path: root/FS/FS/Cron/bill.pm
diff options
context:
space:
mode:
authorivan <ivan>2007-06-09 00:43:14 +0000
committerivan <ivan>2007-06-09 00:43:14 +0000
commit893a697cfa7c60c9663057a02a251e7397813acc (patch)
treeacc96673b4b19faca9a3b83e1f4044cdfb6cbb81 /FS/FS/Cron/bill.pm
parent72b2e7ea624fe1a436ffdd325df83ac7c1f193f0 (diff)
skycatcher modifications for pre-printing invoices, but with today's date
Diffstat (limited to 'FS/FS/Cron/bill.pm')
-rw-r--r--FS/FS/Cron/bill.pm7
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;