summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-08-01 14:04:50 -0700
committerIvan Kohler <ivan@freeside.biz>2012-08-01 14:04:50 -0700
commit4d6c465f4b32a49f8bce091f6cb5abb209123ec2 (patch)
tree2b86cf33e009c3806e360284b65092facc8d089e /httemplate
parentbec3b6c2bf97d66b992866d7ee7295f1f05452e6 (diff)
invoice voiding, RT#18677
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/view/cust_bill.cgi2
-rwxr-xr-xhttemplate/view/cust_bill_void.html20
-rwxr-xr-xhttemplate/view/quotation.html2
3 files changed, 19 insertions, 5 deletions
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index a8b4ac15c..95ce60b1d 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -166,8 +166,6 @@ die "Invoice #$invnum not found!" unless $cust_bill;
my $custnum = $cust_bill->custnum;
my $display_custnum = $cust_bill->cust_main->display_custnum;
-#my $printed = $cust_bill->printed;
-
my $link = "invnum=$invnum";
$link .= ';template='. uri_escape($template) if $template;
$link .= ';notice_name='. $notice_name if $notice_name;
diff --git a/httemplate/view/cust_bill_void.html b/httemplate/view/cust_bill_void.html
index 148c0ed7e..2c526747b 100755
--- a/httemplate/view/cust_bill_void.html
+++ b/httemplate/view/cust_bill_void.html
@@ -2,7 +2,19 @@
emt("View this customer (#[_1])",$display_custnum) => "${p}view/cust_main.cgi?$custnum",
) &>
-%#XXX something very big and obvious showing its voided...
+<SCRIPT TYPE="text/javascript">
+function areyousure(href, message) {
+ if (confirm(message) == true)
+ window.location.href = href;
+}
+</SCRIPT>
+<% areyousure_link("${p}misc/unvoid-cust_bill_void.html?invnum=". $cust_bill_void->invnum,
+ emt('Are you sure you want to unvoid this invoice?'),
+ emt('Unvoid this invoice'), #tooltip
+ emt('Unvoid this invoice') #link
+ )
+%>
+<BR><BR>
% #voided PDFs?
% #if ( $conf->exists('invoice_latex') ) {
@@ -11,6 +23,7 @@
%# <BR><BR>
% #}
+%#something very big and obvious showing its voided...
<DIV STYLE="color:#FF0000; font-size:1000%; font-weight:bold; z-index:100;
position: absolute; top: 300px; left: 130px;
zoom: 1; filter: alpha(opacity=25); opacity: 0.25;
@@ -58,4 +71,9 @@ my $display_custnum = $cust_bill_void->cust_main->display_custnum;
#my $link = "invnum=$invnum";
+sub areyousure_link {
+ my ($url,$msg,$title,$label) = (shift,shift,shift,shift);
+ '<A HREF="javascript:areyousure(\''.$url.'\',\''.$msg.'\')" TITLE="'.$title.'">'.$label.'</A>';
+}
+
</%init>
diff --git a/httemplate/view/quotation.html b/httemplate/view/quotation.html
index 461b5dfb6..a88acf82b 100755
--- a/httemplate/view/quotation.html
+++ b/httemplate/view/quotation.html
@@ -44,8 +44,6 @@ XXX resending quotations
% }
% #plaintext quotations? <PRE><% join('', $quotation->print_text() ) %></PRE>
-</%doc>
-
<& /elements/footer.html &>
<%init>