[MODORDERS-991] Rounding for the total estimated price of the order line does not work after the rollover Created: 10/Jan/24  Updated: 02/Feb/24  Resolved: 02/Feb/24

Status: Closed
Project: mod-orders
Components: None
Affects versions: None
Fix versions: 12.8.0

Type: Bug Priority: P2
Reporter: Khamidulla Abdulkhakimov Assignee: Dennis Bridges
Resolution: Done Votes: 0
Labels: known-issue-orchid, known-issue-poppy
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File 2024-01-31_13h55_20.png     File C436766.mp4     PNG File image-2024-01-10-16-40-17-606.png     PNG File image-2024-01-10-16-43-42-992.png    
Issue links:
Relates
relates to FAT-11553 Review of C436766 Closed
Sprint: ACQ Sprint 183
Story Points: 1
Development Team: Thunderjet
Release: Quesnelia (R1 2024)
Potential Workaround: Round total estimated price for POL manually using DB or API call
Affected Institution:
!!!ALL!!!
RCA Group: TBD

 Description   

Overview:

It was identified that after the rollover, for order lines with a currency different from the tenant's own, the total estimated price was calculated without rounding.

Steps to Reproduce:

  1. Log into snapshot environment
  2. Open Settings -> Tenant -> Language and Localization -> Change primary currency to NZD
  3. Create FYA2024 and FYA2025
  4. Create Ledger connected to the FYA2024
  5. Create Fund connected to the ledger from #3
  6. Create Ongoing order with reEncumber flag true
  7. Create POL with physical unit price = 315.5, fund distribution -> fund = fund from #5
  8. Open order from #6
  9. Open Ledger from #4 and go to Rollover action
  10. Run rollover with current settings:
  11. Open network console and move to POL from #7

Expected Results: poLineEstimatedPrice displays with correct rounding (two characters).

Actual Results: poLineEstimatedPrice displays with incorrect rounding:

Additional Information:
Reported by Massey University

Approach:

Need to add rounding to the current line :

return Money.of(totalInitialAmountEncumbered, holder.getPoLine().getCost().getCurrency())
  .with(holder.getCurrencyConversion())
  .with(Monetary.getDefaultRounding()); 


 Comments   
Comment by Khamidulla Abdulkhakimov [ 26/Jan/24 ]

Tested locally. Rounding was applied correctly. Moving to QA

Comment by Polina Ustimenko [ 30/Jan/24 ]

Tested on https://folio-snapshot.dev.folio.org/

Works as expected, please see the attached screencast

Joe Reimers could you please review? Thank you

Comment by NinaChistova [ 31/Jan/24 ]

Tested  on https://folio-testing-sprint-fs09000000.ci.folio.org/

Works as expected

Comment by Joseph Reimers [ 01/Feb/24 ]

It appears to look good, but Dennis Bridges, could you please confirm?

Generated at Fri Feb 09 00:41:34 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.