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

    • ACQ Sprint 110
    • 3
    • Thunderjet
    • R1 2021 Bug Fix
    • 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

          1. image-2021-02-12-12-11-04-014.png
            32 kB
            Andrei Makaranka
          2. image-2021-03-24-18-13-22-173.png
            73 kB
            Aliaksandr Pautau
          3. MODORDERS-482.mp4
            8.05 MB
            Aliaksandr Pautau
          4. MODORDERS-482-recheck.mp4
            4.23 MB
            Andrei Makaranka

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases