GL Inventory Clearing - Minor rounding variances

Description

GL Payment Selection (PS), Unallocated Cash(UC) =>already resolved

When recording a payment, there is a single line posting to GL DR Payment Se

lection (Vendor Payment) or GL CR Unallocated Cash (Customer Receipt)
If the allocation document refers to multiple invoices, there a multiple line postings to GL CR Payment Selection (Vendor Payment) or GL DR Unallocated Cash (Customer Receipt)
If the payment is made in a currency other than the primary or secondary accounting schema’s, the conversion into schema currency can lead to minor differences between GL DR/CR Payment Selection or GL DR/CR Unallocated Cash.
That means, even if the payment/receipt was fully allocated to invoices, there may be minor left-over variances. For fully allocated payments, the balance on PS and UC should be zero.
You resolved the above issue by implementing a rounding adjustment in program /org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java, method: createRoundingCorrection(…);

GL Inventory clearing =>to be resolved

Similar to the one above:

When recording an invoice, there is a single line posting for a Purchase Order Line to GL DR Inventory Clearing.
If there are multiple material receipt lines for this PO or invoice line, the matched invoice document creates multiple line postings to GL CR Inventory Clearing.
If the invoice is recorded in a currency other than the primary or secondary accounting schema’s, the conversion into schema currency can lead to minor differences between GL DR/CR Inventory Clearing.
That means, although the invoice was fully allocated to material receipts through the matched invoice document, there may be minor left-over variances. For fully allocated invoices, the balance on Inventory Clearing should be zero.
Here is a way to simulate this scenario:
Currency rate: e.g. AUD/THB=22.5062, Account Date=November 2019
Purchase Order in AUD, Qty=500, Price= 23.32, Line Amount=AUD 11,660.00
MR1 Qty=250 = AUD 5830.00 x 22.5062 => DR Inventory/CR NIR THB 131,211.15
MR2 Qty=250 = AUD 5830.00 x 22.5062 => DR Inventory/CR NIR THB 131,211.15
Invoice (Vendor) Qty=500 = AUD 11,660.00 x 22.5062 => DR Inventory Clearing/CR AP THB 262,422.29
Matched Invoice Line1 => DR NIR/CR Inventory Clearing THB 131,211.15
Matched Invoice Line2 => DR NIR/CR Inventory Clearing THB 131,211.15
There is now a minor balance of CR THB .01 due to rounding which needs to be eliminated in all affected accounting schemas (THB and USD schema in our case).

As was implemented in the rounding solution for Payment Selection, there is a difference in how the rounding adjustment in GL Inventory Clearing should be offset for Currency Balancing=Y and Currency Balancing=N.

If Currency Balancing=Y, the rounding adjustment should be posted as follows:

DR Inventory Clearing/CR Currency Balancing OR
CR Inventory Clearing/CR Currency Balancing
If Currency Balancing=N, the rounding adjustment is posted to the largest balance sheet account I believe.

Environment

None

Status

Assignee

Elaine Tan

Reporter

Soo Fang Lee

Labels

None

Tested By

None

Priority

Minor
Configure