Recurring invoices are corrupting my invoice numbering



issue is regarding version 1.5.9.

Today i had one recurring invoice planned and I saw that two invoices were generated with the same invoicenumber (15381). In the invoicegroup i see that the next invoicenumber is 15383. (see attached images)
To fix this issue i have to delete the duplicate and correct the next invoicenumber in the default group.
Last month i had the same issue but i thought that it might have been an incident. Today however it is the same again and with a different customer.

Can someone shed some light on this problem?

Any help would be appreciated.

recurring2 recurring


It must be something strange with those invoices 15381 being in ‘concept’ (draft). I’m hoping my favorite programmer @crafter can shed a light on this one.
I can guess for you that the internal id in the database is 15381/15382, so it must be a sequence thing with invoices in draft status


Underdog, Thank you for your response, It would be great when someone with more knowledge than i have, could tell what I could do to solve this issue. An issue that is not an incident but it occurs with every recurring action.