1 <% $pre %>Refund<% $post %>
2 (<% $payby. $payinfo %>)
3 by <% $cust_refund->otaker %><% $view %><% $delete %>
6 my( $cust_refund, %opt ) = @_;
8 my $conf = new FS::Conf;
9 my $curuser = $FS::CurrentUser::CurrentUser;
11 my $payby = $cust_refund->payby;
12 my $payinfo = $payby eq 'CARD'
13 ? $cust_refund->paymask
14 : $cust_refund->payinfo;
16 $payby =~ s/^BILL$/Check #/ if $payinfo;
17 $payby =~ s/^BILL$/Check/;
18 $payby =~ s/^CHEK$/Electronic check /;
19 $payby =~ s/^(CARD|COMP)$/$1 /;
21 my($pre, $post) = ('', '');
22 if ( $cust_refund->unapplied > 0 ) {
23 $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
24 $post = '</FONT></B>';
28 ' ('. include('/elements/popup_link.html',
29 'label' => 'view receipt',
30 'action' => "${p}view/cust_refund.html?link=popup;".
31 'refundnum='. $cust_refund->refundnum,
32 'actionlabel' => 'Payment Receipt',
38 if ( $cust_refund->closed !~ /^Y/i
39 && $conf->exists('deleterefunds')
40 && $curuser->access_right('Delete refund')
43 $delete = qq! (<A HREF="javascript:areyousure('!.
44 qq!${p}misc/delete-cust_refund.cgi?!. $cust_refund->refundnum.
45 qq!', 'Are you sure you want to delete this refund?')"!.
46 qq! TITLE="Delete this refund from the database completely - not recommended"!.