Hello everyone,
I have found a bug when inserting a insurance company for the first time. I have looked into your code and you are getting the max ID in the table but for the first time it will be null. I have a suggestion for changing the code in the file AddressService.php that I will leave bellow.
SELECT case when MAX(id) is NULL then 0 else MAX(id)+1 end AS id FROM addresses
I am using the version 6.1 in Chrome in Windows.