Steps to Reproduce:
- Log into Honeysuckle as any user
- Create a PO with a POL for an item with an uneven price at the penny level (e.g., $59.99.
- For the fund distribution, split between two funds, and make it 50/50 by percent. FOLIO can't deal with the penny situation, and so you can't allocate the funds. You can get around this by switching to dollar amounts and then manually changing applying $30 to one fund and 29.99 to the other
Expected Results: FOLIO divides the funds, randomly assigning one fund an additional penny.
Actual Results: It allocates $30 to each and then FOLIO says you've overdistributed by a penny. You can get around this by switching to dollar amounts and then manually changing applying $30 to one fund and 29.99 to the other
Logic must be updated in every place where encumbrances created/updated based on fundDistributions values (open order, re-encumber, etc.)
If, after distribution, the sum of rounded parts is more or less than the PO line cost, subtract one extra penny from the distributions starting from the end or add the missing penny from the beginning until the sums are equal.
Create generic service to handle extra/missing penny:
- PennyCalculator.calculate(List<FundDistibution> fundDistrs, double poLintEstimatedPrice);