[freeside-commits] freeside/httemplate/misc cust_main_note-import.cgi, 1.3, 1.4 cust_main_note-import.html, 1.2, 1.3
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Aug 23 13:05:41 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv10358/httemplate/misc
Modified Files:
cust_main_note-import.cgi cust_main_note-import.html
Log Message:
support importing customer notes by agent_custid
Index: cust_main_note-import.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cust_main_note-import.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- cust_main_note-import.cgi 3 Apr 2007 19:37:11 -0000 1.3
+++ cust_main_note-import.cgi 23 Aug 2010 20:05:39 -0000 1.4
@@ -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) ) {
<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
@@ -118,7 +119,7 @@
<TH>First</TH>
<TH>Note to be added</TH>
</TR>
-% 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(
Index: cust_main_note-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cust_main_note-import.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- cust_main_note-import.html 20 Mar 2007 20:11:06 -0000 1.2
+++ cust_main_note-import.html 23 Aug 2010 20:05:39 -0000 1.3
@@ -13,6 +13,13 @@
<% &ntable("#cccccc") %>
+<% include('/elements/tr-select-agent.html',
+ #'curr_value' => '', #$agentnum,
+ 'label' => "<B>Agent</B>",
+ 'empty_label' => 'Select agent',
+ )
+%>
+
<TR>
<TH ALIGN="right">CSV filename</TH>
<TD><INPUT TYPE="file" NAME="csvfile"></TD>
@@ -22,6 +29,11 @@
<TD><INPUT TYPE="checkbox" NAME="fuzzies"></TD>
</TR>
+<TR>
+ <TH ALIGN="right">custnum is reseller's customer number</TH>
+ <TD><INPUT TYPE="checkbox" NAME="use_agent_custid"></TD>
+</TR>
+
</TABLE>
<BR><BR>
More information about the freeside-commits
mailing list