summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2009-12-21 02:00:54 +0000
committerivan <ivan>2009-12-21 02:00:54 +0000
commit45c6b7021b30c49742b578a2f3ba13fb35f5222c (patch)
tree6d3d9d11b3d1ca92f9b11d04293a004b6b66eeb7 /httemplate
parent20703eb9d093a1a3ba00929188a25b20e9a2526e (diff)
have 'Bill now' link cancel expired (and suspend adjourned) packages, and catch and return errors in all cases, RT#6627
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/misc/bill.cgi13
1 files changed, 3 insertions, 10 deletions
diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi
index 3c3c48c54..6151dce51 100755
--- a/httemplate/misc/bill.cgi
+++ b/httemplate/misc/bill.cgi
@@ -17,21 +17,16 @@ die "Can't find customer!\n" unless $cust_main;
my $conf = new FS::Conf;
-my $error = $cust_main->bill(
-# 'time'=>$time
- );
+my $error = $cust_main->bill_and_collect( 'fatal' => 'return',
+ 'retry' => 'yes',
+ );
-unless ( $error ) {
- $error = $cust_main->apply_payments_and_credits
- || $cust_main->collect(
#'invoice-time'=>$time,
#'batch_card'=> 'yes',
#'batch_card'=> 'no',
#'report_badcard'=> 'yes',
#'retry_card' => 'yes',
- 'retry' => 'yes',
-
#this is used only by cust_main::batch_card
#need to pick & create an actual config
#value if we're going to turn this on
@@ -39,7 +34,5 @@ unless ( $error ) {
# "backend-realtime" is for something
# entirely different)
#'realtime' => $conf->exists('realtime-backend'),
- );
-}
</%init>