Hello everyone,
On my site, invoice generation is activated when the order status changes to ,,Completed".
When modifying the order status to ,,Completed" on the page of editing the order ( /administrator/index.php?option=com_virtuemart&view=orders&task=edit&virtuemart_order_id=xxxx ), the number of the invoice resets (starts again with the first number, instead of continuing from where it left).
It works ok if I modify order status on the order list page ( /administrator/index.php?option=com_virtuemart&view=orders ).