<% $pre %>Refund<% $post %> (<% $payby. $payinfo %>) by <% $cust_refund->otaker %><% $view %><% $delete %> <%init> my( $cust_refund, %opt ) = @_; my $curuser = $FS::CurrentUser::CurrentUser; my $payby = $cust_refund->payby; my $payinfo = $payby eq 'CARD' ? $cust_refund->paymask : $cust_refund->payinfo; $payby =~ s/^BILL$/Check #/ if $payinfo; $payby =~ s/^BILL$/Check/; $payby =~ s/^CHEK$/Electronic check /; $payby =~ s/^(CARD|COMP)$/$1 /; my($pre, $post) = ('', ''); if ( $cust_refund->unapplied > 0 ) { $pre = 'Unapplied '; $post = ''; } my $view = ' ('. include('/elements/popup_link.html', 'label' => 'view receipt', 'action' => "${p}view/cust_refund.html?link=popup;". 'refundnum='. $cust_refund->refundnum, 'actionlabel' => 'Payment Receipt', ). ')'; my $delete = ''; if ( $cust_refund->closed !~ /^Y/i && $opt{'deleterefunds'} && $curuser->access_right('Delete refund') ) { $delete = qq! (delete)!; }