2 (<% "$payby$payinfo" %>)
3 <% "$view$email$delete" %>
6 my( $cust_refund, %opt ) = @_;
8 my $payby = $cust_refund->payby;
9 my $payinfo = $payby eq 'CARD'
10 ? $cust_refund->paymask
11 : $cust_refund->payinfo;
12 $payby = translate_payby_refund($payby,$payinfo);
14 my $refund = emt("Refund by [_1]",$cust_refund->otaker);
15 $refund = '<B><FONT COLOR="#FF0000">'
16 . emt("Unapplied Refund by [_1]",$cust_refund->otaker)
18 if $cust_refund->unapplied > 0;
21 ' ('. include('/elements/popup_link.html',
22 'label' => emt('view receipt'),
23 'action' => "${p}view/cust_refund.html?link=popup;".
24 'refundnum='. $cust_refund->refundnum,
25 'actionlabel' => emt('Payment Receipt'),
29 my $email = $opt{'has_email_address'} ?
30 q! (<A HREF="javascript:void(0)" ONCLICK="areyousure_popup('Send email receipt for refund to customer?','!.
31 "${p}view/cust_refund.html?link=email;refundnum=".
32 $cust_refund->refundnum.
33 q!','Email Refund Receipt')" TITLE="Send email receipt">email receipt</A>)!
37 $delete = areyousure_link("${p}misc/delete-cust_refund.cgi?".$cust_refund->refundnum,
38 emt('Are you sure you want to delete this refund?'),
39 emt('Delete this refund from the database completely - not recommended'),
42 if $cust_refund->closed !~ /^Y/i
43 && $opt{'deleterefunds'}
44 && $opt{'Delete refund'};