[freeside-commits] freeside/httemplate/misc xmlhttp-cust_main-search.cgi, 1.2, 1.3

Ivan,,, ivan at wavetail.420.am
Mon May 5 18:14:58 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv22557/httemplate/misc

Modified Files:
	xmlhttp-cust_main-search.cgi 
Log Message:
agent-virtualize customer # portion of quick payment entry

Index: xmlhttp-cust_main-search.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/xmlhttp-cust_main-search.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- xmlhttp-cust_main-search.cgi	23 Aug 2006 22:25:38 -0000	1.2
+++ xmlhttp-cust_main-search.cgi	6 May 2008 01:14:55 -0000	1.3
@@ -1,22 +1,24 @@
-%
-%   my $sub = $cgi->param('sub');
-% 
-%   if ( $sub eq 'custnum_search' ) {
+% if ( $sub eq 'custnum_search' ) {
 % 
-%     my $custnum = $cgi->param('arg');
-%     my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
-%
+%   my $custnum = $cgi->param('arg');
+%   my $cust_main = qsearchs({
+%     'table'   => 'cust_main',
+%     'hashref' => { 'custnum' => $custnum },
+%     'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+%   });
 %     
 "<% $cust_main ? $cust_main->name : '' %>"
-% } elsif ( $sub eq 'smart_search' ) {
 %
-%     my $string = $cgi->param('arg');
-%     my @cust_main = smart_search( 'search' => $string );
-%     my $return = [ map [ $_->custnum, $_->name ], @cust_main ];
+% } elsif ( $sub eq 'smart_search' ) {
 %
+%   my $string = $cgi->param('arg');
+%   my @cust_main = smart_search( 'search' => $string );
+%   my $return = [ map [ $_->custnum, $_->name ], @cust_main ];
 %     
 <% objToJson($return) %>
 % } 
+<%init>
 
+my $sub = $cgi->param('sub');
 
-
+</%init>



More information about the freeside-commits mailing list