Symptom
You are seeing the below error message after trying to publish an invoice.
Invoice was not approved, please check it has all codes assigned.
Applies To
Purchase/Sales invoices.
Cause
This error indicates that not all codes have been assigned to the invoice, tax summary or line items, preventing it from publishing.
Resolution
In order to clear this error you will need to check that you have assigned a Supplier Account, Category, and VAT Code. If you have line items on your invoice you will need to make sure a Category and VAT code is assigned for each one.
Please ensure the same is done on any line items or tax summary lines that may be present on the invoice.
Once all codes have been assigned you will be able to publish the invoice!