Process Delete Matched Invoice with error for Average PO + Price variance

Description

Process "Delete" matched invoice results in below error when using costing method "Average PO" and if there is a price variance between PO/MR and Invoice (or a variance caused by different exchange rates during MR and Invoice). A matched invoice for an invoice with price variance creates a record in Product Cost=>Cost Movement for the cost variance. When deleting a matched invoice, I expect this record to be deleted and Product Cost=>Current cost, Accumulated Cost to be adjusted to the cost before the cost variance was applied.

Error:
Could not save record - Require unique data: Please change information.: ERROR: duplicate key value violates unique constraint "m_matchinv_uu_idx" Detail: Key (m_matchinv_uu)=(96a93e06-22bb-4521-bbe8-cae0b671aec6) already exists.

Environment

None

Assignee

Unassigned

Reporter

Michael Powacht

Labels

None

Tested By

None

Components

Affects versions

Priority

Major
Configure