[freeside] Service numbers

ivan ivan at 420.am
Tue Nov 21 23:50:17 PST 2000


On Wed, Nov 22, 2000 at 05:38:45PM +1000, Tim McCullagh wrote:
> HI Ivan
> 
> The reason there is a 0 in the cust_pkg record is because when of how I
> imported my legacy data.  It has inserted the default value 0 into the field
> for me which has resulted in this error. (so it would seem)

Your legacy data was supplied incorrectly if it caused the import script
to do that.

> Is there a way to change the package number to username reference?

I don't know what you're talking about here.  If you're asking if you can
change the cust_pkg records, you can use dbimon, dbish, or any other
database application to change the cust_pkg records and attach them to a
customer.

> 
> maybe I should drop the dbase again and import the data again
> 
> Should the legacy file have a unique field for each record that could be
> inserted as the cust_pkg number?

No, the package number (pkgnum) of the cust_pkg table, being the primary
key, is autogenerated when the import script creates a cust_pkg record.

See htdocs/docs/schema.html and please be more precise in the future,
specifying the table and column names you're asking about.

> TIA
> 
> Tim
> 
> 
> 
> 
> > Hi Ivan
> >
> > I removed the service numbers to reset them, now I am getting the
> following
> > error message
> >
> > Software error:
> > No cust_main record for custnum 0 at
> > /usr/local/www/htdocs/freeside/search/svc_acct.cgi line 143.
> 
> This error message is curious - it results because you have a customer
> package (cust_pkg record) that contained "0" as a customer number
> (cust_num.custnum) - and of course, there is no customer "0".  I
> can't imagine how you got your database in an inconsistant state like
> that.
> 
> >
> >
> > Should I have removed them or shoudl I have reset the numbers to 0.?
> >
> > TIA
> >
> > Tim
> >
> >
> > On Wed, Nov 22, 2000 at 01:45:24AM +1000, Tim McCullagh wrote:
> > > Hi Ivan,
> > >
> > > When I have got freeside to work I decide to drop the data base and
> start
> > > from the beginning again.  That all works fine, however when I go to
> > > recreate my services again it starts from 4 not 1 as the service number.
> > Is
> > > there some way of reseting this to 1 again?
> >
> > rm /usr/local/etc/freeside/counters.<data_source>/part_svc.svcnum
> >
> > > I suspect that the customer numbers will be the same,   can they be
> reset
> > as
> > > well?
> >
> > rm /usr/local/etc/freeside/counters.<data_source>/cust_main.custnum
> >
> > --
> > meow
> > _ivan
> >
> >
> 
> --
> meow
> _ivan
> 
> 

-- 
meow
_ivan



More information about the freeside-users mailing list