Wrong matched PO quanity for vendor credit memo

Description

There are scenarios where a vendor sends a credit memo to correct a product quantity that was invoiced in an earlier vendor invoice. Here is an example:

1. PO Product Qty=10
2. MR Product Qty=5
3. Invoice (Vendor)=>Invoice-1 using Create Lines From... against PO, Product Qty=6
>>>The vendor sends a credit memo for a product quantity of 1 to correct the invoiced quantity from 6 to 5.
>>>Note that this is not a credit memo for an RMA because we don't return any products.
4. Invoice (Vendor)=>Document Type=Credit Memo (vendor) using Create Lines From...against PO, change product quantity from 4 to 1
4.1. Matched PO document created with a quantity of 1 instead of -1 =>not OK
4.2. The generated matched invoice document does not properly reverse Inventory Clearing and NIR

>>>>Alternatively, I have tried to process the credit memo as vendor invoice but with negative product >>>>quantity.
What happens in this case is:
4.1. No matched PO document created at all

Environment

None

Status

Assignee

Heng Sin Low

Reporter

Michael Powacht

Labels

None

Tested By

None

Components

Fix versions

Affects versions

6.2

Priority

Minor
Configure