X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fsearch%2Fpay_batch.cgi;h=8fe4351323b140919070b2db5603f535c8e81a14;hb=6f08493827f30fe18fd99c32bbb1625b064017ec;hp=620996abd4f0dd96620c23c5ea3e9759e8c02182;hpb=686ecf55b716396505eefde07593d7de3a423751;p=freeside.git diff --git a/httemplate/search/pay_batch.cgi b/httemplate/search/pay_batch.cgi index 620996abd..8fe435132 100755 --- a/httemplate/search/pay_batch.cgi +++ b/httemplate/search/pay_batch.cgi @@ -14,17 +14,30 @@ 'Type', 'First Download', 'Last Upload', - '', # requests - '', # req amt - '', # payments - '', # pay amt + { label => 'Requested', colspan => 2 }, + '', + { label => 'Paid', colspan => 2 }, + '', 'Status', ], + 'header2' => [ '', + '', + '', + '', + '', + 'Items', + 'Amount', + 'Items', + 'Amount', + '', + ], '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; @@ -49,7 +62,7 @@ }, sub { my $c = FS::cust_pay_batch->count('batchnum = '.$_[0]->batchnum); - $c ? "$c requested" : '' + $c || '' }, sub { my $st = "SELECT SUM(amount) from cust_pay_batch WHERE batchnum=" . shift->batchnum; @@ -62,7 +75,7 @@ }, sub { my $c = FS::cust_pay->count('batchnum = '.$_[0]->batchnum); - $c ? "$c paid" : '' + $c || ''; }, sub { my $st = "SELECT SUM(paid) from cust_pay WHERE batchnum=" . shift->batchnum;