X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Funapply-cust_pay.cgi;h=34c1ecfd3f75eee4519e1f2e3f8fa22397b7acf6;hp=8cdac180be1d87fe4b5945deeb8dfb129418ea76;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hpb=5e05724a635a22776f1b973f5d7e77989da4e048 diff --git a/httemplate/misc/unapply-cust_pay.cgi b/httemplate/misc/unapply-cust_pay.cgi index 8cdac180b..34c1ecfd3 100755 --- a/httemplate/misc/unapply-cust_pay.cgi +++ b/httemplate/misc/unapply-cust_pay.cgi @@ -1,4 +1,4 @@ -<% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %> +<% $cgi->redirect($p. "view/cust_main.cgi?custnum=". $custnum. ";show=payment_history") %> <%init> die "access denied" @@ -12,9 +12,7 @@ my $paynum = $1; my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ); my $custnum = $cust_pay->custnum; -foreach my $cust_bill_pay ( $cust_pay->cust_bill_pay ) { - my $error = $cust_bill_pay->delete; - errorpage($error) if $error; -} +my $error = $cust_pay->delete_cust_bill_pay; +errorpage($error) if $error;