From: ivan Date: Tue, 23 Feb 1999 08:09:27 +0000 (+0000) Subject: beginnings of one-screen new customer entry and some other miscellania X-Git-Tag: freeside_1_2_0~56 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=510d2f9647c0651a82760e456b46505e8050d6ed beginnings of one-screen new customer entry and some other miscellania --- diff --git a/TODO b/TODO index 93f9ed88d..611f83ec5 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -$Id: TODO,v 1.24 1999-02-10 08:27:55 ivan Exp $ +$Id: TODO,v 1.25 1999-02-23 08:09:18 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,6 +6,8 @@ duplication of effort. -- before 1.2b1 -- +TEST email invoices + one-screen new customer entry clean up view/cust_pkg and view/svc_* yuck (popurl and visual)! @@ -15,6 +17,8 @@ Lay out the forms a bit better. libwww regression test - since it will create sample data, can also use this for the web demo make fs-setup option to add sample data so you can click on "New Customer" right away? so people understand what this stuff is? +(in sample data [ AND DOCUMENT! ] all svc_acct services should have a default + or fixed shell ) (Test this) one-time/per-customer/? changes in rates and descriptions ('remembered @@ -27,10 +31,24 @@ associated with any agent types so it won't show up for other customers to buy. update site_perl/table_template* (pry out of date) +remove "records identical" warning? gets in the way of more important stuff. + update web demo -- release 1.2b1 --- +password and slipip stuff in svc_acct.pm store need to be split into two fields or something, so the silliness in svc_acct.pm and svc_acct.export with looking at the data to decide what to do with it can be fixed + +i10n: Apache::Language + +Apache::Session? Other useful Apache::* ? + +email invoices are only sent for the BILL payby. If setup, should statements +(since they're not invoices) be sent for COMP and CARD as well? + +$cgi->keywords is causing the (hard to trace) error: + Use of uninitialized value at (eval 5) line 5 + edit/cust_main.cgi gives an uninformative error message: > Can't call method "agentnum" without a package or object reference at > /usr/local/apache-ssl/htdocs/freeside/edit/cust_main.cgi line 116. @@ -45,13 +63,16 @@ Allow a cancelled/suspended/active status from packages to bubble up to the customer lists. Put active, then suspended, then cancelled accounts. Similar ordering on the package listing inside a single customer. +false laziness: edit/cust_main.cgi got some parts copied from edit/svc_acct.cgi +the web interface in general needs to be redone in a more abstract way. + false laziness: some of search/svc_acct_sm.cgi was copied to search/svc_domain.cgi. but web interface in general needs to be rewritten in a mucho cleaner way. Portability: in FS::Record, $sth->execute does not return a number of rows for all DBD's. see man DBI subroutine the where clause (eventually all SQL) as OO perhaps (has anyone done this?) -add a select method to +add a select method to ? You can't delete the stuff under administration yet. Add this, _including_ making sure the thing you are deleting is not in use! @@ -386,8 +407,6 @@ configuration/setup should get web interface ... (probably as part of some automated installation process?) -password and slipip stuff in svc_acct.pm store need to be split into two fields or something, so the silliness in svc_acct.pm and svc_acct.export with looking at the data to decide what to do with it can be fixed (1.2) - This requires some serious magic in FS::Record: ok, if date_type in fs-setup is to be something besides int, now we need to create wrappers diff --git a/htdocs/docs/config.html b/htdocs/docs/config.html index 848456cad..1a30b525e 100644 --- a/htdocs/docs/config.html +++ b/htdocs/docs/config.html @@ -28,6 +28,7 @@ All further configuration files and directories are located in
  • domain - Your domain name.
  • erpcdmachines - Your ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd' and `/usr/annex/acp_dialup'.
  • home - For new users, prefixed to usrename to create a directory name. Should have a leading but not a trailing slash. +
  • invoice_from - Return address on email invoices.
  • lpr - Print command for paper invoices, for example `lpr -h'.
  • nismachines - Your NIS master (not slave master) machines, one per line. This enables export of `/etc/global/passwd' and `/etc/global/shadow'.
  • qmailmachines - Your qmail machines, one per line. This enables export of `/var/qmail/control/virtualdomains', `/var/qmail/control/recipientmap', and `/var/qmail/control/rcpthosts'. The existance of this file (even if empty) also turns on user `.qmail-extension' file maintenance in conjunction with `shellmachine'. diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi index 03252b054..ba8642808 100755 --- a/htdocs/edit/cust_main.cgi +++ b/htdocs/edit/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.8 1999-01-25 12:09:53 ivan Exp $ +# $Id: cust_main.cgi,v 1.9 1999-02-23 08:09:20 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum @@ -40,7 +40,10 @@ # fixed one missed day->daytime ivan@sisd.com 98-jul-13 # # $Log: cust_main.cgi,v $ -# Revision 1.8 1999-01-25 12:09:53 ivan +# Revision 1.9 1999-02-23 08:09:20 ivan +# beginnings of one-screen new customer entry and some other miscellania +# +# Revision 1.8 1999/01/25 12:09:53 ivan # yet more mod_perl stuff # # Revision 1.7 1999/01/19 05:13:34 ivan @@ -66,12 +69,25 @@ use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum $last $first $ss $company $address1 $address2 $city $zip $daytime $night $fax @invoicing_list $invoicing_list $payinfo $payname %payby %paybychecked $refnum $otaker $r ); +use vars qw ( $conf $pkgpart $username $password $popnum $ulen $ulen2 ); use CGI::Switch; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); -use FS::Record qw(qsearch qsearchs fields); +#use FS::Record qw(qsearch qsearchs fields); +use FS::Record qw(qsearch qsearchs fields dbdef); use FS::CGI qw(header popurl itable table); use FS::cust_main; +use FS::agent; +use FS::part_referral; +use FS::cust_main_county; + + #for misplaced logic below + use FS::pkg_svc; + use FS::part_svc; + use FS::part_pkg; + + #for false laziness below + use FS::svc_acct_pop; $cgi = new CGI; cgisuidsetup($cgi); @@ -83,15 +99,27 @@ if ( $cgi->param('error') ) { map { $_, scalar($cgi->param($_)) } fields('cust_main') } ); $custnum = $cust_main->custnum; + $pkgpart = $cgi->param('pkgpart'); + $username = $cgi->param('username'); + $password = $cgi->param('_password'); + $popnum = $cgi->param('popnum'); } elsif ( $cgi->keywords ) { #editing my( $query ) = $cgi->keywords; $query =~ /^(\d+)$/; $custnum=$1; $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); + $pkgpart = 0; + $username = ''; + $password = ''; + $popnum = 0; } else { $custnum=''; $cust_main = new FS::cust_main ( {} ); $cust_main->setfield('otaker',&getotaker); + $pkgpart = 0; + $username = ''; + $password = ''; + $popnum = 0; } $action = $custnum ? 'Edit' : 'Add'; @@ -140,7 +168,7 @@ if ( $custnum ) { $refnum ||= $referrals[0]->refnum; print qq!!; } else { - print qq!
    ${r}Referral !; print "