X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcust_main_note-import.cgi;h=8a94ae4d4471c81570b5d3683c87ee3bb972f6be;hb=3a4bf42c4385863ea83423b279b39ff6e650f79d;hp=b93c5c1cc5ff278b6b37ab0bc244993476ebb33f;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git diff --git a/httemplate/misc/cust_main_note-import.cgi b/httemplate/misc/cust_main_note-import.cgi index b93c5c1cc..8a94ae4d4 100644 --- a/httemplate/misc/cust_main_note-import.cgi +++ b/httemplate/misc/cust_main_note-import.cgi @@ -108,6 +108,7 @@ % my $fh = $cgi->upload('csvfile'); % my $csv = new Text::CSV_XS; % my $skip_fuzzies = $cgi->param('fuzzies') ? 0 : 1; +% my $use_agent_custid = $cgi->param('use_agent_custid') ? 1 : 0; % % if ( defined($fh) ) { @@ -118,7 +119,7 @@ -% my $agentnum => scalar($cgi->param('agentnum')), +% my $agentnum = scalar($cgi->param('agentnum')); % my $line; % my $row = 0; % while ( defined($line=<$fh>) ) { @@ -138,7 +139,10 @@ % next unless ( $last || $first || $note ); % my @cust_main = (); % warn "searching for: $last, $first" if ($first || $last); -% if ($custnum) { +% if ($agentnum && $custnum && $use_agent_custid) { +% @cust_main = qsearch('cust_main', { 'agent' => $agentnum, +% 'agent_custid' => $custnum } ); +% } elsif ($custnum) { # && !use_agent_custid % @cust_main = qsearch('cust_main', { 'custnum' => $custnum }); % } else { % @cust_main = FS::cust_main::smart_search(
First Note to be added