fix various quick payment entry problems, #17356
[freeside.git] / httemplate / misc / process / batch-cust_pay.cgi
index aa37126..a6b90ea 100644 (file)
@@ -19,7 +19,7 @@
 %        'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
 %      });
 %    }
-%    if ( !$cust_main ) { # not found, try agent_custid
+%    if ( length($custnum) and !$cust_main ) { # not found, try agent_custid
 %      $cust_main = qsearchs({ 
 %        'table'     => 'cust_main',
 %        'hashref'   => { 'agent_custid' => $custnum },