Can't submit sales invoice

Current sales invoice no. is 004 (lets assume).

I deleted this sales invoice and created a new one. It takes the number 004. But when I try to submit this invoice, it is not submitted. I don’t get any error message, just a error sound.

When I create another invoice (number 005), leaving that one as draft, then 005 gets submitted. Now when I delete 005 and create another invoice (number is 005 for new invoice) this invoice now does not get submitted.

Is this problem to everyone or is it just me ?

Any solution to this ?

I get 500 internal server error in console.

Can you show me the naming series you are using, is the default one like this : SINV-24-00110, or you have your custom

Also, when you will restart the server the error will also shown on screen just like currently only sound is coming.

Namimg series is default, no changes have been made.

Even on restarting server, the same thing happens. No error on screen, only on console.
Error sound plays.