],
'align' => 'rcllrrrrc',
'fields' => [ 'batchnum',
- sub {
- FS::payby->shortname(shift->payby);
- },
+ sub {
+ my $self = shift;
+ my $type = $self->type eq 'CREDIT' ? 'CREDIT' : '';
+ $type ." " . FS::payby->shortname($self->payby);
+ },
sub {
my $self = shift;
my $_date = $self->download;
if ( $_date ) {
time2str("%a %b %e %T %Y", $_date);
- } elsif ( $self->status eq 'O' ) {
- 'Download batch';
+ } elsif ( $self->status eq 'O' && $self->type eq 'CREDIT') {
+ 'Download credit batch';
+ } elsif ( $self->status eq 'O' && $self->type eq 'DEBIT') {
+ 'Download batch';
} else {
'';
}