From d7ae630be5b8ee3aa3b8d15b26ea29876fcd43cb Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 6 Nov 2014 16:48:16 -0800 Subject: delete packages from quotations, RT#30313 --- httemplate/misc/delete-quotation_pkg.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 httemplate/misc/delete-quotation_pkg.html (limited to 'httemplate/misc/delete-quotation_pkg.html') diff --git a/httemplate/misc/delete-quotation_pkg.html b/httemplate/misc/delete-quotation_pkg.html new file mode 100644 index 000000000..5a44d3728 --- /dev/null +++ b/httemplate/misc/delete-quotation_pkg.html @@ -0,0 +1,21 @@ +% if ( $error ) { +% errorpage($error); +% } else { +<% $cgi->redirect($p. "view/quotation.html?". $quotationnum) %> +% } +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Generate quotation'); #separate ACL for editing it later? too silly for us yet + +#untaint quotationpkgnum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/ or die "Illegal quotationpkgnum"; +my $quotationpkgnum = $1; + +my $quotation_pkg = qsearchs('quotation_pkg',{'quotationpkgnum'=>$quotationpkgnum}); +my $quotationnum = $quotation_pkg->quotationnum; + +my $error = $quotation_pkg->delete; + + -- cgit v1.2.1