Tax Correction in Allocation Posting

109 views
Skip to first unread message

anton....@fildan.com

unread,
Dec 7, 2015, 3:03:20 PM12/7/15
to iDempiere
Hallo

We plan to use the VAT correction for payment discounts in the accounting schema.
1) We get an posting error if we allocate a payment for two AR invoices 
where invoice 1 has two VAT rates and invoice 2 has again one of those rates.

 Posting Error (org.adempiere.exceptions.DBException: QueryMoreThanOneRecordsFound) - .Doc_AllocationHdr (CMA - DocumentNo=490020, DateAcct=2015-12-03, Amount=0.0, Sta=E - PeriodOpen=true, Balanced=true, Schema=Fildan Accessories UN/35 Euro

2) We need to include the correction postings for payment discounts in the Tax reports.
(They are not part of the Invoice Tax tables. They exist only in the fact table.)
Our solution would be to match them with the corresponding tax lines of the invoices.
The invoice reference is part of the tax correction line item in the fact table but the VAT rate unfortunately is not stored in the line. The data looks like it creates a correction for each Tax rate of an invoice. Would it be possible to store the VAT rate reference when posting each correction.

kr
Anton Fildan

Carlos Antonio Ruiz Gómez

unread,
Dec 13, 2015, 11:27:35 AM12/13/15
to iDempiere
Hi Anton,

1) I was not able to reproduce the issue, this was my test case in GardenWorld:
- create first AR Invoice, payment term 2%10 Net 30, with GST/PST tax in the line (two taxes, one GST, one PST)
- create second AR Invoice, payment term 2%10 Net 30, with PST tax in the line
- create one payment paying the two invoices - it generated discounts, and consequently generated tax correction on the allocation
The payment posted successfully and the allocation posted successfully too.


2) Yes, I tested the attached patch and it seems to work.
Can you please test it and if it's ok then open a JIRA ticket to integrate it?

Regards,

Carlos Ruiz
setTaxIntoTaxCorrection.patch

anton....@fildan.com

unread,
Dec 14, 2015, 11:13:14 AM12/14/15
to iDempiere
Hallo,

Sorry couldn't reproduce the error either anymore.
Don't know what happened.

Thx for the patch, we'll test and create Jira ticket.
Reply all
Reply to author
Forward
0 new messages