summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorivan <ivan>2009-12-21 02:00:56 +0000
committerivan <ivan>2009-12-21 02:00:56 +0000
commite66bb1fd7c14904103fbf28daa1d9370ad36beba (patch)
tree7f6a541e890e7afd5cb0857cfe69b055a463d836 /httemplate/misc
parentdc485c3877e043ebe0581e42356fb3e7256eb2e8 (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/misc')
-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>