Closed pierre closed 7 months ago
Here is the design doc of a proposed solution
Full design doc: Bulk Invoice Adjustment User Flow.pdf
Highlights
Bulk Adjustment form
Bulk Adjustment error handling
There are two flows here. 1. Adjusting Draft invoices and 2 Adjusting committed invoices (with credit note). Can you clarify which flow you are addressing here.
There are two flows here. 1. Adjusting Draft invoices and 2 Adjusting committed invoices (with credit note). Can you clarify which flow you are addressing here.
Here we are addressing only 2. Adjusting committed invoices(with credit note).
"Create credit note by adjusting invoice items" would be a more descriptive name for the ticket. Thanks for the clarification.
Here is an update about current approach of saving bulk adjustment form data - We are planning to have 25 concurrent update calls at a time that would take approximately 10-13 seconds to have a balance of good user experience by avoiding the user waiting for a long time on the screen.
I would recommend starting a POC without parallelism, to see what the user experience is. In the end, all calls will be serialized at the database level anyways (each call will generate one DB transaction).
Update: We did a POC and found that Incase of total 10 updates at a time Sequential took 11.44sec(approx.) where as Concurrent took 9.48sec(approx.) in a batch of 6 at a time. So for better user experience we are planning to allow max 25 item adjustment at a time in a batch of 6 concurrency.
Update: As got to know that developing and releasing a new API for bulk adjustment will only possible in KillBill 0.26 and will roughly possible to release in December 2024 or January 2025. Which is very far in future.
So leaving this task as a low priority.
Ability to adjust multiple invoice items.