Cancellation Fee, misc. charges, etc.

Bowen, Peter pbowen at corp.untd.com
Thu Jan 20 08:22:14 PST 2005


I need for Freeside to be able to charge a cancellation fee when a customer
cancels their contract and does not enter into a new one.

I see two ways to do this:
1. Charge a one time fee. 
	This is very easy to do under the existing system, but there a
couple of side effects:
a. The charge method adds a part_pkg for every charge - they don't really
affect the system from a user's point of view, but under the covers there
could be a ton of dupes in part_pkg.  It creates other problems from a DBA
standpoint and as my installation is going to be rather large this is a
factor for me.
b. It is hard to find out how many cancel fees there are based on the pkgnum
since they're all different.   My wonks (marketing guys) are always beating
me up for this sort of information.  Making it hard to get is going to cost
me in the long run.
c. In the case where we want to track different cancellation fees, it is
less elegant to search them out.  Same wonk problem.

To get rid of the multiple duplicate part_pkg problem, the database and code
could be adjusted to not require a part_pkg for every cust_pkg.  The problem
here is that the bill looks for some of the description in the part_pkg, so
there end up being a number of blanks on the bill.  The other problem is
that the code relies on there being a part package in a number of places,
and while I think I've found them all, the result was less than optimal - as
it doesn't really work without the descriptions.

I've thought about adding a table like cust_charge and putting the relevant
information there, but that means a bunch of new code to write, debug, and
work through -AND- this doesn't solve the other problems with multiple one
time charges.

2. Add a package at the end that is the cancellation fee - This requires an
additional package to be created for the cancellation fee, but solves the
problems outlined above - for this case.  This however solves the problem
I've outlined in my case - it does not solve the issues related to charges
in general inserting individual part_pkg records.

So here's my proposal - I'm going to use solution 2 for my cancellation fee
problem.  For tracking/reporting I need one cancellation package and I want
to apply that at cancellation.  

I'm also going to add a cust_charge table and integrate it into the UI,
bill, and cust_main->charge method so that charges are different than
packages.  This will affect the least amount of code and break the least
amount of data checks. 

So I'll solve both problems, with two solutions that can be applied as
appropriate.

-Peter



More information about the freeside-devel mailing list