Help

2

integrity error while creating Invoice

Avatar
Mike Lindsay

Just starting to test V7 today. This is with a blank install. I successfully created customers, products, and sales orders. After confirming the sales order, and completing the Delivery Order, I click Create Invoice, and get this message;

Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: account_id - account.id]

I assume I just haven't completed setup of something. Any ideas what I missed?

Avatar
Discard
6 Answers
2
Avatar
Mike Lindsay
Best Answer

Somehow I installed invoicing and payments, but ended up with Accounting module not even installed. That was the issue.

Avatar
Discard
4
Avatar
Gustavo
Best Answer

I would check the following items:

  • accounting journals
  • properties for your products in sales: check that in the accounting tab of your products
2 Comments
Avatar
Discard
Avatar
Ray Carnes
-

+1 - this is usually because the product your are trying to invoice has no income account.

Avatar
Mike Lindsay
-

I set income accounts for the items parent category. I will try to double check this today though, been a little busy.

4
Avatar
Peter
Best Answer

This happens if the Customer you are selling to, has no Accounts Payable and Accounts Receivable tied to his profile.

To be on the safe side, configure an expense and income accounts for the Saleable Product.

1 Comment
Avatar
Discard
Avatar
Dave Burkholder
-

Thanks a lot. I was getting this error on Purchase Orders also and I couldn't figure out what to do as I had Income / Expense accounts for the products. Here I missed AP / AR accounts for the Vendor. Fixed that and my problem was resolved.

1
Avatar
patrick
Best Answer

The answer is already in the message. Somehow the invoice is missing an id for the account, which is a obligated field. You probably have not setup something for accounting (for example which financial book does the invoice have to be mapped in order for the financial department to process it correctly). Have you installed any financial modules and have you specified which kind of bookkeeping you want to use?

Avatar
Discard
0
Avatar
Victor Okrobodo
Best Answer

I experienced a similar issue and this is usually tied to some sort of missing account configuration. You can try these steps:

  • Make sure the income account is set for the product. You can do this by checking under the invoicing tab for the selected product. The income account for the product may have already been set for at the Product Category level. Just make sure this is done

  • Set Account receivables and Account payable for the customer

  • For the journal the invoice is recorded under, set the default debit account and default credit account.

In my own case, I had to set the default credit and debit account for the Customer Invoices journal to resolve the issue.

Avatar
Discard
0
Avatar
Jordan Vrtanoski
Best Answer

I had same problem. My solution was to install the Accounting module and to set-up the "Income Account" and "Expense Account" for the product, as well as the accounts for the customer.

Avatar
Discard