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?
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:
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.
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.
enable prorating
check user_guide page-41