Thursday, January 18, 2018

Ledger account is not among accounts in account group

In working with my customer, I found that they were needing to do a VAT adjustment for a customer invoice that shouldn't have charged VAT.  They were able to credit the customer, but didn't really do it the right way.

Here is how I achieved the adjustment via General Journal.

Here is the scenario:

1. Customer was invoiced and charged VAT on the invoice.
2. Customer should not have been charged VAT and therefore needed a credit of the VAT amount.
3. Due to the situation they were in at the time (Long store... ...), they created a Journal to get that credit to the customer.
4. The journal went from the 'Customer' to an offset account.  This is some sort of holding account. (NON VAT account).
5. Now, we are trying to create a journal that will move the refund from that holding account into the proper VAT account.
6. When adding in the 'VAT COde' on the 'General' tab, we get the following error:
Ledger account [holding account] is not among the accounts in account group [Ledger Posting Group] that are used for VAT code [VAT Code]
This was true as my 'holding account' was not part of my Ledger Posting Profile under VAT in GL.
However, it still didn't  make sense.  To get this to work I had to:
1. Make the 'Account' in the journal line be the VAT account
2. Make the 'Offset account' in the journal line be the non-VAT 'holding account'.
3. Set my amount as a debit.
4. Set my VAT code.
5. POST!

Worked great!

Wednesday, January 17, 2018

Cannot execute a data definition language command on

While posting a timesheet, one of my users received the following error:

Cannot execute a data definition language command on Source document line (SourceDocumentLineTmpJournalize). Reference table ID: 0, None.
The record already exists.

INSERT INTO tempdb."DBO".t101281_3FFE3B67AFC840C6A35FBD063AF9DA46 (ISFINAL,TYPEENUMNAME,TYPEENUMVALUE,STATUS,SOURCEDOCUMENTHEADER,PARENTSOURCEDOCUMENTLINE,SOURCERELATIONTYPE,EXCHANGERATEDATE,SOURCEDOCUMENTLINE,ACCOUNTINGDATE,RECVERSION,PARTITION) SELECT T1.ISFINAL,T1.TYPEENUMNAME,T1.TYPEENUMVALUE,T1.ACCOUNTINGSTATUS,T1.SOURCEDOCUMENTHEADER,T1.PARENTSOURCEDOCUMENTLINE,T1.SOURCERELATIONTYPE,T1.EXCHANGERATEDATE,T1.RECID,T2.ACCOUNTINGDATE,1,5637144576 FROM SOURCEDOCUMENTLINE T1 CROSS JOIN tempdb."DBO".t100010_A652A6A3D1EF4EE9A039F442E3BCEC58 T2 WHERE ((T1.PARTITION=5637144576) AND (T1.SOURCEDOCUMENTHEADER=5638078273)) AND ((T2.PARTITION=5637144576) AND (T2.SOURCEDOCUMENTLINE=T1.RECID))

Very interesting error.  Based on this blog post, it seems an AOS restart may fix the issue.  I will try it here shortly...

UPDATE:
AOS Restart did not fix the issue.... Continuing on...

UPDATE:
Not sure why, but creating a new time sheet did the trick.  Posted perfectly.