internationalization/localization, RT12515
[freeside.git] / httemplate / view / cust_main / payment_history / invoice.html
index fe14d3e..29389ef 100644 (file)
@@ -20,13 +20,12 @@ my $link = $curuser->access_right('View invoices')
              : '';
 
 my $delete = '';
-if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') ) {
-  $delete = qq! (<A HREF="javascript:areyousure('!.
-            qq!${p}misc/delete-cust_bill.html?$invnum',!.
-            qq!'Are you sure you want to delete this invoice?')"!.
-            qq! TITLE="Delete this invoice from the database completely"!.
-            mt('delete') . '</A>)';
-}
+$delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum",
+                            mt('Are you sure you want to delete this invoice?'),
+                            mt('Delete this invoice from the database completely'),
+                            mt('delete')
+                        )
+    if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') );
 
 my $events = '';
 #1.9