diff options
Diffstat (limited to 'httemplate/misc/unapply-cust_credit.cgi')
-rwxr-xr-x | httemplate/misc/unapply-cust_credit.cgi | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/httemplate/misc/unapply-cust_credit.cgi b/httemplate/misc/unapply-cust_credit.cgi index c658d2acc..56a3ff854 100755 --- a/httemplate/misc/unapply-cust_credit.cgi +++ b/httemplate/misc/unapply-cust_credit.cgi @@ -1,18 +1,19 @@ -<% +% +% +%#untaint crednum +%my($query) = $cgi->keywords; +%$query =~ /^(\d+)$/ || die "Illegal crednum"; +%my $crednum = $1; +% +%my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ); +%my $custnum = $cust_credit->custnum; +% +%foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) { +% my $error = $cust_credit_bill->delete; +% eidiot($error) if $error; +%} +% +%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum); +% +% -#untaint crednum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal crednum"; -my $crednum = $1; - -my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ); -my $custnum = $cust_credit->custnum; - -foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) { - my $error = $cust_credit_bill->delete; - eidiot($error) if $error; -} - -print $cgi->redirect($p. "view/cust_main.cgi?". $custnum); - -%> |