From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/misc/bill.cgi | 74 +++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 36 deletions(-) (limited to 'httemplate/misc/bill.cgi') diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi index 44d85b880..1532a44eb 100755 --- a/httemplate/misc/bill.cgi +++ b/httemplate/misc/bill.cgi @@ -1,38 +1,40 @@ -<% +% +% +%#untaint custnum +%my($query) = $cgi->keywords; +%$query =~ /^(\d*)$/; +%my $custnum = $1; +%my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); +%die "Can't find customer!\n" unless $cust_main; +% +%my $error = $cust_main->bill( +%# 'time'=>$time +% ); +%#&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', +% #'retry_card' => 'yes', +% 'retry' => 'yes', +% ); +%} +%#&eidiot($error) if $error; +% +%if ( $error ) { +% -#untaint custnum -my($query) = $cgi->keywords; -$query =~ /^(\d*)$/; -my $custnum = $1; -my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -die "Can't find customer!\n" unless $cust_main; - -my $error = $cust_main->bill( -# 'time'=>$time - ); -#&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', - #'retry_card' => 'yes', - 'retry' => 'yes', - ); -} -#&eidiot($error) if $error; - -if ( $error ) { -%> -<% - &idiot($error); -} else { - print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum"); -} -%> +% +% &idiot($error); +%} else { +% print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum"); +%} +% + -- cgit v1.2.1 From 6af1b1bfa25e5ececef5e0dcd38b55917121cee2 Mon Sep 17 00:00:00 2001 From: jeff Date: Sat, 26 Aug 2006 23:15:14 +0000 Subject: batch refactor continued --- httemplate/misc/bill.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/bill.cgi') diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi index 1532a44eb..6e4cc265d 100755 --- a/httemplate/misc/bill.cgi +++ b/httemplate/misc/bill.cgi @@ -1,5 +1,4 @@ % -% %#untaint custnum %my($query) = $cgi->keywords; %$query =~ /^(\d*)$/; @@ -7,6 +6,8 @@ %my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); %die "Can't find customer!\n" unless $cust_main; % +%my $conf = new FS::Conf; +% %my $error = $cust_main->bill( %# 'time'=>$time % ); @@ -23,6 +24,7 @@ % #'report_badcard'=> 'yes', % #'retry_card' => 'yes', % 'retry' => 'yes', +% 'realtime' => $conf->exists('realtime-backend'), % ); %} %#&eidiot($error) if $error; -- cgit v1.2.1 From 05686487551e26418c9b2d6b92ea0d89bb100082 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 21 Jan 2007 21:45:29 +0000 Subject: Have lineitem-specific applications happen in all cases; add weightsto control --- httemplate/misc/bill.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/misc/bill.cgi') diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi index 6e4cc265d..8d4b4ac65 100755 --- a/httemplate/misc/bill.cgi +++ b/httemplate/misc/bill.cgi @@ -14,8 +14,7 @@ %#&eidiot($error) if $error; % %unless ( $error ) { -% $cust_main->apply_payments; -% $cust_main->apply_credits; +% $cust_main->apply_payments_and_credits; % % $error = $cust_main->collect( % # 'invoice-time'=>$time, -- cgit v1.2.1