2 (<% $payby. $payinfo %>)
3 <% mt('by') |h %> <% $cust_refund->otaker %><% $view %><% $delete %>
6 my( $cust_refund, %opt ) = @_;
8 my $curuser = $FS::CurrentUser::CurrentUser;
10 my $payby = $cust_refund->payby;
11 my $payinfo = $payby eq 'CARD'
12 ? $cust_refund->paymask
13 : $cust_refund->payinfo;
15 $payby = translate_payby_refund($payby,$payinfo);
17 my $refund = mt('Refund');
18 $refund = '<B><FONT COLOR="#FF0000">' . mt('Unapplied Refund') . '</FONT></B>'
19 if $cust_refund->unapplied > 0;
22 ' ('. include('/elements/popup_link.html',
23 'label' => mt('view receipt'),
24 'action' => "${p}view/cust_refund.html?link=popup;".
25 'refundnum='. $cust_refund->refundnum,
26 'actionlabel' => mt('Payment Receipt'),
32 if ( $cust_refund->closed !~ /^Y/i
33 && $opt{'deleterefunds'}
34 && $curuser->access_right('Delete refund')
37 $delete = qq! (<A HREF="javascript:areyousure('!.
38 qq!${p}misc/delete-cust_refund.cgi?!. $cust_refund->refundnum.
39 qq!', 'Are you sure you want to delete this refund?')"!.
40 qq! TITLE="!.mt('Delete this refund from the database completely - not recommended').
41 ">".mt('delete')."</A>)";