Matched invoice document is posted with incorrect precision based on the standard precision of the transaction currency instead of the schema currency. The issue becomes only visible if the transaction currency has a different standard precision (e.g. the Japanese Yen JPY with a standard precision of 0) than the schema currency (e.g. USD with a standard precision of 2).
The following scenario can be used to simulate the incorrect matched invoice posting:
Transaction currency=JPY, Standard Precision: 0
Schema currency=USD, Standard Precision: 2
1 JPY = 0.277582 USD (Multiply rate)
1. Create Purchase order with qty=3, unit price=2400 JPY
2. Create MR qty=3, Posting: DR Inventory/CR NIR USD 1,998.59
3. Create Invoice qty=3, Posting: DR Inventory Clearing USD 1,998.59
4. Matched Invoice posting=DR NIR/CR Inventory Clearing USD 1,999.00 INCORRECT, this should be 1,998.59
The problem seems to be with function FactLine.java=>setAmtAcct(C_Currency_ID,.....) which gets called by updateReverseLine(...) with the transaction C_Currency_ID instead of the schema C_Currency_ID.