1. PO Product Qty=10 2. MR Product Qty=10 2.1 Matched PO document created 2.2 Matched PO document posted by accounting engine and costing record updated=>ok 3. Invoice-1 (vendor) Product Qty=4 3.1 Matched PO document created 3.2 Matched PO document updated with posting status "Deferred" by accounting engine 4. Invoice-2 (vendor) Product Qty=6 4.1 Matched PO document created 4.2 Matched PO document updated with posting status "Deferred" by accounting engine
Since there are no further MR quantities coming in and matched against the matched PO documents from the invoice, status "Deferred" never transitions to status "Posted"
Here is a possible solution: If invoice quantities are less than MR quantities, the partial invoice quantities should be matched against MR quantities exactly the way it works for MR quantities less than invoice quantities:
Thank you Heng Sin. From my latest tests, all scenarios work as expected. As discussed, we'll of course sponsor these changes. Thanks again!
Heng Sin Low June 19, 2019 at 10:24 AM
, please test the new fix, thanks.
Michael Powacht June 19, 2019 at 2:26 AM
Thank you Heng Sin, works mostly as expected. I encountered a scenario where the matched invoice quantity does not add up, such as in following example:
PO Qty=10 MR-1 Qty=4 Invoice-1 Qty=3, matched invoice qty=3=>OK MR-2 Qty=3 MR-3 Qty=3 Invoice-2 Qty=7, matched invoice qty=6=>Not OK, should be MI qty 7.
This is related to JIRA https://idempiere.atlassian.net/browse/IDEMPIERE-3910
1. PO Product Qty=10
2. MR Product Qty=10
2.1 Matched PO document created
2.2 Matched PO document posted by accounting engine and costing record updated=>ok
3. Invoice-1 (vendor) Product Qty=4
3.1 Matched PO document created
3.2 Matched PO document updated with posting status "Deferred" by accounting engine
4. Invoice-2 (vendor) Product Qty=6
4.1 Matched PO document created
4.2 Matched PO document updated with posting status "Deferred" by accounting engine
Since there are no further MR quantities coming in and matched against the matched PO documents from the invoice, status "Deferred" never transitions to status "Posted"
Here is a possible solution:
If invoice quantities are less than MR quantities, the partial invoice quantities should be matched against MR quantities exactly the way it works for MR quantities less than invoice quantities:
So instead of Matched PO structure:
MPO document1: MR-1___________________10 Status=Posted
MPO document2: ___________Invoice-1_ 4 Status=Deferred
MPO document3: ___________Invoice-2_ 6 Status=Deferred
it should first match partial Invoice Qty with 1st MR:
1. MR-1:
MPO document1: MR-1__________________10 Status=Posted
2. Invoice-1:
MPO document1: MR-1___________________ 6 Status=Posted
MPO document2: MR-1_______Invoice-1_ 4 Status=Posted
3. Invoice-2:
MPO document1: MR-1_______Invoice-2_ 6 Status=Posted
MPO document2: MR-1_______Invoice-1_ 4 Status=Posted