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