summaryrefslogtreecommitdiff
path: root/httemplate/misc/delete-quotation_pkg.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-11-06 16:48:16 -0800
committerIvan Kohler <ivan@freeside.biz>2014-11-06 16:48:16 -0800
commitb6538b4641f900da4892d8c44292befb71188822 (patch)
tree616c97d6bc3f7329674d7ee67ef1c83c4d19f78b /httemplate/misc/delete-quotation_pkg.html
parent8fa2d4df960414f50c33f1c0e57a9bab02db517e (diff)
delete packages from quotations, RT#30313
Diffstat (limited to 'httemplate/misc/delete-quotation_pkg.html')
-rw-r--r--httemplate/misc/delete-quotation_pkg.html21
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 0000000..5a44d37
--- /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>