In our billing solution Usage Plugin is providing the Usage quantity for each Unit types to KB using which KB is generating the USAGE Line items in the invoice.
Thereafter Invoice Plugin is adjusting the invoice line items by adding EXTERNAL_CHARGE line items for any discounts to be provided for each Unit Usage Types as per our business logic.
This is made working and to some extent we are able to generate new invoices through KB system.
Now we are testing how to migrate all our historical invoices to KB system.
We are reading our old billing system DB and creating Migration invoice in KB with older targetDate add providing list of Invoice Items of USAGE Type(for each of our supported units) along with list of Invoice Items of type EXTERNAL_CHARGE(for discounts of each type of Usage Unit types as applicable) in the request body.
We found following issues:
1. For a USAGE Line item corresponding itemDetails available in the request body is not getting saved in the DB.
This is very important for us because this is where we will be getting important details about the invoice line item
tierUnit : this will be indicating the unit for which this line item belongs to.
tierPrice : this will be indicating the unit price
quantity : this will be indicating the quantity of the unit which is billed for
Without these information in the invoice line items there is no use of creating migrating invoice.
2. We have also updated the request body with the rate and quantity for the line item but what we found is that only rate is getting saved in the DB, quantity is not getting updated in the DB.
Could you please recreate this scenarios in your env and lets us know if it a bug/known issue or any solution available for the same.
Thanks
Vivek