Create, close, cancel, Purchase Orders (UXPROD-1141)

[UISACQCOMP-17] Cannot split funds on a PO with an odd number of pennies as the cost. Created: 12/Feb/21  Updated: 21/Apr/21  Resolved: 23/Mar/21

Status: Closed
Project: stripes-acq-components
Components: None
Affects versions: None
Fix versions: 2.3.1, 2.4.0
Parent: Create, close, cancel, Purchase Orders

Type: Bug Priority: P2
Reporter: Kristin Martin Assignee: Dennis Bridges
Resolution: Done Votes: 0
Labels: R1-bugfix, support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: File Screen Recording 2021-03-22 at 9.33.10 AM.mov     PNG File Screen Shot 2021-03-22 at 9.25.48 AM.png     PNG File image-2021-02-12-12-11-04-014.png    
Issue links:
Blocks
blocks UISACQCOMP-21 UISACQCOMP (stripes-acq-components) B... Closed
Defines
defines UXPROD-2169 Thunderjet - R1 2021 Enhancements/Bug... Closed
Relates
relates to MODINVOICE-232 Cannot split funds on an Invoice with... Closed
relates to MODORDERS-482 Cannot split funds on a PO with an od... Closed
Sprint: ACQ Sprint 110
Story Points: 3
Development Team: Thunderjet
Release: R1 2021 Bug Fix
Affected Institution:
Cornell, University of Chicago
Epic Link: Create, close, cancel, Purchase Orders

 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:


URL:
Interested parties:



 Comments   
Comment by Kelly Drake [ 12/Feb/21 ]

Debra Howell - Do you know if  this will effect Cornell? and if so, by how much?  We're trying to determine the ranking. 

Comment by Debra Howell [ 15/Feb/21 ]

Kelly Drake Yes, this affects Cornell. We have a possible workaround, but it would be extremely time consuming.

Comment by Kelly Drake [ 15/Feb/21 ]

Dennis Bridges Do you know if the solution for randomly assigning the extra penny is sufficient?

Comment by Kelly Drake [ 15/Feb/21 ]

Also should this fix include any situation when a percent allocation does not exactly resolve, for instance if there is 33% allocation over three funds, etc. 

Comment by Michael Paulmeno [ 15/Feb/21 ]

This would affect Skidmore as well (we are not in production, but expect to be by May) as we split invoices when they are for a time period which crosses two fiscal years

Comment by Debra Howell [ 15/Feb/21 ]

We like the option of if using percentage distribution, and 100% total is entered, apply any remaining amount to the first fund. Right now, Voyager rounds one up and one down.

 

Comment by Dennis Bridges [ 16/Feb/21 ]

The extra penny logic currently covers the scenario when rounding means we are short a penny (or a few pennies if there are more than 2 distributions). I believe this could be extended to handle situations where we end up with too many pennies based on rounding.

Note: the workaround is to use dollar amount (Rather than percentage) for your last fund distribution and subtract the penny manually so the order can be opened and encumbered. 

cc:Kelly Drake

Comment by Anya [ 01/Mar/21 ]

Support: it looks like all of these are assigned to the sprint that starts on March 15 and the code freeze is March 19 for Iris - will this make it? 

Comment by Dennis Bridges [ 01/Mar/21 ]

Anya These are being treated as bug fixes so they will be released with the bug fix release. The reason being we have new functionality that still needs to be finished before the code freeze.

Comment by Anya [ 08/Mar/21 ]

Support: Thanks... Will this be fixed in Iris? 

 

Comment by Dennis Bridges [ 08/Mar/21 ]

Anya yes we will be working on these for the Iris bug fix release

Comment by Aliaksei Chumakou [ 18/Mar/21 ]

Dennis Bridges it would be great if you can check front-end changes at scratch env, I've created a po line there https://thunderjet-penny.ci.folio.org/orders/view/464d21a4-147b-4b07-92b2-4c8d60d77b54/po-line/edit/784a40c2-bea9-438b-a6a1-a81774b2028d?workflowStatus=Pending

Comment by Dennis Bridges [ 22/Mar/21 ]

Aliaksei Chumakou This is looking excellent. There is still one scenario where the ui seems to struggle. If the user adds a dollar amount first and the system doesn't seem to know what to do about the penny. However, that may be because the system is expecting the user to update the amount field? I think satisfies the requirement.

I have found the page throws an error when changing the fund distribution from amount to percentage. see video

Screen Recording 2021-03-22 at 9.33.10 AM.mov

error message:

URL: https://thunderjet-penny.ci.folio.org/orders/view/464d21a4-147b-4b07-92b2-4c8d60d77b54/po-line/edit/784a40c2-bea9-438b-a6a1-a81774b2028d?workflowStatus=Pending

Error: TypeError: Cannot read property 'amount' of undefined

Stack: at eu (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:9:204652)
at https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:9:205989
at Object.pi [as useMemo] (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:409:61568)
at t.useMemo (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:401:5984)
at ru (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:9:205969)
at Ko (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:409:57931)
at Di (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:409:66792)
at yc (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:409:105389)
at us (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:409:96718)
at cs (https://thunderjet-penny.ci.folio.org/bundle.89d0475d84d316a3c564.js:409:96643)

in ru
in bu
in i
in WithConnect
in S
in s
in WithStripes(s)
in div
in div
in section
in k
in c
in div
in i
in i
in Wrappedi(withAccordionStatus)
in div
in p
in div
in d
in div
in p
in div
in d
in form
in div
in section
in c
in Unknown
in WithPaneset(Component)
in ForwardRef
in eu
in v
in i
in withRouter
in Unknown
in qu
in i
in WithConnect
in S
in s
in WithStripes(s)
in t
in t
in yb
in t
in h
in i
in WithStripes
in i
in Dt
in div
in o
in t
in t
in main
in Ba
in i
in div
in hn
in c
in WithModules(c)
in withRouter(WithModules(c))
in t
in l
in t
in t
in HotKeys-t
in t
in h
in i
in WithStripes
in i
in injectIntl
in i
in IntlProvider
in u
in s
in i
in c
in WithModules(c)
in S
in i

Comment by Aliaksei Chumakou [ 23/Mar/21 ]

Dennis Bridges thanks for catching the issue (the stacktrace), it was fixed. 

Regarding case with penny distribution - it happens only if there are a couple distributions with type = percentage and sum of them is 100%. In case it's not 100% - it's user responsibility to distribute amount properly. 

We discussed this with Aliaksandr Pautau, if this is not the case, we can discuss it and change the behavior, but it's a vital that we have the same logic on the front-end and the back-end.

Comment by Aliaksei Chumakou [ 23/Mar/21 ]

deployed to folio-testing

Comment by Dennis Bridges [ 23/Mar/21 ]

Looking excellent thanks Aliaksei Chumakou!

Comment by Dennis Bridges [ 21/Apr/21 ]

Test successful in bugfest-iris

Generated at Thu Feb 08 22:21:28 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.