M_Cost=>Current Cost/Costing Qty not updated due to matched PO posting by accounting engine

Description

Costing method=Average PO

M_Cost=>Current Cost and Costing quantity are not being updated in the following situations:

SCENARIO 1 (MR Reversal followed by vendor invoice):

1. PO Product Qty=10
2. MR-1 Product Qty=10
2.1 Matched PO document created
2.2 Matched PO document posted by accounting engine and costing record updated =>OK
3. MR Reverse/Correct Product Qty=1
3.1 Matched PO document for reversal created
3.2 Matched PO document for reversal posted by accounting engine and costing record updated=>OK
4. Invoice (vendor) Product Qty=10
4.1 Matched PO document created
4.2. Matched PO document posted by accounting engine=> not OK (see step5)
5. MR-2 Product Qty=10
5.1 MR-2 matched with matched PO document created in step 4
5.2. Matched PO in step 4.1 does not get posted anymore because it was already posted during invoice (vendor).
5.3 M_Cost Current Cost/Costing quantity not updated because matched PO was posted at the time of invoice (4.2) not at he time of MR-2.

SCENARIO 2 (MR followed by vendor invoice with qty < MR)
1. PO Product Qty=3
2. MR-1 Product Qty=2
2.1 Matched PO document created
2.2 Matched PO document posted by accounting engine and costing record updated=>ok
3. Invoice (vendor) Product Qty=1
3.1 Matched PO document created
3.2 Matched PO document posted by accounting engine=>not OK (see step 4)
4. MR-2 Product Qty=1
4.1 MR-2 matched with matched PO document created in step 3.1
4.2 Matched PO in step 3.1 does not get posted anymore because it was already posted during invoice (vendor).
4.3 M_Cost Current Cost/Costing quantity not updated because matched PO was posted at the time of invoice (3.2), not at the time of MR-2.

Scenario 1 and 2 are similar in that the problem is caused by invoice matched PO documents being posted followed by an MR with the same qty being matched to the already posted matched PO document.

Environment

None

Activity

Show:
Heng Sin Low
April 23, 2019, 1:07 PM

, please verify.

Michael Powacht
April 24, 2019, 5:59 AM

Thanks Heng Sin Low, I've run through a number of tests and it's working now as expected. I like the newly introduced "Deferred" posting status!

Michael Powacht
April 26, 2019, 2:23 AM

Hello Heng Sin and Elaine, are you going to push this change to the public 6.2 repo?

Carlos Ruiz
April 27, 2019, 12:17 PM

Ready , grafted to 6.2

Michael Powacht
April 28, 2019, 2:06 AM

Thanks Carlos!

Assignee

Heng Sin Low

Reporter

Michael Powacht

Labels

None

Tested By

None

Components

Fix versions

Affects versions

Priority

Major
Configure