[freeside] Adding fields to tables, was: Re: [freeside] signup.cgi errors
ivan
ivan at 420.am
Tue Jun 6 14:51:33 PDT 2000
On Tue, Jun 06, 2000 at 02:13:02PM -0400, Joe Englert wrote:
> Ivan,
> Your advice worked like a champ. Now I have a checkbox on the customer
> edit/add script that sets a flag in the cust_main table. I reference this
> value in cust_main.pm to determine whether or not to check and save the
> new optional billing contact information.
> Can you tell me what modules and/or scripts look at the contact
> information? I'd like to know all the places I need to add some
> conditional logic to make sure the right person receives the bill. Thanks
> for the help.
The `collect' method in cust_main.pm emails or prints the bills, and the
`print_text' method in cust_bill.pm provides the text which is emailed or
printed.
> Joe
>
> On Thu, 1 Jun 2000, ivan wrote:
>
> > On Thu, Jun 01, 2000 at 02:29:31PM -0400, Joe Englert wrote:
> > > Hi Ivan,
> > > I'm in the process of adding some bonus fields to the cust_main
> > > table. We need the ability to send bills to someone other than the
> > > contact person.
> > >
> > > After adding fields to the table and some more widgets in the
> > > edit/cust_main.cgi file, the page will display fields I've manually edited
> > > but will not write out edits made from the page. After some tracing, it
> > > looks like the edit/process/cust_main.cgi is looking through all the
> > > name/value pairs sent to it and relying on FS/FS/cust_main.pm to handle
> > > the posting.
> > >
> > > How can I add fields to the cust_main object, or otherwise
> > > expand the fields associated with a customer? Are there any pitfalls
> > > - like files that are relying on the current structure that would
> > > also need to be changed - that I should be aware of?
> >
> > To add fields to the cust_main table:
> >
> > 1) add the fields to the database
> > 2) (possibly) add the fields to fs-setup if you want new databases to have
> > them.
> > 3) add the fields to FS/FS/cust_main.pm, specifically a data check/untaint
> > in the _check_ subroutine (and reinstall)
> > 4) run bin/dbdef-create to update the database description files
> > 5) modify the .cgi user interface code
> >
> > HTH.
> >
> > In the future, please use a new subject for new messages, rather than
> > replying to an unrelated question. (Simply hitting "Reply" and changing
> > the subject is not adequate; this leaves an "In-Reply-To:" header, which
> > threads your message for those of us fortunate enough to use threaded
> > mailreaders.)
> >
> > --
> > meow
> > _ivan
> >
>
--
meow
_ivan
More information about the freeside-users
mailing list