internationalization/localization, RT12515
[freeside.git] / httemplate / view / cust_main / payment_history / refund.html
1 <% $refund %>
2 (<% $payby. $payinfo %>)
3 <% mt('by') |h %> <% $cust_refund->otaker %><% $view %><% $delete %>
4 <%init>
5
6 my( $cust_refund, %opt ) = @_;
7
8 my $curuser = $FS::CurrentUser::CurrentUser;
9
10 my $payby = $cust_refund->payby;
11 my $payinfo = $payby eq 'CARD'
12                 ? $cust_refund->paymask
13                 : $cust_refund->payinfo;
14
15 $payby = translate_payby_refund($payby,$payinfo);
16
17 my $refund = mt('Refund');
18 $refund = '<B><FONT COLOR="#FF0000">' . mt('Unapplied Refund') . '</FONT></B>' 
19     if $cust_refund->unapplied > 0;
20
21 my $view =
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'),
27                ).
28    ')';
29
30
31 my $delete = '';
32 if ( $cust_refund->closed !~ /^Y/i
33      && $opt{'deleterefunds'}
34      && $curuser->access_right('Delete refund')
35    )
36 {
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>)";
42 }
43
44 </%init>
45