We're updating the issue view to help you get more done. 

Matched PO posting status "Deferred" never transitions to "Posted" if no matching MR is assigned

Description

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

Environment

None

Status

Assignee

Heng Sin Low

Reporter

Michael Powacht

Labels

None

Tested By

None

Components

Fix versions

Affects versions

6.2

Priority

Major