2 (<% "$payby$payinfo" %>)
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 by [_1]",$cust_refund->otaker);
18 $refund = '<B><FONT COLOR="#FF0000">'
19 . mt("Unapplied Refund by [_1]",$cust_refund->otaker)
21 if $cust_refund->unapplied > 0;
24 ' ('. include('/elements/popup_link.html',
25 'label' => mt('view receipt'),
26 'action' => "${p}view/cust_refund.html?link=popup;".
27 'refundnum='. $cust_refund->refundnum,
28 'actionlabel' => mt('Payment Receipt'),
34 $delete = areyousure_link("${p}misc/delete-cust_refund.cgi?".$cust_refund->refundnum,
35 mt('Are you sure you want to delete this refund?'),
36 mt('Delete this refund from the database completely - not recommended'),
39 if ( $cust_refund->closed !~ /^Y/i && $opt{'deleterefunds'}
40 && $curuser->access_right('Delete refund') );