[freeside-commits] freeside/httemplate/search cust_pay_batch.cgi,
1.5, 1.6
Ivan,,,
ivan at wavetail.420.am
Sat Feb 3 17:47:53 PST 2007
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv23360/search
Modified Files:
cust_pay_batch.cgi
Log Message:
add link to some batched payment info to customer view
Index: cust_pay_batch.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pay_batch.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cust_pay_batch.cgi 3 Feb 2007 11:36:30 -0000 1.5
+++ cust_pay_batch.cgi 4 Feb 2007 01:47:50 -0000 1.6
@@ -58,9 +58,15 @@
%>
<%init>
+my $conf = new FS::Conf;
+
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports')
- || $FS::CurrentUser::CurrentUser->access_right('Process batches');
+ || $FS::CurrentUser::CurrentUser->access_right('Process batches')
+ || ( $cgi->param('custnum')
+ && $conf->exists('batch-enable')
+ #&& $FS::CurrentUser::CurrentUser->access_right('View customer batched payments')
+ );
my( $count_query, $sql_query );
my $hashref = {};
@@ -75,6 +81,14 @@
$batchnum = $pay_batch->batchnum;
}
+if ( $cgi->param('custnum') && $cgi->param('custnum') =~ /^(\d+)$/ ) {
+ push @search, "custnum = $1";
+}
+
+if ( $cgi->param('status') && $cgi->param('status') =~ /^(\w)$/ ) {
+ push @search, "pay_batch.status = '$1'";
+}
+
if ( $cgi->param('payby') ) {
$cgi->param('payby') =~ /^(CARD|CHEK)$/
or die "illegal payby " . $cgi->param('payby');
@@ -111,7 +125,6 @@
my $html_init = '';
if ( $pay_batch ) {
- my $conf = new FS::Conf;
my $fixed = $conf->config('batch-fixed_format-'. $pay_batch->payby);
if (
$pay_batch->status eq 'O'
More information about the freeside-commits
mailing list