Uploaded image for project: 'mod-orders'
  1. mod-orders
  2. MODORDERS-482

Cannot split funds on a PO with an odd number of pennies as the cost.

    XMLWordPrintable

    Details

    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      ACQ Sprint 110
    • Story Points:
      3
    • Development Team:
      Thunderjet
    • Release:
      R1 2021 Bug Fix
    • Affected Institution:
      Cornell, University of Chicago

      Description

      Overview:
      Steps to Reproduce:

      1. Log into Honeysuckle as any user
      2. Create a PO with a POL for an item with an uneven price at the penny level (e.g., $59.99.
      3. 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
      Additional Information: 

      Scope:

      Logic must be updated in every place where encumbrances created/updated based on fundDistributions values (open order, re-encumber, etc.)

      Approach:

      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);

      org.folio.services.adjusment.AdjustmentsService#applyAmountTypeProratedAdjustments

       

       

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dennisbridges Dennis Bridges
                Reporter:
                Andrei_Makaranka Andrei Makaranka
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases