Queries related to Invoice Generation.

66 views
Skip to first unread message

fari...@gmail.com

unread,
Apr 24, 2014, 7:27:39 PM4/24/14
to killbil...@googlegroups.com
We're trying to debug an issue with some invoices not being generated, and we are trying to understand the invoice generation logic in killbill.

We have some queries regarding it.

1) How Invoice Item of type CBA_ADJ are calculated?
For certain scenerio it is very straight forward & related to recurring item, but in certain scenario's the method for calculating CBA_ADJ seems different. Please refer to attached excel (row 12 & 22) for example.

2) After the cancellation/change in subscription, when repair for item & terminal state should occur for that subscription?
It seems that old existing invoice items are getting repaired in the recent invoice. So is there any dead-line/time-line within which the repairing should occur.

3) What is the termination state condition for a invoice?
While trying out fixes for the RI-2261, we observed that kill bill tries to re-invoice and repair already repaired items.

Thanks a lot in advance

fari...@gmail.com

unread,
Apr 25, 2014, 7:08:32 PM4/25/14
to killbil...@googlegroups.com, fari...@gmail.com
Sorry, my questions were probably not clear. There were (and still are) to investigate https://github.com/killbill/killbill/issues/170 . We were able to find a fix - see referenced commit - but we need to fix the data now... help is still welcome. (and my apologies for mentioning our *internal* bug tracking in my previous message)

Thanks

François

stephane brossier

unread,
Apr 25, 2014, 9:08:53 PM4/25/14
to Francois Granade, killbil...@googlegroups.com
On Thu, Apr 24, 2014 at 4:27 PM, <fari...@gmail.com> wrote:
We're trying to debug an issue with some invoices not being generated, and we are trying to understand the invoice generation logic in killbill.

We have some queries regarding it.

1) How Invoice Item of type CBA_ADJ are calculated?
    For certain scenerio it is very straight forward & related to recurring item, but in certain scenario's the method for calculating CBA_ADJ seems different. Please refer to attached excel (row 12 & 22) for example.


There are 2 kind of CBA_ADJ (2 sides of the same coin):
* positive CBA are just added to bring the invoice balance to a zero value -- so invoice balance are not negative, and will contribute to the credit pool.
* negative CBA are added when there is credit on the account, to consume the credit.
 

2) After the cancellation/change in subscription, when repair for item & terminal state should occur for that subscription?
    It seems that old existing invoice items are getting repaired in the recent invoice. So is there any dead-line/time-line within which the repairing should occur.


If a subscription is invoiced for [T1, T2], and then later gets cancelled at T1' (with T1 <= T1' < T2), then the portion from T'1 -> T2 needs to be 'repaired' (bad name). Along with the repair, there is often a creation of CBA_ADJ which will capture the credit associated with that non use of the subscription.


3) What is the termination state condition for a invoice?

There is no termination state. Each time we bill an account we recompute all invoices and compare with existing one. In most case, only new invoices/items are generated but if things changed since last invoice generation then old invoices also get modified.


Hope that helps,

S.


 
Reply all
Reply to author
Forward
0 new messages