diff options
author | ivan <ivan> | 2001-12-26 04:25:04 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-12-26 04:25:04 +0000 |
commit | d0f483f47168e01eb6c28e8fc99a62050b245132 (patch) | |
tree | c2b554e22ebdab4b8821b5c8600601166393a02e /httemplate/edit/process | |
parent | c6b853b4f0516450b3e27acd281f667eadaec9f4 (diff) |
auto-apply payments and credits, post credit UI overhaul
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-x | httemplate/edit/process/cust_credit.cgi | 7 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_pay.cgi | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/httemplate/edit/process/cust_credit.cgi b/httemplate/edit/process/cust_credit.cgi index b52d0bd46..2eb431bcc 100755 --- a/httemplate/edit/process/cust_credit.cgi +++ b/httemplate/edit/process/cust_credit.cgi @@ -1,5 +1,5 @@ <% -#<!-- $Id: cust_credit.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ --> +#<!-- $Id: cust_credit.cgi,v 1.3 2001-12-26 04:25:04 ivan Exp $ --> use strict; use vars qw( $cgi $custnum $new $error ); @@ -31,6 +31,11 @@ if ( $error ) { $cgi->param('error', $error); print $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string ); } else { + if ( $cgi->param('apply') eq 'yes' ) { + my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum }) + or die "unknown custnum $linknum"; + $cust_main->apply_payments; + } print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); } diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index 9be96505d..b2b3602db 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -1,5 +1,5 @@ <% -#<!-- $Id: cust_pay.cgi,v 1.3 2001-09-03 22:07:39 ivan Exp $ --> +#<!-- $Id: cust_pay.cgi,v 1.4 2001-12-26 04:25:04 ivan Exp $ --> use strict; use vars qw( $cgi $link $linknum $new $error ); @@ -38,6 +38,11 @@ if ($error) { } elsif ( $link eq 'invnum' ) { print $cgi->redirect(popurl(3). "view/cust_bill.cgi?$linknum"); } elsif ( $link eq 'custnum' ) { + if ( $cgi->param('apply') eq 'yes' ) { + my $cust_main = qsearchs('cust_main', { 'custnum' => $linknum }) + or die "unknown custnum $linknum"; + $cust_main->apply_payments; + } print $cgi->redirect(popurl(3). "view/cust_main.cgi?$linknum"); } |