configuration option to edit referrals of existing customers
authorivan <ivan>
Wed, 14 Apr 1999 13:14:54 +0000 (13:14 +0000)
committerivan <ivan>
Wed, 14 Apr 1999 13:14:54 +0000 (13:14 +0000)
TODO
htdocs/docs/config.html
htdocs/edit/cust_main.cgi

diff --git a/TODO b/TODO
index 114e010..5dbfab2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.29 1999-04-14 11:27:06 ivan Exp $
+$Id: TODO,v 1.30 1999-04-14 13:14:54 ivan Exp $
 
 If you are interested in helping with any of these, please join the mailing
 list (send a blank message to ivan-freeside-subscribe@sisd.com) to avoid 
@@ -6,12 +6,17 @@ duplication of effort.
 
 ---
 
+default (and ordering) state/county/country config file
+expand the
+cust_main_county table to provide a preferred ordering, so the most common
+entries would be at the top of the selection box.  automatically, based on
+recent selections?
+
 hmm... maybe svc_acct__shell should check off the legal shells list if
 applicable?  yeah... cool.
 
 payinfo field should me much larger than 16
 
-default (and ordering) state/county/country config file
 
 [Mon Apr 12 20:31:21 1999] [error] [Mon Apr 12 20:31:21 1999] null: Error closing true: Broken pipe at /usr/local/lib/site_perl/FS/cust_main.pm line 615.
 
index 6937f48..fba745a 100644 (file)
@@ -26,6 +26,7 @@ All further configuration files and directories are located in
   <li>cybercash2 - <a href="http://www.cybercash.com/cybercash/services/cashreg214.html">CyberCash v2</a> support, four lines: paymentserverhost, paymentserverport, paymentserversecret, and transaction type (`mauthonly' or `mauthcapture').  CCLib.pm is required.
   <li>cybercash3.2 - <a href="http://www.cybercash.com/cybercash/services/technology.html">CyberCash v3.2</a> support.  Two lines: the full path and name of your merchant_conf file, and the transaction type (`mauthonly' or `mauthcapture').  CCMckLib3_2.pm, CCMckDirectLib3_2.pm and CCMckErrno3_2 are required.
   <li>domain - Your domain name.
+  <li>editreferrals - The existance of this file will allow you to change the referral of existing customers.
   <li>erpcdmachines - Your ERPCD authenticaion machines, one per line.  This enables export of `/usr/annex/acp_passwd' and `/usr/annex/acp_dialup'.
   <li>home - For new users, prefixed to usrename to create a directory name.  Should have a leading but not a trailing slash.
   <li>invoice_from - Return address on email invoices.
index 813c4b5..51cf0ab 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main.cgi,v 1.14 1999-04-14 07:47:53 ivan Exp $
+# $Id: cust_main.cgi,v 1.15 1999-04-14 13:14:54 ivan Exp $
 #
 # Usage: cust_main.cgi custnum
 #        http://server.name/path/cust_main.cgi?custnum
 # fixed one missed day->daytime ivan@sisd.com 98-jul-13
 #
 # $Log: cust_main.cgi,v $
-# Revision 1.14  1999-04-14 07:47:53  ivan
+# Revision 1.15  1999-04-14 13:14:54  ivan
+# configuration option to edit referrals of existing customers
+#
+# Revision 1.14  1999/04/14 07:47:53  ivan
 # i18n fixes
 #
 # Revision 1.13  1999/04/09 03:52:55  ivan
@@ -111,6 +114,8 @@ use FS::cust_main_county;
 $cgi = new CGI;
 cgisuidsetup($cgi);
 
+$conf = new FS::Conf;
+
 #get record
 
 if ( $cgi->param('error') ) {
@@ -185,7 +190,7 @@ if ( scalar(@agents) == 1 ) {
 #referral
 
 $refnum = $cust_main->refnum || 0;
-if ( $custnum ) {
+if ( $custnum && ! $conf->exists('editreferrals') ) {
   print qq!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!;
 } else {
   my(@referrals) = qsearch('part_referral',{});
@@ -194,7 +199,7 @@ if ( $custnum ) {
     print qq!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!;
   } else {
     print qq!<BR><BR>${r}Referral <SELECT NAME="refnum" SIZE="1">!;
-    print "<OPTION> ";
+    print "<OPTION> " unless $refnum;
     my($referral);
     foreach $referral (sort {
       $a->refnum <=> $b->refnum;