Wrong product cost for partial MR

Description

The system updates wrong product costs in the Product Cost Window under the following conditions:

  • Purchase order in foreign currency (e.g. PO in USD, local currency=COP)

  • There is one or more partial MR for a PO line and these MRs are recorded with different currency rates because they are recorded in different periods, for example.

Here are the symptoms:
When creating the second partial MR, the system uses the current currency rate to update the costs of all quantities. Here is an example:
1. Purchase order line, Product A, PO Qty=10 Unit Price per piece = 100 USD
2. MR(1) Product A, Qty=5, Currency rate 1 USD=100 COP
2.1 The system posts correctly to GL DR Inventory, CR NIR 50000
2.2 The system correctly records current cost as COP 10000
3. MR(2) Product A, Qty=5, Currency rate 1 USD=150 COP
3.1 The system posts correctly to GL DR Inventory, CR NIR 75000
3.2 The system INCORRECTLY updates the current cost to 15000 (=USD 100 x 150) instead of 12500 (5 x USD 100 x 100 + 5 x USD 100 x 150) / 10

Because the GL postings are correct, the balance sheeting inventory no longer matches the formula: quantity on hand x current cost. What's worse: When making a customer shipment the system records the COS and reduces inventory at the current (incorrect) cost price which may lead to negative balance sheet inventory.

I have simulated this scenario also in Carlos' Demo system: https://demo.globalqss.com/webui/index.zul
Refer to PO 800009.

Environment

None

Status

Assignee

Heng Sin Low

Reporter

Michael Powacht

Labels

None

Tested By

None

Fix versions

Affects versions

Priority

Major
Configure