summaryrefslogtreecommitdiff
path: root/httemplate/misc/void-cust_bill.cgi
diff options
context:
space:
mode:
authorIrina Todeva <itodeva@hostgator.com>2015-10-08 15:45:09 -0600
committerMark Wells <mark@freeside.biz>2015-11-03 12:28:14 -0800
commitb5d5f7680d0736ff0150b337cd29026135fb2e34 (patch)
tree9b1f5b78b47e7ff5d94015378930be23debe91d9 /httemplate/misc/void-cust_bill.cgi
parent1ef811033e1ea791388c7c8d15a3a5a720b1f37f (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_bill.cgi')
-rwxr-xr-xhttemplate/misc/void-cust_bill.cgi46
1 files changed, 46 insertions, 0 deletions
diff --git a/httemplate/misc/void-cust_bill.cgi b/httemplate/misc/void-cust_bill.cgi
new file mode 100755
index 000000000..213cf9566
--- /dev/null
+++ b/httemplate/misc/void-cust_bill.cgi
@@ -0,0 +1,46 @@
+<& /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' => 'X',
+ '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>