projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d01b288
)
fix batch browsing w/ the new agent-specific batches, RT#15310
author
ivan
<ivan>
Tue, 22 Nov 2011 21:25:33 +0000
(21:25 +0000)
committer
ivan
<ivan>
Tue, 22 Nov 2011 21:25:33 +0000
(21:25 +0000)
FS/FS/AccessRight.pm
patch
|
blob
|
history
httemplate/search/cust_pay_batch.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/AccessRight.pm
b/FS/FS/AccessRight.pm
index
56193e4
..
7351c6d
100644
(file)
--- a/
FS/FS/AccessRight.pm
+++ b/
FS/FS/AccessRight.pm
@@
-274,7
+274,8
@@
tie my %rights, 'Tie::IxHash',
'Miscellaneous rights' => [
{ rightname=>'Job queue', global=>1 },
{ rightname=>'Time queue', global=>1 },
'Miscellaneous rights' => [
{ rightname=>'Job queue', global=>1 },
{ rightname=>'Time queue', global=>1 },
- { rightname=>'Process batches', global=>1 }, #Process payment batches
+ { rightname=>'Process batches', }, #Process payment batches
+ { rightname=>'Process global batches', global=>1 }, #Process global payment batches
{ rightname=>'Reprocess batches', global=>1 }, #Reprocess payment batches
{ rightname=>'Redownload resolved batches', global=>1 }, #Redownload resolved payment batches
{ rightname=>'Process invoice batches', },
{ rightname=>'Reprocess batches', global=>1 }, #Reprocess payment batches
{ rightname=>'Redownload resolved batches', global=>1 }, #Redownload resolved payment batches
{ rightname=>'Process invoice batches', },
diff --git
a/httemplate/search/cust_pay_batch.cgi
b/httemplate/search/cust_pay_batch.cgi
index
73ead91
..
f382644
100755
(executable)
--- a/
httemplate/search/cust_pay_batch.cgi
+++ b/
httemplate/search/cust_pay_batch.cgi
@@
-60,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')
@@
-108,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 ' .