Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / misc / delete-quotation_pkg.html
1 % if ( $error ) {
2 %   errorpage($error);
3 % } else {
4 <% $cgi->redirect($p. "view/quotation.html?". $quotationnum) %>
5 % }
6 <%init>
7
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right('Generate quotation'); #separate ACL for editing it later?  too silly for us yet
10
11 #untaint quotationpkgnum
12 my($query) = $cgi->keywords;
13 $query =~ /^(\d+)$/ or die "Illegal quotationpkgnum";
14 my $quotationpkgnum = $1;
15
16 my $quotation_pkg = qsearchs('quotation_pkg',{'quotationpkgnum'=>$quotationpkgnum});
17 my $quotationnum = $quotation_pkg->quotationnum;
18
19 my $error = $quotation_pkg->delete;
20
21 </%init>