: '';
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