[freeside] Billing and shell machines

Joel Griffiths griff at aver-computer.com
Wed Jul 21 11:56:17 PDT 1999


On Fri, 16 Jul 1999, you wrote:
> The documentation, specifically billing.html, says that a list of cards to
> batch will be in the cust_pay_batch table in the database.
I have the same problem except I get this warning when I run bill -c ecove:

Billing customer #14
Error reval-ing part_pkg->setup pkgpart 15:  at /usr/lib/perl5/site_perl/FS/cust_main.pm line 413.
setup is undefinded at /usr/lib/perl5/site_perl/FS/cust_main.pm line 451.

The setup fee is $0 which may explain line 451 error, but I'm not certain as to
why Safe::reval doesn't work. I don't even know what it does actually.

When the bill program exits, the cust_pay_batch is still empty.

FS 1.2.1
Perl 5.004_05

My users all have a email invoice set, some also specify credit cards and some
don't.

One more thing. When I run bill -c ecove, the charges get set to $95.00. Don't
know where the $95 comes from. The account charges are $17.95 with no setup and
frequency set to 1 (right or wrong).


OKAY: I JUST PLAYED WITH IT A BIT AND FOUND THE SOLUTION TO THE ABOVE PROBLEMS:
Redo your package definitions charges so that instead of $19.95 (or whatever),
it reads "19.95" (without the quotes). It appears that freeside has a problem
with the $ sign.


WARNING: IF YOU ALREADY HAVE TOO MUCH INFORMATION TO EASILY REENTER, DON'T USE
THIS METHOD. WAIT FOR IVAN TO RESPOND. I AM SURE HE HAS A BETTER WAY OF
CORRECTING THIS.

Here is what I did (This may cause some financial confusion if you have people
who have already paid something or you want to start with invoice one. - Ivan
will have to answer that; I just want the correct numbers coming up). To
protect myself, I made a copy of the database with 'cp -ar /var/lib/mysql/ecove
/var/lib/mysql/ecove.bak'.

I went into mysql and deleted all the records (not the tables themeselves!!!)
with financial info in them:
cust_bill
cust_bill_pkg
cust_credit
cust_pay

then I set the bill field to NULL in cust_pkg for the records I wanted to
recalculate.

To fix the problem, I changed the recur and setup fields in part_pkg to the
correct price without the $ sign. Do a select * from part_pkg; to see what I
mean.

Then I reran bill -c ecove and the cust_pay_batch came up properly.

I did this for a single user to start with so that I could see what would
happen. You may want to do this one user at a time too. Just delete a specific
invoice from the above records and reset the bill date to NULL for the user's
package and rerun bill to see the results.

WARNING: IF YOU ALREADY HAVE TOO MUCH INFORMATION TO EASILY REENTER, DON'T USE
THIS METHOD. WAIT FOR IVAN TO RESPOND. I AM SURE HE HAS A BETTER WAY OF
CORRECTING THIS.

-- Joel Griffiths --
Senior Internet Engineer                  Aver, Inc.
(760) 568-4351 Phone              (760) 341-8694 Fax
"The world won't change just because I complain."
               Martina McBride



More information about the freeside-users mailing list