Constraint Error Message

Hello All,
Pls is there any one who can help guide as to resolve the below?


What do I need to change at the DB side to resolve this?

When I make a payment and what to delete it and then the invoice, the payment refuses to be deleted and when I try to delete the invoice, it pops the error in second image.

FOr me to remove that, I had to go to the DB, paiment -facture table to delete that entry before I can remove the entry.

Pls I need help.

Thank you

which dolibarr and php version are you running?

Hi Jon,
Thanks for reaching out.

Dolibarr Ver 19.2
PHP Ver 8.1.31

Further discoveries from the DB are seen in the image below

there are duplicates, How do I get those duplicate removed?

And now the Stock module, has given an error when we want to check stock as seen below

what do I have to do?

Thank you

Thanks

I am not that experienced in databases, but before making ANY changes, then please take a backup.

From that backup, then consider an upgrade to a newer version to see if that fixes the issue - and at the same time it gives you a newer platform, this is a win win :slight_smile:

Hi Jon,

your response is well appreciated.

However, I have done all the recommended, but going to Ver 21 didn’t solve it, had to stay back at 19.2 to still get the system functional.

Thanks

What if you create a new fresh dolibarr installation next to this, compare the database tables, column names and such to get an idea of what to possible change the names to?

Thank Jon,

I have resolved all issues and upgraded to Ver 21.

Email address setup was the root cause as well as upgrade not done successfully affected some db tables which have been rectified.

Thanks