[freeside-commits] freeside/httemplate/misc xmlhttp-cust_main-search.cgi, 1.2, 1.2.2.1
Ivan,,,
ivan at wavetail.420.am
Mon May 5 18:15:01 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv22565/httemplate/misc
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- xmlhttp-cust_main-search.cgi 23 Aug 2006 22:25:38 -0000 1.2
+++ xmlhttp-cust_main-search.cgi 6 May 2008 01:14:56 -0000 1.2.2.1
@@ -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