diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-11-06 16:48:16 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-11-06 16:50:06 -0800 |
commit | d7ae630be5b8ee3aa3b8d15b26ea29876fcd43cb (patch) | |
tree | 4aad85ddcbc1944cccae074dd9af4d3229506cb5 /httemplate/misc/delete-quotation_pkg.html | |
parent | 6a0ca9cada89d08efe9d9e7a9e2fa4365a0a1b6a (diff) |
delete packages from quotations, RT#30313
Diffstat (limited to 'httemplate/misc/delete-quotation_pkg.html')
-rw-r--r-- | httemplate/misc/delete-quotation_pkg.html | 21 |
1 files changed, 21 insertions, 0 deletions
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; + +</%init> |