rar
[freeside.git] / TODO
1 $Id: TODO,v 1.58 2001-04-09 15:50:50 ivan Exp $
2
3 If you are interested in helping with any of these, please join the
4 *development* mailing list (send a blank message to
5 ivan-freeside-devel-subscribe@sisd.com) to avoid duplication of effort.
6
7 ---
8
9 write some sample billing expressions with libcflow-perl :)
10
11 (future templating)
12 .
13 (at least) These questions need to be answered for Mason, Apache::ASP and
14 eperl.  If eperl becomes too much of a pain, I'm okay with forgetting 
15 about it - it's not well-maintained.  The answers below are for Mason.
16 .
17 How do you interpolate a value?  <% $value %>
18 .
19 How do you interpolate a value without escaping HTML? <% $value |n %>
20 .
21 How do you interpolate a (possibly non-stand-alone, non-interpolated) 
22 control structure?  With an inital % - for example:
23 .     
24         % for each $value ( @values ) {
25         <OPTION><% $value %></OPTION>
26         % }
27 .     
28 This is one of the things I worry that the webmonkey HTML editors will not
29 like about Mason.  That and the <%INIT> and <%PERL> tags.
30
31
32 in the context of a state machine (& MySQL and Pg locking) for LDAP export:
33 .
34 Also note that Pg locks are for the duration of the transaction, so 
35 Freeside needs to start using transactions for this to happen.  
36 FS::UID::adminsuidsetup should explicitly set AutoCommit false and export
37 some functions to begin and end transactions on $FS::UID::dbh.  (Well,
38 eventually FS::UID should be an overloaded subclass of a DBI handle, but
39 we don't have to worry about that until perl threads + mod_perl + threaded
40 Apache 2.0 is stable, i.e. quite some time).
41
42 Postfix
43 also supports virtual domains in a way that's somewhat similar (but not
44 compatible with) the way sendmail does.  In the postfix world, all virtual
45 domain info is contained in one file (similar to the virtusertable), but
46 is formatted as such:
47 bar.com         virtual
48 foo@bar.com             some@other.net
49 quux@bar.com    localuser1
50 ...
51 and so on.  After the file is generated, it gets compiled into a hash db
52 using, "postmap /etc/postfix/virtual".
53
54
55 steal all the play-nice-with-cache stuff back from RT
56
57 Use this for email checking:
58 libemail-valid-perl - Check validity of Internet email addresses
59 .                                                                
60 This module determines whether an email address is well-formed, and 
61 optionally, whether a mail host exists for the domain.
62
63
64 wishlist from drenalin@ultimanet.com:
65 * delete button for customers
66 - 15th of the month billing
67 - field for customer referrals (naming who it is) and automatically crediting
68 +that account
69 - ability to edit referrals
70 - catch expired credit cards and notify via email when they are expiring
71 * show passwords
72 - set default shell to /bin/false when adding ppp account
73 - import list of POPs from Megapop (see www.ultimanet.com and click on locations
74 +from text in index page)
75
76
77 wishlist wrt projects/consulting from jivko@ijs.com:
78 >The other thing, which is the serious part, is the following: We do not
79 >offer dial-up services and that part of the system does not have to work,
80 >but we have many customer, for which we do both hosting and consulting work.
81 .
82 >The hosting can be handled by freeside fine, but in the little time I spent 
83 >on it I could not see how exactly to solve the consulting problem. What I
84 >would love to see there is a way to create 'projects' for each customer and
85 >ability to follow up on those (I mean to be able to add new comments,
86 >descriptions, progress updates etc.). You already have the feature, which
87 >allows multiple people to access the system with different access rights so
88 >it should be possible to make it keep track of who and when updated given
89 >'project' so we could have the developers access the database and update
90 >the projects they are working on.
91 .
92 Hmm.  Is this accurate:  Each project is related to a single customer, and
93 zero or more packages (billing items).  Each project has a name, due date,    
94 and zero or more log entries consisting of date, user, and a text field
95 (for "new comments, descriptions, progress updates etc." - would you like
96 anything more specific?)
97
98 In conjunction with that it looks like you need the ability to create
99 "one-off" packages on the fly for arbitrary charges.
100
101 > Additionally it would be nice to have a page, where all open projects can
102 > be listed and not only that but be able list them by date too. (Say I want
103 > to find out which projects are due today or two days from today, or which
104 > projects are running late)
105 .
106 Browse/search project by date and customer.
107 .
108 > Finally it would be real nice if the billing script could add the cost for
109 > all completed projects (or work done by the hour) to the monthly bill along   
110 > with the hosting information and using the description of the work from the
111 > 'project' table. 
112 .
113 Can you be more specific about your needs here?
114 .
115 > This is a lot of work, unless you disagree :-), and I would not expect you
116 > to do all of it - we can work on it too - but I would hope for you to lead 
117 > the effort.
118 .
119 I'm trying to get a handle on specifically what you need.
120 .
121 > Oh, and there is one more thing, but that should be simple to do. I would
122 > like to be able to give the customers access to selected information from
123 > their account. I want them to be able to monitor the progress of their
124 > projects and the status of their accounts. 
125 .
126 Ok.
127 .
128 > Does all this make sense? It must be close to what you need at your office
129 > though or at least I think so.
130 .
131 Yes, but we're small and have been tracking projects manually.
132 .
133 .
134 >You may have this already .. what I have in mind is the following. Say you
135 >have a customer for which you do hosting and some consulting (CGI, JAVA
136 >etc) At the end of the month you need to bill the customer for the hosting,
137 >35hours of Java programming and 10 hours of HTML authoring. The last two
138 >are not because the project is over but because the work was done during
139 >that month.
140 >
141 >So the way I see it, and it could be wrong, is that during the month the
142 >people who work on particular project enter their comments and time spent
143 >on the project. At the end of the month the billing script generates
144 >invoices in which besides the hosting charges there are also charges for
145 >work done during the period.
146 >
147 >Currently we do this in a very stupid way by maintaining a customer file,
148 >in which a script saves things to be invoiced. At the end of the month a
149 >script goes through these files and generates invoices with all items from
150 >the files, which have not been flagged as 'paid'. The convenience of this
151 >is that no one needs to worry about the invoices containing the items they
152 >need to contain.
153
154
155
156 first package select field in edit/cust_main.cgi isn't sticky on errors, yuck
157 (also referral isn't sticky either?  yuck)
158
159 > 1. A Web Form to the user get his account added automatically . The
160 > /etc/raddb/users and /etc/passwd would be updated automatically (these
161 > file are on the same machine Freeside is). I guess the the Add
162 > Customer
163 > page with some customization could be the work.
164 > 2. A Canceling Account Web Form available to user cancel his account   
165 > at
166 > any time he wants.
167 > 3. A Password Changing Web Form where the user could change your
168 > password by sending your username, old and new password.
169 > 4. Additional POP Accounts Creation where the user supply only his
170 > main
171 > username/password (probably provided from a PPP Account already
172 > created)
173 > and his POP username/password for this specific account.
174 (actually need something more general i guess - probably need some way to say
175 which accounts (svc_acct) can log in and make changes per customer (cust_main) )
176
177 this is awfully vauge, perhaps email for more info?  don't want to alientate
178 someone with accounting experience, but i just don't have time right now.
179 .
180 Hi Ivan,
181 .
182 Thanks for the information. It took me a little while to figure it out, but I
183 +was
184 able to create an invoice. As a lamer and an accountant, may I make a few
185 suggestions?
186 .
187 On the Customer view page:
188 1) Layout the information in the manner the invoicing process is conducted.
189     a) Customer information                                                
190     b) Package Ordering    
191     c)  Add a "Create & Edit Invoice" section - this allows auditing of  the
192 invoice     before it is processed.
193     d) then put the billing section to actually process the invoice
194     e) then put payment history information                        
195 .
196 Thanks,
197 Mark Roberts <mroberts@iopenenterprises.com>
198
199
200 new overdue code might be overzealous.  test carefully.
201
202 Port Freeside to use the modules that were abstracted from it:
203 Net::SSH, Net::SCP, DBIx::DataSource and DBIx::DBSchema, at least.
204
205 "first package" and email invoice (?) not sticky on errors in new/edit customer
206 screen.
207
208 http://www.ipmeter.com/ integration would be useful
209
210 http://tangram.sourceforge.net/
211 Tie::DBI
212
213 mmm, http://pootpoot.com/~dlowe/DBIx-Table/
214
215 The cybercash links in htdocs/docs/config.html are b0rken.
216
217 Yes.  Which is what I've been trying to tell you.  (destination user,
218 destination domainname) would be represented by the svcnum of a record in
219 svc_acct.  (In retrospect, using the uid instead of the svcnum was a bad
220 choice).  (domuser, domain name) would be part of the svc_acct_sm record,
221 as domuser and domsvc.
222
223 Upon further consideration, I'll probably eliminate the svc_acct_sm table
224 completely, and just add a field for the svcnum of a domain and the svcnum
225 of a destination mailbox to svc_acct (or perhaps a one-to-many
226 relationship - multiple svcnum(s) for multiple destination mailboxes.
227 hmm.)
228
229 > > > > Longer-term, I need to do something about the length of the             
230 > > > > column names -                                                          
231 > > > > The SQL1992 standard defines 18 character column names,                 
232 > > > > which would be a                                                        
233 > > > > reasonable goal.                                                        
234 > > >                                                                           
235 > > > Maybe the thing to do would be to separate these out to separate          
236 > > > tables.                                                                   
237 > > > then we could simply use something like id, attrib_name,                  
238 > > attrib_value                                                                
239 > > > to                                                                        
240 > > > store all of the radius values.                                           
241 > >                                                                             
242 > > Hmm, no, that's not quite right.  You don't want to store the actual        
243 > > strings in the records for each account.  Probably need a table that        
244 > > corresponds to the RADIUS dictionary file, with a list of                   
245 > > attributes and                                                              
246 > > attribute id's, then reference the attribute by id and not name.            
247 > >                                                                             
248 > > The more difficult bit is handling the service definitions                  
249 > > correctly -                                                                 
250 > > part_svc and it's effects.                                                  
251 >                                                                               
252 > Yes that could be a bit tricky. Perhaps just one "radius" field in            
253 > part_svc that held a list of id's from the radius table that applied          
254 > that particular service?                                                      
255
256 No, that wouldn't let you set defaults or fixed values for each attribute,
257 like part_svc currently does.
258  
259
260
261 hmm - if you delete an account in svc_acct somehow that a mail alias points to,
262 svc_acct_sm.export will fail.  make sure this can't be done using
263 the web interface.
264
265 Bug: during the linking process apparantly you can link too many services to 
266 a package.  *sigh*
267
268 zip code i18n is not very good :( but at least US, CA, HU, ?
269
270 ut_phonen doesn't check data length.  several
271 orthogonal cleanup projects here.  *sigh*
272
273 update the cybercash links in config.html and in the homepage.  add more explicit support for other payment types.  etc.
274
275 From "Tim Jung" <tjung@igateway.net>
276 .
277 Automatic CC Decline Notices via email
278 Block Time billing for prepaid internet cards (400 hours or whatever block
279 time of hours)
280 Trouble Ticket System with simple search function for Knowledge Base feature
281 Employee Timecards
282 Credit Card System support for Red Hat's CCVS, and other Linux credit card
283 programs
284 Contact Manager/Lead Tracking
285 Pre-Sale Quotes
286 Cisco NetFlow Account for IP traffic billing
287 VoIP and FoIP billing
288 Roaming per minute billing based on Radius Proxy support or number they
289 dialed into from Radius logs (800# etc)
290 Support for OpenSRS Domain Registration
291 Support for TUCOWS signup CDs
292
293
294 dbdef-create for postgres
295
296 pro-rating, fiddling dates
297
298 It looks like svc_acct.import doesn't deal well with comments and
299 multi-attribute lines.
300
301 ivan@rootwood:~/freeside_current$ rgrep -r domuid * | cut -d: -f1 | sort |
302 uniq
303 CVS/Base/TODO
304 TODO
305 bin/fs-setup
306 bin/svc_acct_sm.export
307 bin/svc_acct_sm.import
308 htdocs/docs/man/svc_acct_sm.txt
309 htdocs/docs/schema.html
310 htdocs/edit/CVS/Base/part_svc.cgi
311 htdocs/edit/part_svc.cgi
312 htdocs/edit/process/svc_acct_sm.cgi
313 htdocs/edit/svc_acct_sm.cgi
314 htdocs/search/svc_acct_sm.cgi
315 htdocs/view/svc_acct_sm.cgi
316 site_perl/svc_acct_sm.pm
317
318 rootwood:COMPLETEHOST/TODO
319
320 Currently, you set a value in the %FS::UID::callback hash with a coderef  
321 of the code you want to execute, but this was bad design and will shortly
322 be changed to a subroutine to which you pass your coderef to register it.
323
324 This is not a bug, it is how the system is currently designed.  After 
325 defining a new package, you need to specifically allow agent types to
326 purchase packages.  You can do this from the edit screen of the new agent
327 type.
328 .
329 It wouldn't be a bad idea to add a configuration value that makes new
330 packages available for all currently existing agent types automatically.
331 .
332 On Fri, Apr 07, 2000 at 10:50:35AM -0500, David Morton wrote:
333 > For some reason, the type_pkgs table didn't get updated when I tried to
334 > create a domain service and package...  insert into type_pkgs values   
335 > (4,1);  fixed it up so that I could actually order the package.
336
337
338 From: Chuck Cochems <zaphod@tdl.com>
339 .
340 1) automated generating of late notices.  So far the only way I know to
341 generate one is to re-invoice manually.
342
343 2) smart credit card rejection handling.  It should e-mail a note at
344 least, explainig that it did't go through, and why.
345
346 3)coment field in the main customer record.
347 .
348 4) streamlined payment entry feature. the current scheme has it fairly
349 buried.
350
351 5) queries to show al customers who owe money,and such stuff as that.
352
353
354 credits aren't counted against past invoices?  hmm.  something needs to be
355 done to "apply payment" genericly. and zero out invoices etc.
356
357 more email which should make it into a more organized TODO list:
358 .
359 I would also love to see Freeside support bandwidth billing by reading the
360 Cisco NetFlow Accounting data so we and other ISP's could automatically bill
361 co-located servers and even potentially other virtually hosted sites like
362 MUD, Palace Chat, IRC Chat, etc based on the bandwidth they use or average
363 sustained rates or whatever. I'm not much of a programmer so I don't know
364 what all this entails but I did download a NetFlow client agent/whatever for
365 Linux though.
366  .
367 It would also be nice to see Freeside be able to read Apache log files and
368 bill customers for web traffic that way as an option also. Plus an option to
369 bill for excessive disk usage without having to use quotas if you didn't
370 want to, would be a nice feature as well. So you could monitor with a script
371 or something to see how much disk space a user was using then get some
372 average and charge a certain amount for anything above some preset limit for
373 that account type. I might be able to hack something like this up, but I'm
374 not 100% sure where to start or if there is something out there that could
375 be modified or not.
376 .
377 Do you think that you will ever support the HKS CCVS (Hell's Kitchen
378 Software Credit Card Verification Software) since Red Hat bought them out
379 and is going to be including that for credit card processing when you buy
380 the professional version? What about possibly supporting the OpenCCVS which
381 is a GNU/GPL version of a credit card program? I haven't had time to comb
382 through the Freeside code to see how hard it would be to add support for
383 these as externally called programs.
384 .
385 Also any thoughts on help desk, and knowledge base stuff? Any thoughts on
386 this stuff, and how possible and what kinds of work or time frame would be
387 involved?
388 .
389 Tim Jung
390 System Admin
391 Internet Gateway Inc.
392 tjung@igateway.net
393
394
395
396            CVS via SSH (Score:1)
397            by platinum (jedgar at fxp dot org) on Thursday September 30, @07:13PM EDT (#4)
398            (User Info) http://www.fxp.org/~jedgar
399            The links above are your best bet for basic cvs server configuration. Once you have a pserver set up, you
400            may consider using cvs via ssh. All you need to do is the following: 
401
402            1) Have ssh and sshd set up on the client and server machines 
403            2) Set CVSROOT="joe@example.com:/home/ncvs" 
404            3) Set CVS_RSH="/usr/local/bin/ssh" 
405            4) Use cvs normally 
406            (Obviously, insert the proper host/paths above) 
407
408            You can also set up cvs/ssh to not need a password every time (similiar to an initial 'cvs login'): 
409
410            1) run ssh-keygen on client machine using no passphrase. 
411            2) copy/add ~/.ssh/identity.pub on the client to ~/.ssh/authorized_keys on the server 
412            (man ssh for more details) 
413
414            The main reason I mentio
415            CVS via SSH (Score:1)
416            by platinum (jedgar at fxp dot org) on Thursday September 30, @07:13PM EDT (#4)
417            (User Info) http://www.fxp.org/~jedgar
418
419
420 There's no way to do this currently, though it would be pretty
421 straightforward to modify the source - specifically, the _collect_
422 subroutine in FS::cust_main.
423 >
424 On Mon, Dec 13, 1999 at 04:05:32PM -0700, Jeff Garner wrote:
425 > Freeside will e-mail my users when they are billed if they are setup as
426 > billing.
427 >
428 > When setup by credit card it does not e-mail them.  Is there a way to
429 > turn on e-mail invoices for those who are billed via credit card?  Kind
430 > of like a recipt of billing....
431
432
433 doc: http://www.softagency.co.jp/mysql/qmail.en.html
434
435 sql1992.txt standard is 18 character column names.  shoot for that, not just
436 32 (postgresql default)
437
438 Also note that (AFAIK) Freeside won't display any package that has more
439 than one service on the "Add Customer" page.  The reason for this is
440 because there's no way to dynamically alter the displayed html form
441 based on which package is selected. One possible solution would be to
442 make an additional page that's used in the signup process that would
443 display the form for each package, like a MS-style "Wizard".  The first
444 page lets you select the package, then the second page has the custom
445 form with fields for each service in that package and a save button. Of
446 course, that would require a little perl work.
447 .
448 Later,
449 Scott Cruzen <sic@boernenet.com>
450
451
452 Your suggested script with back up /usr/local/etc/freeside, but will miss
453 any database not named `freeside'.  Both of our scripts are specific to
454 MySQL.  If you're interested in contributing to Freeside, maybe you could
455 work on a script which: reads the mapsecrets configuration file and then
456 each secrets file to find out what specific database engine(s) (MySQL,
457 PostgreSQL, etc.) and database(s) need to be backed up, then does so,
458 serializing backups of the same engine, i.e. stop mysql, do all the mysql
459 backups, start mysql, stop postgresql, do all the postgresql backups,
460 start postgresql, etc.
461 > #!/bin/sh                                                                     
462 > apachectl stop                                                                
463 > mysqldump -t freeside > fs-backup.sql                                         
464 > apachectl start                                                               
465 > tar -Pzcvf fs-backup-`date +%y%m%d%H%M%S`.tgz fs-backup.sql /usr/local/etc/freeside/                                                       
466 > rm fs-backup.sql                                                              
467
468 I chose to use counters in the filesystem because there is no standard way
469 to get the value of an auto-incrementing keyfield which is common across  
470 all databases (as seen through DBI/DBD).
471 .
472 It certainly wouldn't be a bad idea to use the database-specific methods,
473 when available.
474
475 htdocs/edit/svc_acct.cgi:
476 (Does the `*HIDDEN*' show up when you are adding a new account, and 
477 specify the password, then receive an error and are returned to the form?)
478
479 more DOC:
480 Thought some of you might be interested in this:
481   
482 <ftp://ftp.minivend.com/pub> has CyberCash compatibility modules for 
483 Paymentnet <http://www.paymentnet.com> and Authorizenet 
484 <http://www.authorizenet.com> which should allow you process transactions
485 using those services as well as CyberCash.
486
487 The files are named CCLib.pm.paymentnet and CCLib.pm_authorizenet,
488 respectively, and are installed by renaming to CCLib.pm and moving to your
489 site_perl directory.  Otherwise, follow the directions for Cybercash v2 in
490 htdocs/docs/config.html
491
492 DOC:
493 fs_passwd/ is a client-server replacement for the `passwd', `chfn' and    
494 `chsh' commands that updates the Freeside database.  (so for that to be   
495 useful, you'd have to be exporting that data periodically)
496   
497 fs_radlog/ is a client-server RADIUS log parser that stuffs the data into
498 SQL.  It isn't finished, and probably won't be unless someone who I can't
499 convince to use one of the RADIUS daemons that logs to SQL directly pays  
500 me money or something.
501   
502 fs_signup/ is a client-server signup server.  i'm just finishing it up    
503 now; probably isn't on your machine yet.
504
505
506 http://www.sisd.com/freeside/list-archive/msg00812.html
507
508 package definitions should be implicit allow wrt agent types, not implicit deny
509 (with the old behavior possible via a config file)
510
511 > So is there anyway it could be setup to allow you to select a "primary
512 > service" from each package?  This service would be the one you were prompted
513 > for.  Could the signup server then be expanded to allow users to go into
514 > their package and "turn-on" the remaining non-primary services(using the
515 > primary account.)
516
517 take the GPL'ed whois proxy stuff at www.geektools.com and turn it into
518 intelligence for Net::Whois.
519
520 A web version of the fs_passwd stuff would be nifty.   
521
522 If you have Cistron authenticating directly from MySQL, you can replicate
523 in real-time instead of exporting periodically.  See 
524 <http://www.mysql.com/Manual_chapter/manual_Common_problems.html#Replication>.
525
526 these go in docs:
527 <http://www.sisd.com/freeside/list-archive/msg00541.html> (was 546), and
528
529 and http://www.sisd.com/freeside/list-archive/msg00421.html (was 423)
530
531 > > 5: Is there anyway to get freeside to send a sysadmin a warning when a
532 > > credit card has expired?
533 No, but there should be.
534
535 Put this in the doc (quoting Mark Wells <mark@pc-intouch.com>):
536 >Of course, thanks to the sheer coolness of SQL and MyODBC, you can do
537 >whatever reports you want in basically whatever application you want.
538 >There's no need for Freeside itself to do any reports at all.
539
540 middle names and titles
541
542 On Wed, Jul 07, 1999 at 01:11:40PM -0400, Frank Nazario wrote:
543 > Playing and entering information to Freeside i encountered the following
544 > missing reports:
545
546 > View Customers by Agent
547
548 > View Pending Invoices
549
550
551 grep 'uncomment this to encrypt password immediately' site_perl/svc_acct.pm
552 Not to say that it shouldn't be a configurable option.
553
554 in site_perl/cust_main_invoice.pm (elsewhere?), error out if mydomain config file is gone
555 (at least until the idea of a default domain goes away)
556
557 FS::Record::qsearch does an eval every loop iteration (which is itself not
558 guaranteed to work across all DBD's and should be fixed).  This has got to be
559 slow.  Fix it.  (I think recent Perls might have a way to accept a variable
560 there, no eval needed?)
561
562 Could you have added /bin/sync, /sbin/shutdown, and /bin/halt to the
563 `shells' configuration file before importing, and removed them afterwords?
564 (even better if svc_acct.import did that automatically - it could just    
565 munge and restore @FS::svc_acct::shells... hmm.)
566
567 > BTW, Ivan, I am trying to verify in an additional database table that a
568 > particular user doesn't exist. This database is used to store email aliases a$
569 > additional POP boxes for our customers (kinda like AOL allows). I have toyed  
570 > with the idea of just writing the aliases to an email only svc_acct that
571 > doesn't write to the password file, but that isn't really how I want to do it.
572
573 Actually, I think that's a pretty good way to do it.  Cerkit contributed
574 support a little while back for svc_acct.pm and svc_acct.export for
575 multiple export targets.  It needs to be cleaned up and documented, which
576 I'll try to get to soon.  For this to work correctly, the svc_acct_sm
577 table should go away, along with the concept of a "default" domain.  
578
579 default setting for new packages should allow all agents to purchase them...
580 with a config file for the old behaviour
581
582 fix or replace Term::Query (Quiz::Question doesn't do what i need)
583
584 Check config file reading stuff from CPAN
585  
586 Authorizenet module from CPAN!
587
588 <http://www.math.fu-berlin.de/~leitner/mutt/faq.html> has a good y2k complience
589 statement!
590
591     I'm hoping Freeside can support arbitrailly complex pricing plans
592     because of a simple concept: all prices are perl expressions.  So if
593     you use `19.95' for example, perl evalates that to be `19.95'.  But if
594     you need to do a complex pricing scheme, you just need to write an
595     appropriate perl expression, which will most likely pull data from the
596     database to return pricing.  Some things will already log to SQL; for
597     example most RADIUS servers can or have a patch available.  Getting
598     Freeside to bill based on any sort of data then becomes a matter of
599     importing the data into the database.
600  
601     There are some issues involved with pro-rating, partial month charges,
602     that sort of thing.  Expressions will need a standard way to have the
603     applicable time/data ranges passed to them.  Also the expressions are
604     currently running under the Safe perl module, and the opmask might not
605     be right in all situations.  I'll try to spend some time working on
606     this if you are using it.
607
608 > 2. can customers view their bills on-line.                                    
609  
610 Not yet; it needs to be proxied from Freeside to a customer web server in
611 a secure way using something not completely unlike the fs_passwd,
612 fs_passwdd, fs_passwd_server trio.
613
614
615 > Lastly, if someone over pays on an invoice, the credit part does not flow
616 > over to other invoices..
617
618 The total balance flows over correctly, but individual payments don't.
619 The code you're looking for is in FS::cust_pay::insert
620
621 The question of what to do with overpayments that don't have another 
622 invoice to flow into (yet.. or possibly not) is still an open one.    The
623 legacy system Freeside replaced long ago had a separate place for this
624 (payments waiting for an invoice) for each customer, and it gave our
625 bookeeper fits.
626
627
628 option to relax username uniqueness in favor of username+domain or mail/shell
629 vs. radius to ease import for isp's with namespace problems or who buy others.
630
631 do i have to store anything for radius realms besides regular radius attributes
632 (which are handled fine now)?
633
634 warn or complain or something when invoice_from is empty (and we use it)
635
636 Right now Freeside uses the `freq' field of a package definition as a 
637 number of months.  The specific section of code you're looking for is in  
638 FS::cust_main::bill:
639         
640         #change this bit to use Date::Manip?
641         #$sdate=$cust_pkg->bill || time;
642         #$sdate=$cust_pkg->bill || $time;
643         $sdate = $cust_pkg->bill || $cust_pkg->setup || $time;
644         my ($sec,$min,$hour,$mday,$mon,$year) =
645           (localtime($sdate) )[0,1,2,3,4,5];
646         $mon += $part_pkg->getfield('freq');
647         until ( $mon < 12 ) { $mon -= 12; $year++; }
648         $cust_pkg->setfield('bill',
649           timelocal($sec,$min,$hour,$mday,$mon,$year));
650         $cust_pkg_mod_flag = 1;
651   
652 ..and when I went poking for this, looks like it tells us just what needs   
653 to be done!  Hehehe...
654
655 Date::Manip can handle cool things like "+ 1 month" (actually the current
656 case of /^(\d+)$/ would have to be added as a special case of "+ $1 
657 month") and "+ 30 days" (what you need) and even "+ 5 business days" !
658
659
660 On Wed, Apr 28, 1999 at 08:38:16PM +0000, Kristian Hoffmann wrote:
661 > I can't quite seem to figure out how this exporting works.  From what I
662 > understand, when you run svc_acct.export, it rewrites the /etc/passwd,
663 > /etc/shadow, etc. files.  Is this only for initial setups with the
664 > export hooks being in the pm's?
665  
666 You can use both, or just one method.  The configuration files control    
667 this.  One of the things in the TODO is to take out the last few things   
668 that aren't customizable wrt this and put them in config files.
669
670 http://www.daemonnews.org/199905/user-mgmt.html
671
672 Term::Query doesn't install out of the box from CPAN.  Fix it (and get it 
673 submitted upstream!), or remove requirement from bin/svc_acct.import and
674 bin/svc_acct_sm.import and take it out of the install instructions.
675
676 use this cool link to explain the Freeside API
677 ftp://cpan.nas.nasa.gov/pub/perl/CPAN/doc/FMTEYEWTK/easy_objects.html
678
679 Multiple tax rates by geographic region (county, state, and county) are   
680 supported; just choose View/Edit tax rates from the main menu.
681
682 Multiple tax rates by package are not (yet) supported.
683
684 On Wed, Jul 07, 1999 at 12:13:36PM -0400, Shaun Batterton wrote:
685 > How would you handle something like multiple tax rates and multiple   
686 > states?  For example in Connecticut, they just changed computer and/or
687 > data processing services to 3% (whatever that is), and everything else
688 > is 6%.
689
690
691 > Second, when trying to add a new user I get two types of errors; first one
692 > is when I place an e-mail address and select the "submit," Freeside
693 > complains with "Error: Unknown local account (specified literally)"
694 .  
695 You probably put a (local) email address in for email invoices.  Freeside
696 stores these as references to the database records, so (for example) they
697 follow username changes.
698 .
699 I'm guessing you put in the email address that you were creating, and got
700 that error because it didn't exist yet.  Sounds like a buglet to me.  I'll
701 try to fix that soon; in the meantime you can add the invoicing email 
702 address afterwords.
703
704 (workaround for postgres before 6.5) (unlikely to ever be implemented)
705 In the mean-time, this could probably be fixed with the reverse of        
706 the kludge in FS::Record::new.  This removes `$' and `,' from money fields
707 coming out of the database.  Something which fixed up the data so Postgres
708 was happy with it could go in FS::Record::_quote, for data going into the
709 database.
710
711 our data display problem might be a Freeside problem wrt not using 
712 Oracle-compatible DBI syntax (fixed using the return value from $sth->execute
713 as a number of rows - something else?).
714
715 hooks for arbitrary commands out of configuration files
716 svc_acct.pm svc_acct_sm.pm etc.
717
718 Add this to a FAQ, along with doing it for middle names:
719
720
721 >  What I'm finding difficult is how to easily 
722 > customize fields.  For example, I am trying to add a "middle name" field
723 > to the Customer Edit, view, etc.  If I'm going about it right, it appears
724 > I have to edit the cust_main.cgi under edit and edit/process and the
725 > site_perl/cust_main.pm, as well as other things.  Perhaps you could shed
726 > some light on the best way of doing this.
727
728 You have the basic idea.  To implement that completely, I would:
729 - Add the new field to bin/fs-setup for new users
730 - Document the field in htdocs/docs/schema.html
731 - Document the change in a new file, htdocs/docs/upgrade4.html
732 * Run bin/dbdef-create
733 * Add the new field to edit/cust_main.cgi and edit/process/cust_main.cgi
734
735 For bonus points, I'd grep around for the various bits which use "$first 
736 $last" or "$last, $first" and replace them with a method call in cust_main.pm,
737  , like search/cust_main.cgi
738
739 document security model:
740 Don't forget about Apache usernames - since, via the mapsecrets file, each
741 user can login to the SQL database with a different username and
742 password, you can utitilize the security model of the SQL database as
743 well.  Also, each username here can point to a different configuration
744 directory where you could store user-specific configuration info.  Then   
745 you could link each username to one-to-many agents. 
746 (The web demo works using a trivial version of this.)
747
748 Yes, queue processing or the equivalent via checkpoint fields on various  
749 talbes (which you pick up via a pretty simple SELECT) would be really 
750 nice too.
751
752 default (and ordering) state/county/country config file
753 expand the
754 cust_main_county table to provide a preferred ordering, so the most common
755 entries would be at the top of the selection box.  automatically, based on
756 recent selections?
757
758 hmm... maybe svc_acct__shell should check off the legal shells list if
759 applicable?  yeah... cool.
760
761 payinfo field should me much larger than 16
762
763
764 [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.
765
766 javascript (yuck!) "are you sure?" confirmation on cancelations, etc.
767 (view/cust_pkg and view/svc_*)
768
769 get rid of time2str("%D") which formats dates in a non-y2k-safe looking fashion
770 (all the actual date handling uses UNIX timestamps and is fine)
771
772 uncomment expire in view/cust_pkg.cgi and find the expire cron from fsold
773
774 (Test this)
775 one-time/per-customer/? changes in rates and descriptions ('remembered
776 invoices'): implement by creating a new package on the fly... but it isn't 
777 associated with any agent types so it won't show up for other customers to buy.
778 (but also... make sure they go away when the customer does! - need this? :
779  one-off package edits! : need a cust_pkgs or cust_part_pkgs or something table,
780  with custnum and partpkg (like type_pkgs)
781 (what happens if you hit "custom pricing" but the pricing is already custom?)
782
783 Lay out any remaining ugly forms better.
784
785 remove "records identical" warning?  gets in the way of more important stuff.
786 or fix logic which tries to update identical records??
787 1.2 should be quiet enough that the error log is useful, hopefully.
788
789 Postgres has a maximum column length of 31 characters (but see NAMEDATALEN in
790 postgres_ext.h).  part_svc has columns like: svc_acct__radius_Attribute_flag
791 (22 characters!)  It seems that stuff over the limit is silently ignored,
792 so we get 4 characters back.  So, Radius_Attributes are max 13 characters with
793 stock Postgres.  see rfc2138 for what's affected
794 What's a good fix?  (besides recompiling postgres with NAMEDATALEN 64)
795 (mysql has a 64 character max column length.  others?)
796
797 [Mon Mar 29 06:57:56 1999] -e: Use of uninitialized value at /usr/lib/perl5/Date/Format.pm line 333.
798 (when sending mail in cust_main.pm::bill or svc_domain.pm)
799
800 look at DBIx::Recordset!  (and Tie::DBI, and...)
801
802 undefined conf/lpr gives this uninfomative error:
803 [Fri Feb 26 16:42:36 1999] bill.cgi: Can't do bidirectional pipe at
804 /usr/lib/per
805 l5/site_perl/FS/cust_main.pm line 629.
806 [Fri Feb 26 16:42:38 1999] bill.cgi: Error closing : Broken pipe at
807 /usr/lib/per
808 l5/site_perl/FS/cust_main.pm line 631.
809 So give a meaningful error!
810
811 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
812
813 i10n: Apache::Language
814
815 Apache::Session?  Other useful Apache::* ?
816
817 email invoices are only sent for the BILL payby.  If setup, should statements
818 (since they're not invoices) be sent for COMP and CARD as well?
819
820 $cgi->keywords is causing the (hard to trace) error:
821         Use of uninitialized value at (eval 5) line 5
822
823 edit/cust_main.cgi gives an uninformative error message:
824 > Can't call method "agentnum" without a package or object reference at   
825 > /usr/local/apache-ssl/htdocs/freeside/edit/cust_main.cgi line 116.
826 if there are no agents.
827
828 (is this missing on any web screens?  (easy with $cust_svc->label)
829 Add the ability for services to filter information up to the package level
830 for web screens, so you can select a particlar package based
831 on username or domain name, etc.
832
833 Allow a cancelled/suspended/active status from packages to bubble up to
834 the customer lists.  Put active, then suspended, then cancelled accounts.
835 Similar ordering on the package listing inside a single customer.
836
837 false laziness: edit/cust_main.cgi got some parts copied from edit/svc_acct.cgi
838 the web interface in general needs to be redone in a more abstract way.
839
840 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.
841
842 subroutine the where clause (eventually all SQL) as OO perhaps (has anyone done this?)
843
844 add a select method to FS::Record?
845
846 one-time/per-customer/? changes in rates and descriptions ('remembered
847 invoices'): implement by creating a new package on the fly... but it isn't 
848 associated with any agent types so it won't show up for other customers to buy.
849 (but also... make sure they go away when the customer does! - need this? :
850  one-off package edits! : need a cust_pkgs or cust_part_pkgs or something table,
851  with custnum and partpkg (like type_pkgs)
852 (what happens if you hit "custom pricing" but the pricing is already custom?)
853
854 You can't delete the stuff under administration yet.  Add this,
855 _including_ making sure the thing you are deleting is not in use!
856
857 add links on view/cust_main.cgi to setup services, like view/cust_pkg.cgi
858
859 FS::cust_pkg _require_'s FS::$svc, but this won't work with %FS::UID::callback
860 loading of configuration.  (pry need same idea, but will run immediately if
861 context allows).  Looks like error is masked by 'use FS::cust_svc' which in
862 turn 'use's FS::{svc_acct, svc_acct_sm, svc_domain}' which is now explicit
863 w/comments in source
864
865 Allow a cancelled/suspended/active status from packages to bubble up to
866 the customer lists.  Put active, then suspended, then cancelled accounts.
867 Similar ordering on the package listing inside a single customer.
868
869 svc_domain.pm mail sending uses Date::Format which doesn't seem to pick up 
870 correct timezone.
871
872 view/svc_domain.cgi needs to know the domain might be unaudited (cosmetic)
873
874 remove whois_hack set to 1 for svc_domain.pm?  add all known registries and
875 whois accordingly.
876 .us domains and others!
877 site_perl/svc_domain.cgi (hmm... or maybe should have a button?  or maybe svc_domain.pm should handle this) should set $whois_hack for non-internic domains, so you can add them...
878
879 turn on the depriciation warnings for [e]idiot in FS::CGI. Stop using [e]idiot
880 the last places it is (htdocs/search/ htdocs/misc/ htdocs/misc/process)
881
882 (test cust_main.pm with cybercash v2 and v3, especially with the callback
883  stuff AND with mod_perl w/cybercash v2 kludge in package main)
884 (callback stuff should be eliminated by now)
885
886 bah, table/itable/*table in FS::CGI is silly.
887
888 doc Apache::AuthDBI as well
889 ..
890 Provide sample httpd.conf files.
891
892 hey look: Tie::DBI!  Check that out.  Override its commit with something that
893 does perl-side caching for ? a performance improvement and as an emulation
894 layer to plug in f.ex mysql's atomic transactions
895 ..
896 Record.pm uses does some non-portable DBI things.  MySQL and Pg seem fine.
897 Fix it anyway unless we migrate to Tie::DBI.
898
899 faq
900
901 cust_bill.pm uses '==' comparison on dates because they're currently ints
902
903 config file for allowed card types
904
905 write instructions for adding new services w/svc_Common.pm.  Get rid of all
906 places where svc_* tables are hardcoded (rename svc_acct_pop to part_pop so
907 we can do that)
908
909 test and document libapache-dbi-logger (woo!)
910
911 radius logfile parsing and perl expression check.
912
913 Fix in cust_bill BUGS: 
914 There is an off-by-one error in print_text which causes a visual error (Page 1
915 of 2 printed on some single-page invoices).
916
917 fields should be a method against a FS::Record or derived object, as well as
918 being something you can call as FS::Record::fields('tablename').  Might
919 even be able to handle both in the same routine (that would be neato).
920
921 Immediate removal of incorrectly entered check payments (can't take too
922 long to do this, or accounting is fubared).
923
924 Add code to move from one service to another (POP to SLIP/PPP, etc.).
925 This _should_ be possible by working off the rules in part_svc rather than
926 hardcoding anything in.  The rules in part_svc may need some elaboration,
927 perhaps.
928
929 Use ut_ FS::Record methods in all derived classes (possibly some from dbdef?... eventually all from dbdef??? - but then `dbdef-create' would be impossible as there would be metadata we couldn't ask the backend for.  hmm.)
930
931 (bring back from fsold, ) Generalize config-sending stuff and make more configurable.
932 Expand the HylaFAX interface (also possibly generalize for other fax
933 softwar ie .comfaxe); allow things like arbitrary faxes of sales
934 literature, specific troubleshooting documents and so on.  Maybe even
935 allow users to do this (though that might not belong in Freeside).
936 misc/sendconfig.cgi
937 misc/process/sendconfig.cgi
938 Configure fax recipients via a separate box rather than using the finger
939 name or first+last from cust_main.
940
941 move all phone number logic out of Freeside - let HylaFAX or whatever
942 handle it.
943
944 soundex searches for customer name and company?  where are free soundex tools? (standard Text::Soundex duh) - I could have sworn I saw Text::Soundex on CPAN?!
945
946 should be able to link on some field in email alias (right now you can link
947 on username or domain with a fallback to svcnum)
948
949 generalize and make configurable new invoice printing scheme in FS::cust_main::collect (past due)
950
951 deleting an svc_domain should delete all associated svc_acct_sm records.
952 same with a svc_acct.
953
954 periodic password encrypter
955
956 Automated, configurable notification, suspension and cancellation of
957 defunct accounts.
958 ...
959 expire cron job
960 ...
961 Allow for a future setup date on accounts.
962
963 sub AUTOLOAD in FS::Record should warn? die? if used with a non-existant column
964 name?
965
966 edit (not just import, export and allow default/fixed) arbitrary radius stuff
967 in svc_acct
968 edit/svc_acct.cgi and edit/process/svc_acct.cgi should deal with arbitrary radius stuff
969
970 radius import should take DEFAULT entry and put it in /var/spool/freeside/conf/radius-default ; svc_acct.export should use it (and doc)
971
972 in UI, s/State/State\/Provence/go and s/County/County\/Locality/go
973
974 what else (besides l10n) for i18n? (money!)
975
976 audit htdocs/* for things that should be libraried and things that should be
977 new methods on the objects (need to do this before implementing a new UI)
978 all the big things are done
979
980 some places we die() where we should &FS::CGI::idiot (and perhaps vice-versa).
981 Decide based on whether or not the "error" should show up in logs.
982
983 all .cgi's should use standard header/footer and idiot() subroutines.  maybe HTML:: perl modules
984 for HTML creation.  Maybe Embperl or something along those lines.  ?
985
986 When running bin/bill, Fix this (Annoying but harmless):
987 Use of uninitialized value at /usr/local/lib/site_perl/FS/cust_pkg.pm line 99, <ADDRESS> chunk 4.
988 Use of uninitialized value at /usr/local/lib/site_perl/FS/cust_pkg.pm line 102, <ADDRESS> chunk 4.
989 Use of uninitialized value at /usr/local/lib/site_perl/FS/cust_pkg.pm line 105, <ADDRESS> chunk 4.
990
991 all cgi (but internal to the isp) places where package names are listed should also have
992 comment (like agent_type)
993
994 clean up $recref and other silliness and use -> calls where possible, or
995 one other alternative.  clean up everything else.
996 should FS::Record use Tie::Hash?  That would be very clean, but where do we
997 store the other information?  Maybe you could ask any FS::Record object for a
998 tied hash?
999
1000 change all file access from regular open(FILE,) stuff to OO, because of 
1001 problems scoping and passing filehandles like that.
1002
1003 the web interface should create a new object and use it instead of a blank
1004 form for new records.  the create method of svc_ objects should set defaults
1005 (from part_svc).
1006
1007 sub check in man FS::table_name should be rewriteen.  Get rid of $recref
1008 stuff.  Make sure all fields that refer to other database are checked.
1009
1010 Integration with signup disks (are there any free ones?  Netscape?).
1011
1012 One-button cancel (+refund) for lusers who can't get online.
1013
1014 Keep information on virtual web servers (hostname, IP, host machine,
1015 directory, etc.) and export this information for importation into the ISPs
1016 web farm. 
1017
1018 Remove requirement that the first mail alias be the catchall?  Still make
1019 sure only one catchall per domain is defined in any case, of course. 
1020
1021 Ability to move cust_pkg records from one customer to another? (proably
1022 will need to cancel the old and create a new like when we move services
1023 between packages). 
1024
1025 Auto-increment expired cards one year, and try again?
1026
1027 More non-US stuff - zip codes, country codes, foreign currencies, etc.
1028
1029 cust_refund.{cgi.pm} need to do cards xaxtions.  (now we only have cust_credit)
1030
1031 Nicer set of integrated reporting possibilities, like weekly sales totals
1032 by customer, package, agent, referral, etc., aging reports sorted by lots
1033 of different things, and so on.
1034
1035 Client/server setup for users to modify their own passwords, shells, etc,
1036 via passwd or secure web interface (prelminary passwd/chfn/chsh
1037 replacement done).  Complicated by the fact that we don't want to allow
1038 incoming connections to the machine running Freeside, so we probably need
1039 to have a daemon on each external shell or web machine that is contacted
1040 by the Freeside machine.  Be very very careful for both traditional
1041 security issues and DoS problems. 
1042
1043 An extension of the above to allow users to modify selected parts of their
1044 own information, order and cancel services.  A web interface for new
1045 customers.
1046
1047 Expand domain name stuff to house all domain information.  Export
1048 named.boot/named.conf (primary and secondary) and named.{domain} files.
1049 Add more registries (not just InterNIC's com org net edu)
1050
1051 Nice postscript paper invoices, rather than current ASCII invoices.
1052
1053 think about race-condititions in FS::Record and derived ->check ->insert
1054 and so on, uid and username checks in svc_acct, etc.
1055
1056 Move to rsync over ssh file exportation rather than scp.
1057
1058 check 'n fix the proactive password checker. (cracklib?)
1059
1060 refunds of "BILL" payments: generate pseudo-check.
1061
1062 write batch senders and batch parsers for the different credit card processors
1063 people use/
1064 More CC processors/methods.
1065
1066 you should be able to fiddle the setup date in cust_pkg. (at least initially)
1067
1068 delete options in administration section
1069
1070 write a generic batch senders and batch parsers.
1071
1072 need a way to override svc_acct export on a per-machine basis; just use config files based on machine name i suppose; document that. (no, import desync_hosts
1073 type stuff from cerkit)
1074 ...
1075 add a table with column of export services (passwd, shadow, master.passwd, .qmail file update, dns update, etc.) and rows machine groups and whether or not to export that (and any necessary parameters).  wasn't matt (vunderkid, not matt@michweb) working on this?  find him?  each machine goes in a group of its own as well as a group based on function.  add a table with only svcpart and machine group.  now, when you import from each machine, it can get its own accounts with one svcpart and universal accounts with another svcpart.  (though that does make the username duplicate checking more interesting)
1076
1077 you should be able to get column types as a method against an FS::Record object
1078 as well as dbdef->table($table)->column($column)->type
1079
1080 move to perl module for fuzzy and soundex searching.
1081
1082 package view needs to list extraneous services; we need to prevent the
1083 creation of them so this never happens (and mark it as such in the source)
1084 (the creation problem should be fixed - though they will still happen if people
1085 fsck around in the data manually, so list them anyway)
1086
1087 add attribute dictionary to fs-setup as a menu, plus analyze users file to
1088 decide automatically
1089
1090 Check for and report on duplicate billing accounts (cust_main, though many
1091 will have a need for these so probably don't disable them outright.)
1092
1093 create a ->warn as well as a ->check method for all FS::table classes?
1094 (see above)
1095
1096 something to automate making a release and updating the web demo
1097
1098 export a debian-style (also redhat and?) /etc/group file aswell!
1099
1100 svc_acct_sm.import qmail import should pull in recipientmap people too.
1101
1102 .pm's like svc_acct.pm which need to do time-consuming things like ssh remotely
1103 should fork and do them in a child.
1104
1105 i18n/l10n: take ALL messages and catalog them in english.txt or in database or something, so we can eventually go int'l.  int'l currency support would be a help aswell.
1106
1107 get some of { city, county, state, zip } from the missing bits if
1108 possible (where can i get the data to do this?  usps.gov?)
1109
1110 additional interfaces (perltk?  java?)
1111
1112 Put the GPL notice in all files.
1113
1114 integrate w/IDEA's signup server
1115
1116 $cust_bill->owed database field to be eliminated, replaced by a method call
1117 that calculates on the fly.  make sure to grep for ->(get|set)field('owed') 
1118 same for cust_credit->credited
1119
1120 Export quota information.
1121
1122 move all configuration to a central place.  maybe in blob's in the
1123 database.  maybe even things like the code to execute when a username is
1124 changed can be in there, so less of the distributed scripts change between
1125 different sites.
1126
1127 Implement setup and recurring fees as Safe perl expressions rather than
1128 numbers, to allow for variable-rate services.  Backwards compatibility is
1129 obtained because { 43 } in perl is still 43.  :)  Define API to pass
1130 starting and ending dates and any other necessary data to expression
1131 (fees are currently evaluated as Safe expressions but more work needs to
1132 be done to define an opmask for various needs, write examples
1133 (usage-based billing, etc.) and so on).
1134 ...
1135 Add the ability to modify the next billing date in cust_pkg, and take
1136 appropriate action.  This will allow the implementation of pro-rate/1st of
1137 the month billing as well as the ability to manually fiddle with
1138 anniversary dates in cust_pkg, so you can sync a customer's anniversary
1139 date even if you're using anniversary billing (manually or automatically).
1140 (now with above, we need to have a way to automatically pro-rate /^(\d+)$/
1141 charges - anything more complicated should figure it out itself given
1142 starting and ending dates [document that!])
1143 ...
1144 Daily Radius log parsing into database; other logfile formats?
1145 ...
1146 Callbacks to enforce hourly limits on accounts (suspend until the end of
1147 the billing period?), for those who limit customers rather than tack on
1148 extra charges.
1149
1150 Flag packages (part_pkg) as taxable or non/taxable as some ISPs (for
1151 example) need to charge tax on equipment but not service (separate flags
1152 for setup and recurring fee... or perhaps a setup_tax, setup_notax,
1153 recur_tax and recur_notax fees, and possibly something more flexible if
1154 there is need).
1155
1156 Allow for a variable number of invoices for customers who need multiple
1157 copies.
1158
1159 Add a mail alias service with table svc_acct (not domain mail aliasing
1160 which is domain with svc_acct_sm)
1161
1162 (bring back from fsold) Change customer comment field from its current kludge to something more
1163 workable.
1164
1165 Better work orders with more information.  Should eventually open a ticket
1166 when we have such a thing.
1167 edit/svc_wo.cgi
1168 edit/process/svc_wo.cgi
1169 Call tracking and trouble tickets.
1170
1171 More accoutability for complimentary accounts: approval, expiration, term
1172 (no more than x months in advance) and notification.
1173 Flag particular users (or all users, for that matter) as having their
1174 passwords hidden and/or locked from users of Freeside (maybe need Freeside
1175 security levels first?). 
1176 ...
1177 Better Freeside-level configurable access, for those ISP's who have
1178 employees they can't trust.  Right now you're "stuck" with setting up
1179 .htaccess stuff yourself.  This should really just be integrated. 
1180
1181 configuration/setup should get web interface
1182 ...
1183 /usr/local/etc/freeside should be configurable
1184 ...
1185 (probably as part of some automated installation process?)
1186
1187 This requires some serious magic in FS::Record:
1188 ok, if date_type in fs-setup is to be something besides int,
1189 now we need to create wrappers
1190 for them so they behave identically across RDBMS's, ie date pops out as as
1191 UNIX timestamp (or an object of some sort? maybe even a blessed $obj which
1192 is a string not a hashref for backwards compatibility?) and so on. (remember
1193 to treat '0' as Not a Date instead of 1/1/70.
1194
1195 Add Freeside-level transactions for RDBMS's which don't support
1196 transcations?  (Currently we assume a minimal RDBMS which has no rollback,
1197 transactions or atomic updates).  Or just require a RDBMS that supports
1198 rollback and/or atomic updates and get rid of the work-arounds?  The /rdb
1199 interface had this kludge on top of it but is a technical dead-end in most
1200 other ways, unless it can gain an SQL parser and DBD interface.
1201 ...
1202 if i'm really bored, find the /rdb interface in fsold and port it to NoSQL,
1203 and while I'm add it add interfaces for AnyDBM_File tied hash.. hmm.  Shouldn't
1204 an FS::Record have something to do with a tied hash?  But we don't want
1205 performance to go gaga... maybe something with commit to help out here?
1206 ...
1207 Ok: FS::Record gives you a tied hash, and you get methods for commit, etc.
1208
1209 Better automated comparison of our CC records with processors (CyberCash,
1210 at least, has not always had 100% accuracy, though recent versions are
1211 much better) 
1212
1213 Expect or other pty based login check, where we actually connect to a
1214 terminal server or shell machine and test logging in as the user (if we
1215 are keeping a cleartext password for that user)  (This is something tech
1216 support often needs for new customers)
1217
1218 Use cust_main table for pre-sales tracking as well?
1219
1220 Automatic commision report and check generation via freq and prog (to
1221 become a Safe perl expression) fields in agent table, and possibly others.
1222
1223 Database and add a mailed-out date and method for disk/CD mailing, so a
1224 customer can call and you can say, "sent on xx/xx/xx via {US Mail, Fedex,
1225 UPS, etc}" 
1226
1227 Inventory tracking for physical items such as routers (for sale or
1228 lease... probably doesn't make a difference in the ordering... but if you
1229 cancel a router lease the inventory should come back.  hmm.)
1230
1231 -- Matt's wishlist ---
1232
1233 From matt@michweb.net Fri Feb 20 16:39:53 1998
1234 Date: Thu, 19 Feb 1998 23:20:11 -0500
1235 From: Matt Simerson <matt@michweb.net>
1236 Reply-To: quadran-developer@netgoth.com
1237 To: quadran-developer@netgoth.com
1238 Subject: Re: Welcome to quadran-developer
1239
1240 >Whats it based on and what is it supposed to do?  I'm interested, but
1241 >unfortunatly, I don't have that much time to help on the project (I'm busily
1242 >working on one of my own based around MySQL and Qt right now -- don't know
1243 >if it will be GPL'ed or not yet -- we'll probably just use it in house since
1244 >it is designed around our system)...
1245
1246 That's what I set out to find, but didn't find anything on the web site.
1247 I'm looking for something that will do the following:
1248
1249 Single point of entry for users on a secure system:
1250         Creates account on user (public) systems
1251                 update /etc/passwd/master.passwd file
1252                 update radius database (if necessary)
1253         Set up up disk quotas (although I hacked adduser to do this)
1254         Option for adding user to a mailing list(s)
1255         Export of new user info to customizable report (for automated entry
1256 into
1257                 accounting software, etc...)
1258
1259 Automated billing:
1260         Export credit card info for batch processing and have hooks built
1261                 in for other forms of electronic processing.
1262         Batch-Payment (apply payments from formatted text file).
1263         Customizable reports for manual entry/importing into Accounting
1264 software
1265         Email or laser print invoices
1266         Sanity checks credit card numbers before processing (code available)
1267
1268 Simple method for disabling an account.
1269         Arbitrary Expiration Dates (on a given day, in x days)
1270         Remove from radius.
1271         Changing password to '*'
1272         Virtual customers disabling dns, http server, log processing, etc..
1273
1274 Billing for different account types:
1275         Dialup monthly flat rate. Prorates for partial months.
1276         Dialup monthly flat rate for x hours + hourly usage.
1277         Dialup email only
1278         Email only accounts
1279         Virtual Web accounts - w/multiple mailboxes
1280         Leased line accounts
1281         Disk space used over quota.
1282         Tech support minimum + hourly charges
1283         Other for misc stuff (modem, RAM, etc...)
1284
1285 Per user definable RADIUS attributes (ties in with above)
1286         Fixed IP
1287         Simultaneous Use
1288         IP filters (for dialup email only)
1289
1290 Keep logs of modem usage generated daily from radius accounting logs stored
1291 on multiple radius servers.
1292
1293 Keep logs of disk usage generated from quota.
1294
1295 Method of adding virtual domains to your system:
1296         Automatically grabs an IP address from a preassigned pool.
1297         Creates a domain.com database file from database fields
1298         Updates /etc/named.conf or /etc/named.boot and reloads named.
1299         Add's virtual.com to /etc/sendmail.cw or qmail control files.
1300         Edits your web servers httpd.conf file and restarts http server.
1301         An optional section for adding vif's can be added if the users OS
1302                 supports adding them on the fly. Otherwise it's up to the end
1303                 user. Make a hook that can run a custom script that the user
1304                 tweaks for his system.
1305         Update or create the config file your web stats analyzer needs. I've
1306                 done this for analog (free) and http-analyze. Probably
1307                 should only officially support analog and let users hack
1308                 it to their hearts desire.
1309 I've already written scripts that do most of the virtual web stuff on my
1310 system...in bash. Shouldn't be hard for a perlmeister to convert. In fact,
1311 as long as all the info was stored in the database (username, domain name,
1312 and ip pool) this could easily just be run as an external script that the
1313 user tweaks to match his system.
1314
1315 We use a great accounting software (M.Y.O.B) that does all the AP, AR,
1316 Payroll, Tax stuff, and most everything else we could need. It's already
1317 set up for the type of checks we have, etc, etc... I just need something to
1318 do the billing part. I can import/export sales and payments directly once
1319 the billing part is done. You can't write accounting software as good as
1320 M.Y.O.B. for $120.
1321
1322