[freeside-commits] freeside/httemplate/search cust_pay_batch.cgi, 1.20, 1.20.2.1
Ivan,,,
ivan at wavetail.420.am
Tue Nov 22 13:25:34 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv24505/httemplate/search
Modified Files:
Tag: FREESIDE_2_3_BRANCH
cust_pay_batch.cgi
Log Message:
fix batch browsing w/ the new agent-specific batches, RT#15310
Index: cust_pay_batch.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pay_batch.cgi,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -w -d -r1.20 -r1.20.2.1
--- cust_pay_batch.cgi 15 Jun 2011 01:24:39 -0000 1.20
+++ cust_pay_batch.cgi 22 Nov 2011 21:25:32 -0000 1.20.2.1
@@ -60,9 +60,12 @@
my $conf = new FS::Conf;
+my $curuser = $FS::CurrentUser::CurrentUser;
+
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')
@@ -108,7 +111,8 @@
$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 ' .
More information about the freeside-commits
mailing list