Error when create invoice

When creating an new invoice with free text item line I get this error :slight_smile:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’ 0, 0, ‘0’, ‘0’, null, 0, 0, 1600, 2832, null, null, 0, 1, 0, ‘0’, 1600, 1232, 2’ at line 1

What can I do to fix this?

Hi,

What version of Dolibarr do you use ?
Any special characters on the free text ?

We use 12.0.4
No special characters.

Enable the module debug bar.
Try your transaction again. After the SQL message, look in the debugbar at databases.
The item in your query right before this string ’ 0, 0, ‘0’, ‘0’, null, 0, 0, 1600, 2832, null, null, 0, 1, 0, ‘0’, 1600, 1232, 2’, you will find a sql query attribute that causes the problem, for instance a negative number. You can try the query in php admin for instance and change the attribute untill it works, then you have found the error and you can look for a solution.