Guides & Tutorials7.7 Update TroubleshootingTroubleshooting Invoice Related Errors

Troubleshooting Invoice Related Errors

Symptoms

After applying the 7.7.0 update, users may experience invoice-related errors in the following scenarios:

 

1. Invoices generated by orders or the daily automation tasks do not receive the custom invoice format specified in the new Tax Configuration interface.

 

2. In Project Management Addon may experience an SQL error when invoices Time Entries when the Client Data Snapshot mode is enabled:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'invoiceid' cannot be null (SQL: insert into `mod_invoicedata`...

 

3. Manually generated one-time invoices do not honour the invoice generation setting on the invoice due date

 

4. An SQL Error occurs when splitting an invoice with Client Data Snapshot mode enabled:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'invoiceid' cannot be null is displayed

 

5. An SQL error occurs when converting a quote to an invoice with Client Data Snapshot mode enabled:

 SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'invoiceid' cannot be null 

Cause

A logic change is required to ensure the invoice ID is passed at the appropriate point of the invoice routine

Workaround

UNtick the Setup > General Settings > Invoices tab > Client Data Snapshot option.

Solution

A hotfix has been created which will resolve all the above errors by including additional logic to handle these scenarios. It can be downloaded from:

https://whmcs.community/files/file/103-core-13106-pma-136-core-13119-core-13121-core-13122-multiple-invoice-generation/

Once the hotfix is applied, invoices an then be generated via the Project Management Addon for time entries.