projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
broadband_nas export, #15284
[freeside.git]
/
httemplate
/
search
/
cust_pay_batch.cgi
diff --git
a/httemplate/search/cust_pay_batch.cgi
b/httemplate/search/cust_pay_batch.cgi
index
8022d46
..
f382644
100755
(executable)
--- a/
httemplate/search/cust_pay_batch.cgi
+++ b/
httemplate/search/cust_pay_batch.cgi
@@
-3,10
+3,8
@@
'name' => 'batch details',
'query' => $sql_query,
'count_query' => $count_query,
'name' => 'batch details',
'query' => $sql_query,
'count_query' => $count_query,
- 'html_init' => $pay_batch ?
- include('elements/cust_pay_batch_top.html',
- 'pay_batch' => $pay_batch
- ) : '',
+ 'html_init' => $pay_batch ? $html_init : '',
+ 'disable_download' => 1,
'header' => [ '#',
'Inv #',
'Customer',
'header' => [ '#',
'Inv #',
'Customer',
@@
-62,9
+60,12
@@
my $conf = new FS::Conf;
my $conf = new FS::Conf;
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "access denied"
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Financial reports')
- || $FS::CurrentUser::CurrentUser->access_right('Process batches')
+ unless $curuser->access_right('Financial reports')
+ || $curuser->access_right('Process batches')
+ || $curuser->access_right('Process global batches')
|| ( $cgi->param('custnum')
&& ( $conf->exists('batch-enable')
|| $conf->config('batch-enable_payby')
|| ( $cgi->param('custnum')
&& ( $conf->exists('batch-enable')
|| $conf->config('batch-enable_payby')
@@
-110,7
+111,8
@@
unless ($pay_batch){
$orderby = "pay_batch.download,paybatchnum";
}
$orderby = "pay_batch.download,paybatchnum";
}
-push @search, $FS::CurrentUser::CurrentUser->agentnums_sql;
+push @search, $curuser->agentnums_sql({ table=>'cust_main' });
+
my $search = ' WHERE ' . join(' AND ', @search);
$count_query = 'SELECT COUNT(*) FROM cust_pay_batch AS cpb ' .
my $search = ' WHERE ' . join(' AND ', @search);
$count_query = 'SELECT COUNT(*) FROM cust_pay_batch AS cpb ' .