You are receiving the below error message after attempting to publish an invoice.
Error inserting Purchase Order: (Sage.Simply.Common.SimplyException) Database corruption. There are invalid account internal id in account department relationship table.
Sage 50 Canada users.
There is a table named 'tactdrel' which stores the information such as which nominal codes are assigned to which department in Sage 50 Canada. This error occurs if there are any invalid entries in 'lAcctIntId' column in 'tactdrel' table in the Sage 50 Canada database regardless of which nominal code is assigned in AutoEntry.
There is unfortunately nothing that can be done from AutoEntry's side to clear this error, as we do not modify the above-mentioned table in any way. To resolve the issue, you will need to reach out to Sage 50 Canada Support to correct the entry.