Wrong product cost for partial MR


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.




Soo Fang Lee
July 12, 2018, 10:11 AM

Can you please apply the attached patch for your testing ? Please let me know if you have any problem. Thanks.

Michael Powacht
July 13, 2018, 2:37 AM

Thanks Soo Fang, will check it out.

Michael Powacht
July 13, 2018, 6:40 AM

Hello Soo Fang, I successfully tested your patch in my development environment. I am attaching my test plan for your reference. Please quickly initiate a peer review so we can get this into the public repo.

Michael Powacht
August 8, 2018, 6:47 AM

Many thanks!


Heng Sin Low


Michael Powacht



Tested By


Fix versions

Affects versions