dryrun with DRAFT invoice on db

149 views
Skip to first unread message

Antonio Bruno

unread,
May 6, 2022, 1:19:21 PM5/6/22
to Kill Bill users mailing-list
Hi all,

we noticed a strange  behavior :
  
if for an account, there is already a DRAFT invoice with some CREDIT_ADJ (with 
linkedInvoiceItemId not null and subscriptionId not null) 

invoking a dryrun the same item is returned with linkedInvoiceItemId ,subscriptionId null values

why?

thanks

Reshma Bidikar

unread,
May 9, 2022, 3:09:27 AM5/9/22
to Kill Bill users mailing-list
Hello,

Could you please provide some additional details/steps to reproduce: 

1. How are you creating the original invoice in DRAFT status with linkedInvoiceItemId not null and subscriptionId not null?
2. How are you triggering the invoice dry run? 
3. Are you specifying a targetDate for the dry run? 

Regards,
Reshma

Antonio Bruno

unread,
May 9, 2022, 8:25:02 AM5/9/22
to Kill Bill users mailing-list
Hi Reshma,

  1. we have an invoice plugin that add CREDIT_ADJ items implementing getAdditionalInvoiceItems

  2. we trigger invoice dryrun by calling kb from java but the same happens calling standard rest API with postman

  3. yes, we specify TARGET_DATE, but the same happens with UPCOMING_INVOICE

Regards,
Antonio


Reshma Bidikar

unread,
May 10, 2022, 5:09:31 AM5/10/22
to Kill Bill users mailing-list
Thanks for the details. Could you try executing the Retrieve an invoice by Id endpoint on the invoice in question and see if the invoice items returned contain the linkedInvoiceItemId and subscriptionId as you expect them?

Regards,
Reshma

Antonio Bruno

unread,
May 11, 2022, 8:13:26 AM5/11/22
to Kill Bill users mailing-list
Hi,

we have the same result.

Regards,
A.

Reshma Bidikar

unread,
May 12, 2022, 11:49:37 PM5/12/22
to Kill Bill users mailing-list
Hello,

Could you please publish the code that adds the CREDIT_ADJ invoice item (maybe on Github) so we can take a look?

Regards,
Reshma

Antonio Bruno

unread,
May 17, 2022, 4:11:01 AM5/17/22
to Kill Bill users mailing-list
Hi,
let me know, please.
A.

Antonio Bruno

unread,
May 25, 2022, 6:18:30 AM5/25/22
to Kill Bill users mailing-list
Hi All,

any news?

thanks and regards.
A.

karan bansal

unread,
May 25, 2022, 1:52:07 PM5/25/22
to Kill Bill users mailing-list
Hi Antonio,

Thank you for sending the code. Apologies for the delay in response, I am still looking into it. 

Could you please let me  know if this behavior is consistent across all invoices. Also please let me know the KB version that  you are running. 

BR,
K.

Antonio Bruno

unread,
May 25, 2022, 2:15:32 PM5/25/22
to karan bansal, Kill Bill users mailing-list
Hi Karan,
the answer is yes, behavior is the same across all the invoices.
we are running latest version of killbill 0.22.29
same behavior with 0.22.28
thanks

BR 
Antonio 


--
You received this message because you are subscribed to a topic in the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/killbilling-users/ZLXuApHiETE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to killbilling-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/225869d5-c2d8-46c9-b76a-7dd3e812bd5bn%40googlegroups.com.

Simone Ricci

unread,
Jun 8, 2022, 4:31:36 AM6/8/22
to Kill Bill users mailing-list
Hello everyone,
I have the same issue: if i have a DRAFT invoice with one (or more) CREDIT_ADJ item which linked_item_id's value refers to another item id in the same invoice, calling the dryRun API (or the retrieveInvoiceById as suggested), I get all the items correctly but the linked_item_id for every CREDIT_ADJ item has null value.
Some more informations:
  • in addition to linked_item_id, many fields such as subscriptionId, bundleId, productName, planName, prettyProductName and prettyPlanName have null values
  • in the same killbill instance we add TAX_ITEM too (also by invoicing-plugin) and we don't recognize the same behavoir. Calling the dryRun API liniked_item_id and other fields are correctly valued
Thanks and regards,
SimoneR

Simone Ricci

unread,
Jul 15, 2022, 3:33:39 AM7/15/22
to Kill Bill users mailing-list
Hello everyone,

any news about this thread?

SimoneR

karan bansal

unread,
Jul 15, 2022, 1:22:14 PM7/15/22
to Kill Bill users mailing-list
Hi SimoneR,

We noticed different behaviors when creating additional invoice items for example, credit_adj and tax items, using the Rest API vs the plugins. We documented this behavior here

We are still working on finding the reason for this different behavior. Could you possibly share/publish your plugin code that is adding the additional invoice items and the tax  items. 

Regards
Karan

Simone Ricci

unread,
Jul 18, 2022, 4:25:18 AM7/18/22
to Kill Bill users mailing-list
Hi,
unfortunatly I can't past the code. I've read the documentation at your link and i've noticed that it doesn't talk about CREDIT_ADJ item, which is the the InvoiceItemType I use. Could this be the cause of the issue?

SimoneR
Reply all
Reply to author
Forward
0 new messages