summaryrefslogtreecommitdiff
path: root/httemplate/misc/delete-vend_bill.html
blob: d1d58cea6dc2e5c98bf894a0d429ec2a3391c463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
% if ( $error ) {
%   errorpage($error);
% } else {
<% $cgi->redirect($p. "search/vend_bill.html") %>
% }
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

#untaint vendbillnum
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/ || die "Illegal vendbillnum";
my $vendbillnum = $1;

my $vend_bill = qsearchs('vend_bill',{'vendbillnum'=>$vendbillnum});

my $error = $vend_bill->delete;

</%init>