Welcome to the Monastery | |
PerlMonks |
Writing a Billing Systemby Anonymous Monk |
on Jul 22, 2002 at 01:59 UTC ( [id://183915]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The hardest part of this question is for me to figure out how to state it. Please bear with me! :)
Project: Recurring and non-recurring billing with various discount structures. Here I need a system that will bill for various services, many of which are delivered on a monthly basis. The goal is to write the system in such a way so that customers who are on a certain 'plan' which gives them definable discounts and freebies, can all have the discounts applied to their accounts automatically reflect changes in the master 'plan'. What I have trouble envisioning is the actual structure of how discount plans are recorded. Customers may be on more than one plan, so a need for precedence sorting also exists. I imagine I will have a table in which I will store all possible 'products', and then sign up customers to be billed for one-time or recurring sets of these products. Two things may happen here: A) a discount 'plan' is applied which affects the pricing of the products the customer is purchasing. B) another 'plan' is added which gives a customer a certain group of products at a certain grouped price, in this case, if the customer already has these products in their purchase list, the 'regular priced' items are supposed to be overridden by the (identical) promo items, BUT if the promo is removed, the original set of products must be re-established. SO... I am not asking any of you to write this system for me :) I've got most of it under control. What I am looking for is advice on how to allow non-programmers to enter and maintain sets of promo rules, that may be applied to certain clients or products. Of course, I would like to establish this system in the most general and efficient way possible. I have thought of having a Rules table that will look like this:
However, here the Action column is essientially code, which I want to avoid. It is preferable that the person entering this would not have to be a programmer. Any ideas or suggestions for this? Ever done something similar? All information greatly appreciated! Andy
Back to
Seekers of Perl Wisdom
|
|