tag:jbilling.tenderapp.com,2012-10-15:/discussions/questions/964-how-to-add-a-new-billing-srategy-besides-the-existing-onejBilling: Discussion 2024-03-16T12:20:41Ztag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-05-26T10:30:22Z2016-05-26T10:30:22ZHow to add a new Billing srategy besides the existing one?<div><p>Hi</p>
<p>Can you describe your user scenario case study?</p>
<p>It is not clear what exactly you'd like to achieve.</p>
<p>Vikas@Web Data Technologies</p></div>Vikas@WebDataTechnologiesLLPtag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-05-26T13:10:39Z2016-05-26T13:10:39ZHow to add a new Billing srategy besides the existing one?<div><p>Hello</p>
<p>I'd like to build up a new process for calculating price for
each customer in each customized period</p>
<p>Calculating rules depend on amount of customer usage. For
example, when usage amount is less than 100kg the calculating rule
differs from calculating rules when usage amount is more than
101kg</p>
<p>And a input data file contains input data. The input data are in
structured format, for example</p>
<p>customer123 order1 10 customTypeA<br>
customer456 order2 20 customTypeC</p>
<p>So, which parts should I add for forming up the whole
process?</p>
<p>How can add a new tab besides the existing ones, which are
Customer, Configuration .etc.</p>
<p>Thanks</p></div>183241677tag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-05-31T12:14:06Z2016-05-31T12:14:06ZHow to add a new Billing srategy besides the existing one?<div><p>Hello,</p>
<p>For adding the new tab, I think you need to modify _header.gsp.
For pricing changes that you need to make, please check if you can
add custom code in a new implementation of InvoiceCompositionTask.
This task is called right at the time of invoice generation. So if
you need to charge customer specific prices based on quantity, that
rule can go into your custom logic when order lines are charged
onto invoice as invoice lines. So every invoice line will have new
calculation as per the quantity being charged from the order line.
This is one option. With this option though you would not be able
to see the price charged at the order level. It will reflect
directly on the invoice. If you need to see pricing rule applied at
order level, as reflect changed price as per the quantity, please
let us know and we will suggest another way.</p>
<p>Thanks,<br>
jBilling Technical Support Team.</p></div>Technical Supporttag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-06-01T05:10:15Z2016-06-01T05:10:15ZHow to add a new Billing srategy besides the existing one?<div><p>Hello,</p>
<p>Adding a new tab is not so straight-forward, you need a bunch of
files to<br>
change and you may also have to code a controller to handle actions
for the<br>
new tab.</p>
<p>As far as Pricing solution goes, you need an implementation of
IPricing<br>
interface as a Plugin to make it configurable. This implementation
should<br>
have all the rules according to your requirement.</p>
<p>If you are on jBilling version 3.x, you can implement drools
pricing rules<br>
and I would recommend that approach because its more modular.</p>
<p>vbodani @ Skype</p></div>Vikas@WebDataTechnologiesLLPtag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-06-02T07:29:22Z2016-06-23T07:02:11ZHow to add a new Billing srategy besides the existing one?<div><p>Hello Technical Support Team</p>
<p>Yes, we need to see pricing rule applied at order level, as
reflect changed price as per the quantity, so what is the another
way is ? :)</p>
<p>Also we need adding rules in invoice generation process, and
found there are 4 existing classes implementing
InvoiceCompositionTask under</p>
<p>(1) com.sapienter.jbilling.server.pluggableTask:
BasicCompositionTask.java CalculateDueDate.java</p>
<p>(2) com.sapienter.jbilling.server.process.task: abstract class
AbstrackChargeTask extends PluggableTask implements
InvoiceCompositionTask {} class SureTaxCompositionTask extends
PluggableTask implements InvoiceCompositionTask {}</p>
<p>(3) com.sapienter.jbilling.server.process: BillingProcessBL.java
import InvoiceCompositionTask</p>
<p>So which class of the above reprents for existing a invoice's
total fee calculating rule class?<br>
Or should we configure classes rules mapping relationships in db?
If yes in which table can we configure for control the process?</p>
<p>note:<br>
I read the above classes' implementation codes of
InvoiceCompositionTask's declared method<br>
public void apply (NewInvoiceContext invoice, Integer userId)
throws TaskException;<br>
But didn't find java code for calculating total price, so which
part of java codes calculates the total price of invoice when
invoice is being generated?</p></div>183241677tag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-06-02T07:38:04Z2016-06-03T02:18:43ZHow to add a new Billing srategy besides the existing one?<div><p>Hello Vikas</p>
<p>Thank you. What is exact position of IPricing interface? Or
should I add a new interface naming IPricing and then add
implementation java class? What's the table name in database to be
inserted a new record for enabling new added IPricing &
implementation java class to work?</p>
<p>I'm on jbilling 4.1.1-src and how to implement drools pricing
rules in detail? For example which java code files should be
modified?</p>
<p>:)</p>
<p>Thanks,</p></div>183241677tag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-06-23T08:29:06Z2016-06-23T08:29:06ZHow to add a new Billing srategy besides the existing one?<div><p>Hello Technology Support Team,</p>
<p>After I added a new class A implemented InvoiceCompositionTask,
how can I enable A to take effect and take place of the existing
one in order the running logic not still run into the existing
logic one?</p>
<p>Which one is the existing one which is taking effect which are
calculating amount in the way price.multiply(quantity)?</p>
<p>Thanks,</p></div>183241677tag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-06-24T10:48:39Z2016-06-24T10:48:39ZHow to add a new Billing srategy besides the existing one?<div><p>Hello ,</p>
<p>For this you ineed to extends class A from PluggableTask.<br>
(like Class A extends PluggableTask implements
InvoiceCompositionTask) . And configure class A as new pluggin.
Also you need to add your class A in pluggable_task_type table
.</p>
<p>Thank you<br>
jBilling Technical Support Team</p></div>Technical Supporttag:jbilling.tenderapp.com,2012-10-15:Comment/399613162016-06-24T16:47:35Z2016-06-24T16:47:35ZHow to add a new Billing srategy besides the existing one?<div><p>Hello Support Team,</p>
<p>How to configure class A as new plugin ? And how to disable the
existing one in order to avoid program still run into the existing
old plugin after enabled the class A as the new one ?</p>
<p>Thank you,<br>
John</p>
<p>------------------ 原始邮件
------------------ 发件人: "Technical
Support";<a href="mailto:tender2+d9f615ec3f@tenderapp.com">tender2+d9f615ec3f@tenderapp.com</a>;
发送时间:
2016年6月24日(星期五)
晚上6:48 收件人: "Jeffery"<a href="mailto:183241677@qq.com">183241677@qq.com</a>;</p>
<p>主题: Re: How to add a new Billing srategy besides
the existing one? [Questions #964]</p></div>183241677tag:jbilling.tenderapp.com,2012-10-15:Comment/399613162024-03-16T12:20:38Z2024-03-16T12:20:40ZHow to add a new Billing srategy besides the existing one?<div><p>Hi there,</p>
<p>We run an Instagram growth service, which increases your number of followers both safely and practically.</p>
<ul>
<li>Guaranteed: We guarantee to gain you 300-1000+ followers per month.</li>
<li>Real, human followers: People follow you because they are interested in your business or niche.</li>
<li>Safe: All actions are made manually. We do not use any bots.</li>
</ul>
<p>The price is just $60 (USD) per month, and we can start immediately.</p>
<p>If you are interested, and have any questions, reply back and we can discuss further.</p>
<p>Kind Regards,<br>
Libby</p></div>Libby Evans