summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/payment_history/invoice.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-31 23:02:14 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-31 23:02:14 -0700
commitf24c4bebce257bfcc61ba07fd3d16c5c0d730071 (patch)
treef6e908f55801cdfcb4db814f1365de12ef91e9bd /httemplate/view/cust_main/payment_history/invoice.html
parent6cce5ada4fbf1e9ad7debd0451336e8005c12195 (diff)
invoice voiding, RT#18677
Diffstat (limited to 'httemplate/view/cust_main/payment_history/invoice.html')
-rw-r--r--httemplate/view/cust_main/payment_history/invoice.html14
1 files changed, 13 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/payment_history/invoice.html b/httemplate/view/cust_main/payment_history/invoice.html
index 3028f0f69..96a9f5456 100644
--- a/httemplate/view/cust_main/payment_history/invoice.html
+++ b/httemplate/view/cust_main/payment_history/invoice.html
@@ -1,4 +1,4 @@
-<% $link %><% $invoice %><% $link ? '</A>' : '' %><% $delete %><% $under %>
+<% $link %><% $invoice %><% $link ? '</A>' : '' %><% "$void$delete$under" %>
<%init>
my( $cust_bill, %opt ) = @_;
@@ -26,6 +26,18 @@ my $link = $curuser->access_right('View invoices')
? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
: '';
+my $void = '';
+if ( $cust_bill->closed !~ /^Y/i && $curuser->access_right('Void invoices') ) {
+ $void =
+ ' ('. include('/elements/popup_link.html',
+ 'label' => emt('void'),
+ 'action' => "${p}misc/void-cust_bill.html?;invnum=".
+ $cust_bill->invnum,
+ 'actionlabel' => emt('Void Invoice'),
+ ).
+ ')';
+}
+
my $delete = '';
$delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum",
emt('Are you sure you want to delete this invoice?'),