1 <% $pre %>Refund<% $post %>
2 (<% $payby. $payinfo %>)
3 by <% $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 =~ s/^BILL$/Check #/ if $payinfo;
16 $payby =~ s/^BILL$/Check/;
17 $payby =~ s/^CHEK$/Electronic check /;
18 $payby =~ s/^(CARD|COMP)$/$1 /;
20 my($pre, $post) = ('', '');
21 if ( $cust_refund->unapplied > 0 ) {
22 $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
23 $post = '</FONT></B>';
27 ' ('. include('/elements/popup_link.html',
28 'label' => 'view receipt',
29 'action' => "${p}view/cust_refund.html?link=popup;".
30 'refundnum='. $cust_refund->refundnum,
31 'actionlabel' => 'Payment Receipt',
37 if ( $cust_refund->closed !~ /^Y/i
38 && $opt{'deleterefunds'}
39 && $curuser->access_right('Delete refund')
42 $delete = qq! (<A HREF="javascript:areyousure('!.
43 qq!${p}misc/delete-cust_refund.cgi?!. $cust_refund->refundnum.
44 qq!', 'Are you sure you want to delete this refund?')"!.
45 qq! TITLE="Delete this refund from the database completely - not recommended"!.