rename .cgi back to .html, #38532
authorMark Wells <mark@freeside.biz>
Wed, 4 Nov 2015 23:12:49 +0000 (15:12 -0800)
committerMark Wells <mark@freeside.biz>
Wed, 4 Nov 2015 23:12:49 +0000 (15:12 -0800)
httemplate/misc/process/void-cust_bill.html
httemplate/misc/void-cust_bill.cgi [deleted file]
httemplate/misc/void-cust_bill.html [changed mode: 0644->0755]
httemplate/misc/void-cust_credit.cgi [deleted file]
httemplate/misc/void-cust_credit.html [new file with mode: 0755]
httemplate/misc/void-cust_pay.cgi [deleted file]
httemplate/misc/void-cust_pay.html [new file with mode: 0755]
httemplate/view/cust_bill.cgi
httemplate/view/cust_main/payment_history/credit.html
httemplate/view/cust_main/payment_history/invoice.html
httemplate/view/cust_main/payment_history/payment.html

index c0f432b..7773b0b 100755 (executable)
@@ -1,6 +1,6 @@
 %if ( $error ) {
 %  $cgi->param('error', $error);
-<% $cgi->redirect(popurl(2). "void-cust_bill.cgi?". $cgi->query_string ) %>
+<% $cgi->redirect(popurl(2). "void-cust_bill.html?". $cgi->query_string ) %>
 %} else {
 <& /elements/header-popup.html, 'Invoice voided' &>
 <SCRIPT TYPE="text/javascript">
diff --git a/httemplate/misc/void-cust_bill.cgi b/httemplate/misc/void-cust_bill.cgi
deleted file mode 100755 (executable)
index e4e4705..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<& /elements/header-popup.html, mt('Void invoice') &>
-
-<% include('/elements/error.html') %>
-
-<% emt('Are you sure you want to void this invoice?') %>
-<BR><BR>
-
-<% emt("Invoice #[_1] ([_2])",$cust_bill->display_invnum, $money_char. $cust_bill->owed) %>
-<BR><BR>
-
-<FORM METHOD="POST" ACTION="process/void-cust_bill.html">
-<INPUT TYPE="hidden" NAME="invnum" VALUE="<% $invnum %>">
-
-<% ntable("#cccccc", 2) %>
-<& /elements/tr-select-reason.html,
-             'field'          => 'reasonnum',
-             'reason_class'   => 'I',
-             'cgi'            => $cgi
-&>
-
-</TABLE>
-
-<BR>
-<CENTER>
-<BUTTON TYPE="submit">Yes, void invoice</BUTTON>&nbsp;&nbsp;&nbsp;\
-<BUTTON TYPE="button" onClick="parent.cClick();">No, do not void invoice</BUTTON>
-</CENTER>
-
-</FORM>
-</BODY>
-</HTML>
-<%init>
-
-die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('Void invoices');
-
-my $conf = new FS::Conf;
-my $money_char = $conf->config('money_char') || '$';
-
-#untaint invnum
-$cgi->param('invnum') =~ /^(\d+)$/ || die "Illegal invnum";
-my $invnum = $1;
-
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-
-</%init>
old mode 100644 (file)
new mode 100755 (executable)
index 39b0712..e4e4705
 <INPUT TYPE="hidden" NAME="invnum" VALUE="<% $invnum %>">
 
 <% ntable("#cccccc", 2) %>
-<TR>
-  <TD ALIGN="right">Reason</TD>
-  <TD><INPUT TYPE="text" NAME="reason" VALUE="<% scalar($cgi->param('reason')) |h %>"></TD>
-</TR>
+<& /elements/tr-select-reason.html,
+             'field'          => 'reasonnum',
+             'reason_class'   => 'I',
+             'cgi'            => $cgi
+&>
 
 </TABLE>
 
diff --git a/httemplate/misc/void-cust_credit.cgi b/httemplate/misc/void-cust_credit.cgi
deleted file mode 100755 (executable)
index f352e60..0000000
+++ /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.cgi">
-<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 %>"> 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<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>
diff --git a/httemplate/misc/void-cust_credit.html b/httemplate/misc/void-cust_credit.html
new file mode 100755 (executable)
index 0000000..1e71f00
--- /dev/null
@@ -0,0 +1,74 @@
+%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 %>"> 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<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>
diff --git a/httemplate/misc/void-cust_pay.cgi b/httemplate/misc/void-cust_pay.cgi
deleted file mode 100755 (executable)
index dc0ff4d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-%if ( $success ) {
-<& /elements/header-popup.html, mt("Payment voided") &>
-  <SCRIPT TYPE="text/javascript">
-    window.top.location.reload();
-  </SCRIPT>
-  </BODY>
-</HTML>
-%} else {
-<& /elements/header-popup.html, mt('Void payment')  &>
-
-<& /elements/error.html &>
-
-<P ALIGN="center"><B><% mt('Void this payment?') |h %></B>
-
-<FORM action="<% ${p} %>misc/void-cust_pay.cgi">
-<INPUT TYPE="hidden" NAME="paynum" VALUE="<% $paynum %>">
-
-<TABLE BGCOLOR="#cccccc" BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto">
-<& /elements/tr-select-reason.html,
-             'field'          => 'reasonnum',
-             'reason_class'   => 'P',
-             'cgi'            => $cgi
-&>
-</TABLE>
-
-<BR>
-<P ALIGN="CENTER">
-<INPUT TYPE="submit" NAME="confirm_void_payment" VALUE="<% mt('Void payment') |h %>"> 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<INPUT TYPE="BUTTON" VALUE="<% mt("Don't void payment") |h %>" onClick="parent.cClick();"> 
-
-</FORM>
-</BODY>
-</HTML>
-
-%}
-<%init>
-
-#untaint paynum
-my $paynum = $cgi->param('paynum');
-if ($paynum) {
-  $paynum =~ /^(\d+)$/ || die "Illegal paynum";
-} else {
-  my($query) = $cgi->keywords;
-  $query =~ /^(\d+)/ || die "Illegal paynum";
-  $paynum = $1;
-}
-
-my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum}) || die "Payment not found";
-
-my $right = 'Void payments';
-$right = 'Credit card void' if $cust_pay->payby eq 'CARD';
-$right = 'Echeck void'      if $cust_pay->payby eq 'CHEK';
-
-die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right($right);
-
-my $success = 0;
-if ($cgi->param('confirm_void_payment')) {
-
-  #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_pay->void($reason) unless $error;
-  }
-
-  if ($error) {
-    $cgi->param('error',$error);
-  } else {
-    $success = 1;
-  }
-}
-
-</%init>
diff --git a/httemplate/misc/void-cust_pay.html b/httemplate/misc/void-cust_pay.html
new file mode 100755 (executable)
index 0000000..205d93a
--- /dev/null
@@ -0,0 +1,78 @@
+%if ( $success ) {
+<& /elements/header-popup.html, mt("Payment voided") &>
+  <SCRIPT TYPE="text/javascript">
+    window.top.location.reload();
+  </SCRIPT>
+  </BODY>
+</HTML>
+%} else {
+<& /elements/header-popup.html, mt('Void payment')  &>
+
+<& /elements/error.html &>
+
+<P ALIGN="center"><B><% mt('Void this payment?') |h %></B>
+
+<FORM action="<% ${p} %>misc/void-cust_pay.html">
+<INPUT TYPE="hidden" NAME="paynum" VALUE="<% $paynum %>">
+
+<TABLE BGCOLOR="#cccccc" BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto">
+<& /elements/tr-select-reason.html,
+             'field'          => 'reasonnum',
+             'reason_class'   => 'P',
+             'cgi'            => $cgi
+&>
+</TABLE>
+
+<BR>
+<P ALIGN="CENTER">
+<INPUT TYPE="submit" NAME="confirm_void_payment" VALUE="<% mt('Void payment') |h %>"> 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<INPUT TYPE="BUTTON" VALUE="<% mt("Don't void payment") |h %>" onClick="parent.cClick();"> 
+
+</FORM>
+</BODY>
+</HTML>
+
+%}
+<%init>
+
+#untaint paynum
+my $paynum = $cgi->param('paynum');
+if ($paynum) {
+  $paynum =~ /^(\d+)$/ || die "Illegal paynum";
+} else {
+  my($query) = $cgi->keywords;
+  $query =~ /^(\d+)/ || die "Illegal paynum";
+  $paynum = $1;
+}
+
+my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum}) || die "Payment not found";
+
+my $right = 'Void payments';
+$right = 'Credit card void' if $cust_pay->payby eq 'CARD';
+$right = 'Echeck void'      if $cust_pay->payby eq 'CHEK';
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right($right);
+
+my $success = 0;
+if ($cgi->param('confirm_void_payment')) {
+
+  #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_pay->void($reason) unless $error;
+  }
+
+  if ($error) {
+    $cgi->param('error',$error);
+  } else {
+    $success = 1;
+  }
+}
+
+</%init>
index 6d13974..d73edbd 100755 (executable)
@@ -17,7 +17,7 @@ function areyousure(href, message) {
     <& /elements/popup_link.html,
       'label'       => emt('Void this invoice'),
       'actionlabel' => emt('Void this invoice'),
-      'action'      => $p.'misc/void-cust_bill.cgi?invnum='.$invnum,
+      'action'      => $p.'misc/void-cust_bill.html?invnum='.$invnum,
     &>
 %   }
 %   if ( $can_void and $can_delete ) {
index 81be1cd..db2e5e5 100644 (file)
@@ -130,7 +130,7 @@ my $void = '';
 $void = ' ('.
                include( '/elements/popup_link.html',
                     'label'    => emt('void'),
-                    'action'   => "${p}misc/void-cust_credit.cgi?".
+                    'action'   => "${p}misc/void-cust_credit.html?".
                                   $cust_credit->crednum,
                     'actionlabel' => emt('Void credit'),
                 ).
index ca59c15..613936e 100644 (file)
@@ -27,7 +27,7 @@ if ( $cust_bill->closed !~ /^Y/i && $opt{'Void invoices'} ) {
   $void =
     ' ('. include('/elements/popup_link.html',
                     'label'     => emt('void'),
-                    'action'    => "${p}misc/void-cust_bill.cgi?;invnum=".
+                    'action'    => "${p}misc/void-cust_bill.html?;invnum=".
                                     $cust_bill->invnum,
                     'actionlabel' => emt('Void Invoice'),
                  ).
index 7701314..6c93f7b 100644 (file)
@@ -186,7 +186,7 @@ my $voidmsg = $cust_pay->payby =~ /^(CARD|CHEK|TOKN)$/
 $void = ' ('.
                include( '/elements/popup_link.html',
                     'label'    => emt('void'),
-                    'action'   => "${p}misc/void-cust_pay.cgi?".$cust_pay->paynum,
+                    'action'   => "${p}misc/void-cust_pay.html?".$cust_pay->paynum,
                     'actionlabel' => emt('Void payment'),
                 ).
           ')'