[Fixed] When apply CM to multiple documents, "Allocate result is -0.01 which is invalid" error
When applying a Credit Memo to multiple documents, such as Invoices or Debit Memos, error "Allocate result is -0.01 which is invalid" happens. This issue happens both in UI and API in some cases. It could be -0.02 or other very small values.
Zuora Engineering Team is currently working to fix this issue.
The issue will be fixed in Release 259.
ETA of the Fix
We cannot provide an ETA yet.
1. Create a standalone Credit Memo (CM 1) with 3 Credit Memo Items (CMI 1) with individual amount 25 and the Credit Memo unapplied amount is 75 in total.
2. Create 3 standalone Debit Memos (DM 1, DM 2 and DM 3) with individual amount 25. Each Debit Memo has one Debit Memo Item.
3. Apply the CM 1 to the 3 DMs at the same time in UI, error "Allocate result is -0.02 which is invalid. " happens.
If your "Default application rule for apply" is proration, when applying CM 1 to a DM 1 with one DM item (DMI 1) and amount 25, the formula will be:
CMI is short for Credit Memo Item. DMI is short for Debit Memo Item.
8.33 from CMI 1 will be applied to DMI 1.
8.33 from CMI 2 will be applied to DMI 1.
8.34 from CMI 3 will be applied to DMI 1.
At this time, CMI 1 unapplied amount is 16.67.
CMI 2 unapplied amount is 16.67
CMI 3 unapplied amount is 16.66.
When our application applies the remaining amount of each CMI to the next DM 2, the same process will happen again. That is why -0.02 rounding issue might happen in some cases.
1. If the above error happens, apply CM to documents one by one, not at the same time.
2. Go to Payment setting, Update "Default application rule for apply" from Proration to First in First out. https://knowledgecenter.zuora.com/CB_Billing/Payments_Settings/Default_Application_Rule