From f24c4bebce257bfcc61ba07fd3d16c5c0d730071 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 31 Jul 2012 23:02:14 -0700 Subject: invoice voiding, RT#18677 --- httemplate/misc/process/void-cust_bill.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 httemplate/misc/process/void-cust_bill.html (limited to 'httemplate/misc/process') diff --git a/httemplate/misc/process/void-cust_bill.html b/httemplate/misc/process/void-cust_bill.html new file mode 100755 index 000000000..f2930ec01 --- /dev/null +++ b/httemplate/misc/process/void-cust_bill.html @@ -0,0 +1,22 @@ +%if ( $error ) { +% $cgi->param('error', $error); +<% $cgi->redirect(popurl(1). "void-cust_bill.html?". $cgi->query_string ) %> +%} else { +<% $cgi->redirect(popurl(3). "view/cust_main.cgi?". $custnum) %> +%} +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Void invoices'); + +#untaint invnum +$cgi->param('invnum') =~ /^(\d+)$/ || die "Illegal invnum"; +my $invnum = $1; + +my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); + +my $custnum = $cust_bill->custnum; + +my $error = $cust_bill->void( $cgi->param('reason') ); + + -- cgit v1.2.1 From bec3b6c2bf97d66b992866d7ee7295f1f05452e6 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 1 Aug 2012 14:01:14 -0700 Subject: invoice voiding, RT#18677 --- httemplate/misc/process/void-cust_bill.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/process') diff --git a/httemplate/misc/process/void-cust_bill.html b/httemplate/misc/process/void-cust_bill.html index f2930ec01..899901a50 100755 --- a/httemplate/misc/process/void-cust_bill.html +++ b/httemplate/misc/process/void-cust_bill.html @@ -2,7 +2,11 @@ % $cgi->param('error', $error); <% $cgi->redirect(popurl(1). "void-cust_bill.html?". $cgi->query_string ) %> %} else { -<% $cgi->redirect(popurl(3). "view/cust_main.cgi?". $custnum) %> +<& /elements/header-popup.html, 'Invoice voided' &> + + %} <%init> -- cgit v1.2.1