diff options
author | ivan <ivan> | 2001-10-15 12:16:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-10-15 12:16:42 +0000 |
commit | a984fa561b6493ae41215c3d26013767f9ce79cb (patch) | |
tree | 91545fa0be38a55c501d67a26ab58fb1c8054e9d /httemplate/misc/bill.cgi | |
parent | 05eafa5ab3ded207d716685b32edf6946187514a (diff) |
print reasons with credits on invoices
use straight eval, not Safe::reval in cust_main::bill for now, as i have no
idea how to call methods on a share()'ed scalar. hmm.
add cust_pkg::cust_main method
s/eidiot/idiot/ in httemplate/misc/bill.cgi
Diffstat (limited to 'httemplate/misc/bill.cgi')
-rwxr-xr-x | httemplate/misc/bill.cgi | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi index 43c7c576d..48da25562 100755 --- a/httemplate/misc/bill.cgi +++ b/httemplate/misc/bill.cgi @@ -1,12 +1,13 @@ <% -#<!-- $Id: bill.cgi,v 1.3 2001-09-03 22:07:39 ivan Exp $ --> +#<!-- $Id: bill.cgi,v 1.4 2001-10-15 12:16:42 ivan Exp $ --> use strict; use vars qw( $cgi $query $custnum $cust_main $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl eidiot); +#use FS::CGI qw(popurl eidiot); +use FS::CGI qw(popurl idiot); use FS::Record qw(qsearchs); use FS::cust_main; @@ -23,19 +24,24 @@ die "Can't find customer!\n" unless $cust_main; $error = $cust_main->bill( # 'time'=>$time ); -&eidiot($error) if $error; - -$cust_main->apply_payments; -$cust_main->apply_credits; - -$error = $cust_main->collect( -# 'invoice-time'=>$time, -# 'batch_card'=> 'yes', - 'batch_card'=> 'no', - 'report_badcard'=> 'yes', - ); -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum"); - +#&eidiot($error) if $error; + +unless ( $error ) { + $cust_main->apply_payments; + $cust_main->apply_credits; + + $error = $cust_main->collect( + # 'invoice-time'=>$time, + # 'batch_card'=> 'yes', + 'batch_card'=> 'no', + 'report_badcard'=> 'yes', + ); +} +#&eidiot($error) if $error; + +if ( $error ) { + &idiot($error); +} else { + print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum"); +} %> |