Purchase: Save PI Error - Column “ReferCAJEIsPayment” does not belong to table APInvoice
Question : When I try to save Purchase Invoice, the system prompts me an error – Column “ReferCAJEIsPayment” does not belong to table APInvoice . How can I solve this problem?
Version : 1.8 / 1.9 / 2.0
Possible Reason :
This is due to some columns missing from the AP Invoice or other related tables in the system. This would happen when the update of AutoCount version is not done properly.
Solution :
Log out AutoCount, and go to SQL Management Studio to run the query provided on the affected database.
1. Click on the Windows Start button & type to search for SQL Management Studio.
2. Select your server name with instance (Example: JS-PC\A2006).
3. Select “SQL Server Authentication”.
4. Type login as sa.
5. Type your SQL Server instance password.
6. Click on Connect.
7. Click on New Query.
8. Select the database name that having the mentioned issue.
9. Copy and paste the following query provided below into the blank space.
10. Click on Execute to run the query.
SQL queries to be copied and pasted onto SQL Management Studio is:
if not exists (SELECT * FROM dbo.syscolumns WHERE id = object_id('APInvoice') AND name = 'ReferCAJEIsPayment') ALTER TABLE [dbo].[APInvoice] ADD [ReferCAJEIsPayment] [d_Boolean] NULL if not exists (SELECT * FROM dbo.syscolumns WHERE id = object_id('APInvoice') AND name = 'ReferCAJEDocKey') if not exists (SELECT * FROM dbo.syscolumns WHERE id = object_id('APInvoice') AND name = 'ReferCAJEDocNo') if not exists (SELECT * FROM dbo.syscolumns WHERE id = object_id('APPayment') AND name = 'ReferCAJEDocKey') if not exists (SELECT * FROM dbo.syscolumns WHERE id = object_id('APPayment') AND name = 'ReferCAJEDocNo') UPDATE APInvoice Set ReferCAJEIsPayment = 'T' Where ReferCAJEDocKey IS NULL |
After running this query, you may then create new Purchase Invoice.
For the installation of SQL Management Studio, refer to How to install Microsoft SQL Management Studio
By : Jae Sen 180814, Lay Swan 180823, P180823
AutoCount Accounting 2.0 & 2.1
|
AutoCount Accounting 1.8 / 1.9
|
![]() |
AutoCount Payroll
|
AutoCount POS
|
AutoCount On The Go
|
![]() |
AutoCount Accounting Plug-In Documentations
|