diff options
| author | Irina Todeva <itodeva@hostgator.com> | 2015-10-08 15:45:09 -0600 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2015-11-03 12:28:14 -0800 |
| commit | b5d5f7680d0736ff0150b337cd29026135fb2e34 (patch) | |
| tree | 9b1f5b78b47e7ff5d94015378930be23debe91d9 /httemplate/misc/void-cust_credit.html | |
| parent | 1ef811033e1ea791388c7c8d15a3a5a720b1f37f (diff) | |
Changes for being consistent in the payment history GUI on void credit /
payment / invoice links
renamed httemplate/misc/void-cust_credit.html to .cgi
renamed httemplate/misc/void-cust_bill.html to .cgi
Diffstat (limited to 'httemplate/misc/void-cust_credit.html')
| -rwxr-xr-x | httemplate/misc/void-cust_credit.html | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/httemplate/misc/void-cust_credit.html b/httemplate/misc/void-cust_credit.html deleted file mode 100755 index 1e71f0030..000000000 --- a/httemplate/misc/void-cust_credit.html +++ /dev/null @@ -1,74 +0,0 @@ -%if ( $success ) { -<& /elements/header-popup.html, mt("Credit voided") &> - <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); - </SCRIPT> - </BODY> -</HTML> -%} else { -<& /elements/header-popup.html, mt('Void credit') &> - -<& /elements/error.html &> - -<P ALIGN="center"><B><% mt('Void this credit?') |h %></B> - -<FORM action="<% ${p} %>misc/void-cust_credit.html"> -<INPUT TYPE="hidden" NAME="crednum" VALUE="<% $crednum %>"> - -<TABLE BGCOLOR="#cccccc" BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto"> -<& /elements/tr-select-reason.html, - 'field' => 'reasonnum', - 'reason_class' => 'X', - 'cgi' => $cgi -&> -</TABLE> - -<BR> -<P ALIGN="CENTER"> -<INPUT TYPE="submit" NAME="confirm_void_credit" VALUE="<% mt('Void credit') |h %>"> - -<INPUT TYPE="BUTTON" VALUE="<% mt("Don't void credit") |h %>" onClick="parent.cClick();"> - -</FORM> -</BODY> -</HTML> - -%} -<%init> - -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Void credit'); - -#untaint crednum -my $crednum = $cgi->param('crednum'); -if ($crednum) { - $crednum =~ /^(\d+)$/ || die "Illegal crednum"; -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)/ || die "Illegal crednum"; - $crednum = $1; -} - -my $cust_credit = qsearchs('cust_credit',{'crednum'=>$crednum}) || die "Credit not found"; - -my $success = 0; -if ($cgi->param('confirm_void_credit')) { - - #untaint reasonnum / create new reason - my ($reasonnum, $error) = $m->comp('process/elements/reason'); - if (!$reasonnum) { - $error = 'Reason required'; - } else { - my $reason = qsearchs('reason', { 'reasonnum' => $reasonnum }) - || die "Reason num $reasonnum not found in database"; - $error = $cust_credit->void($reason) unless $error; - } - - if ($error) { - $cgi->param('error',$error); - } else { - $success = 1; - } -} - -</%init> |
