GL Pmt.Selection not zero in schema currency after payment

Description

This issue is similar to https://idempiere.atlassian.net/browse/IDEMPIERE-3434
Primary schema=USD,
Secondary schema=THB
Accounting Schema: Use Suspense Balancing=N
Accounting Schema: Use Currency Balancing=N

2 vendor invoices in currency USD (primary schema).
Invoice1: CR AP USD 22,814.90
Invoice2: CR AP USD 835.36

System converts and posts to THB-schema:
Invoice1: CR AP THB 776,704.72
Invoice2: CR AP THB 28,438.79 => OK
USD/THB rate at invoice = 34.04374865

Payment in USD, system converts and posts to THB-schema:
DR Payment Selection 802,320.87=> Pmt.Selection different by 0.01 than AP in Inv1 & Inv2
CR BIT 802,320.87

USD/THB rate at payment = 33.924399664

Payment Allocation in THB-schema:
DR (Total) AP THB 776,704.72=>OK
DR (Total) AP THB 28,438.79=>OK
CR (Total) Payment Selection THB 802320.88=> NOT OK Payment Selection not zero
CR (Total) Realized Exch.Gain THB 2822.63=> NOT OK

In order for GL Payment Selection to be zero, the following accounting entry would be correct:
DR (Total) AP THB 776,704.72
DR (Total) AP THB 28,438.79
CR (Total) Payment Selection THB 802320.87
CR (Total) Realized Exch.Gain THB 2822.64

Environment

None

Assignee

Unassigned

Reporter

Michael Powacht

Labels

None

Tested By

None

Components

Affects versions

Priority

Major
Configure