[freeside] Billing + Freeside Bill Script

ivan ivan at 420.am
Thu Jun 22 17:22:07 PDT 2000


On Fri, Jun 23, 2000 at 09:47:58AM +1000, Colin wrote:
> > > When running
> > > this script, also receive errors regarding the card number -
> > >
> > > Billing customer #1025
> > > Error collecting customer #1025:Error adding to cust_pay_batch: Illegal
> > > or empty
> > >  (numeric) cardnum: 1234 1234 1234 1 at /usr/bin/freeside-bill line 65.
> >
> > `1234 1234 1234 1' is not a valid card number and could not have been
> > added to the database using the Freeside web interface or Perl API, which
> > strips all non-numeric characters from credit card numbers before storing
> > them in the database.
> 
> > If you're going to modify the database manually and put illegal values in
> > the database, you shouldn't be surprised when you get errors.
> 
> Didn't know we had to enter the credit card numbers through the database :(

You shouldn't enter them into the database directly, you should use the
web interface, or the documented Perl API.  The documentation on
`Importing Legacy data', htdocs/docs/legacy.html, refers you to
eg/TEMPLATE_cust_main.import as an example program to do this.  You will
also probably want to see the manpage for FS::cust_main and any other 
tables to which you wish to import data.

> > > Not quite sure what this means, but the cust_pay_batch table in mysql
> > > does not contain any data for any of the customers, even for those that
> > > had no error during the script.
> >
> > You probably don't have any customers with legal credit card numbers in
> > the database.
> 
> Yes, we have manually entered all the customer details into mysql including
> credit card numbers
> as we had to transfer the data from Access 97. They are all legal numbers,
> i've simply change the
> number in the above example for privacy reasons.
> 
> Is there any way to strip the non characters from the number whilst they have
> already been entered
> in the database?

Sure, but you'll have to write it yourself.

> It's a bit tedious having to go through and reenter them in
> via the web interface.

You should re-import your data using the perl API, not directly into the
database.

> > > I also noticed when viewing the cust_bill table in mysql, some of the
> > > invoices are print 1 while other have 0 in the field. I don't have a
> > > printer hooked up yet, but does this mean that the invoices are printed
> > > each time you run the freeside-bill script, but it won't explain why
> > > some print while other don't.
> >
> > I can't parse this sentence.
> 
> The cust_bill table keeps a record of how many times an invoice is printed,
> what i'm trying to say
> is that after running the billing script only some of the invoices seems to be
> updated to 1 while others
> are not.
> Does the billing script also print the invoices to the printer when it is run?

The billing script pipes invoices to the program defined in the `lpr'
configuration file, as documented in htdocs/docs/config.html.

-- 
meow
_ivan



More information about the freeside-users mailing list