How Can jBilling Help You?
Who’s Using jBilling?

“We have been using jBilling for years with great results.”
Maurizio Degioanni
Bitmovers SRL
See all testimonials >

Pro-Rating

I notice that when I try to enter a different different active since and active until dates, I recent an error. Is there a way to figure pro-rating into my jBilling?

 
averyjamison wrote 1 year 24 weeks ago

Pro-Rating

Yes, jBilling does have a pro-rating system, however, it is not enabled by default. To enable pro-rating, follow the instructions in the jBilling user manual, page 41, "Enabling Pro-Rating".

Enabling pro-rating.
By default, pro-rating is not enabled in jBilling. This means that jBilling expects all
orders to invoice full periods only. If you try to enter an order that does not fit full periods,
you will get an error. For example, an order with an 'active since' of February 1st and
'active until' of March 10th will produce an error.

You need to tell jBilling that you want to work with fractions of a period by using prorating.
There are two steps to do this: setup a preference and configure plug-ins.
Preference 42 indicates if a company is going to be using pro-rating or not. Since the
default is not, you need to override it. Take a look to Appendix A for details on how to
add a preference. The following is a quick example:

INSERT INTO PREFERENCE (ID, TYPE_ID, TABLE_ID, FOREIGN_ID,
INT_VALUE, STR_VALUE, FLOAT_VALUE )
VALUES ( 100, 42, 5, 1, 1, null, null )

Now we need to change the default plug-ins that deal with invoice generation so the
system can make the additional calculations that pro-rating requires.
Click on 'System', then on 'Plug-ins'. The screen with all the plug-in configuration
shows up. You need to replace

com.sapienter.jbilling.server.pluggableTask.BasicCompositionTask
with:
com.sapienter.jbilling.server.process.task.DailyProRateCompositionTask
and also:
com.sapienter.jbilling.server.pluggableTask.BasicOrderPeriodTask
with:
com.sapienter.jbilling.server.process.task.ProRateOrderPeriodTask

These two new plug-ins don't take any parameters (just like the original ones), so this
is just a simple replacement. Click on 'Submit' to get the new plug-in configuration
saved.

 
esham21 wrote 1 year 24 weeks ago

enable prorating

check user_guide page-41

Please register or login to post a comment.