[freeside-commits] freeside/httemplate/misc/process batch-cust_pay.cgi, 1.6, 1.7
Mark Wells
mark at wavetail.420.am
Thu Sep 23 16:21:08 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv13261/misc/process
Modified Files:
batch-cust_pay.cgi
Log Message:
fix use of agent_custid in quick payment entry, RT#10035
Index: batch-cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/batch-cust_pay.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- batch-cust_pay.cgi 22 Sep 2010 19:16:20 -0000 1.6
+++ batch-cust_pay.cgi 23 Sep 2010 23:21:06 -0000 1.7
@@ -10,8 +10,27 @@
% #my $row = 0;
% #while ( exists($param->{"custnum$row"}) ) {
% for ( my $row = 0; exists($param->{"custnum$row"}); $row++ ) {
+% my $custnum = $param->{"custnum$row"};
+% my $cust_main;
+% if ( $custnum =~ /^(\d+)$/ and $1 <= 2147483647 ) {
+% $cust_main = qsearchs({
+% 'table' => 'cust_main',
+% 'hashref' => { 'custnum' => $1 },
+% 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+% });
+% }
+% if ( !$cust_main ) { # not found, try agent_custid
+% $cust_main = qsearchs({
+% 'table' => 'cust_main',
+% 'hashref' => { 'agent_custid' => $custnum },
+% 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+% });
+% }
+% $custnum = $cust_main->custnum if $cust_main;
+% # if !$cust_main, then this will throw an error on batch_insert
+%
% push @cust_pay, new FS::cust_pay {
-% 'custnum' => $param->{"custnum$row"},
+% 'custnum' => $custnum,
% 'paid' => $param->{"paid$row"},
% 'payby' => 'BILL',
% 'payinfo' => $param->{"payinfo$row"},
More information about the freeside-commits
mailing list