Cost Adjustment sets incorrect cost for GW euro schema if currency blank on header

Description

Steps to reproduce in Garden World client:
1. Create a Cost Adjustment header, set Currency field to blank and costing method to Average PO
2. Add Elm Tree product to line and set cost to 65.00
3. Complete
4. Make a note of the EUR/USD multiply rate (0.85 in my tests)
5. Check the Average PO costs for Elm Tree in both accounting schemas

The new euro average po cost should be 65 * 0.85 = 55.25

Result

usd schema

euro schema

Actual

65.00

56.45

Expected

65.00

55.25

In addition the posted amounts are the same for both currencies.

The error can also be reproduced in the "Standard Cost Update" and “RollupCost” processes. These processes call the Cost Adjustment document programmatically and do not set the currency parameter.

Some current unit tests call the Cost Adjustment document programmatically and do not set the currency. They need to be extended to test for this issue.

Environment

iDempiere Version: 10.0.0.qualifier
Operating System: UBuntu 18.04
Database: Postgresql 10.19
Java version: openjdk-11

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created February 9, 2022 at 8:51 AM
Updated April 1, 2022 at 5:39 PM
Resolved February 12, 2022 at 5:07 AM