-<% include('elements/search.html',
+<& elements/search.html,
'title' => 'Batch payment details',
'name' => 'batch details',
'query' => $sql_query,
'link_onclicks' => [ ('') x 8,
$sub_receipt
],
- )
-%>
+&>
<%init>
my $conf = new FS::Conf;
}
if ( not $cgi->param('dcln') ) {
- push @search, "cpb.status IS DISTINCT FROM 'Approved'";
+ push @search, "cust_pay_batch.status IS DISTINCT FROM 'Approved'";
}
my ($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
my $search = ' WHERE ' . join(' AND ', @search);
-$count_query = 'SELECT COUNT(*) FROM cust_pay_batch AS cpb ' .
+$count_query = 'SELECT COUNT(*) FROM cust_pay_batch ' .
'LEFT JOIN cust_main USING ( custnum ) ' .
'LEFT JOIN pay_batch USING ( batchnum )' .
$search;