summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorivan <ivan>2009-10-04 02:09:15 +0000
committerivan <ivan>2009-10-04 02:09:15 +0000
commit1b6b6467cc475a4630e051269db83381a8b779ec (patch)
treef9e5ae66615ab1613c8355d2b9f40bfe460d2cf4 /httemplate/misc
parentbb2daacbcc74b97432afebf70776230a21fa59b6 (diff)
delete invoices, RT#4048
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/delete-cust_bill.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/httemplate/misc/delete-cust_bill.html b/httemplate/misc/delete-cust_bill.html
new file mode 100644
index 000000000..3a642b0e9
--- /dev/null
+++ b/httemplate/misc/delete-cust_bill.html
@@ -0,0 +1,21 @@
+% if ( $error ) {
+% errorpage($error);
+% } else {
+<% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
+% }
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Delete invoices');
+
+#untaint invnum
+my($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal crednum";
+my $invnum = $1;
+
+my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+my $custnum = $cust_bill->custnum;
+
+my $error = $cust_bill->delete;
+
+</%init>