In case you need to change the invoice and billing IDs in Magento only a few things need to be done. First, make sure you understand the logic how these IDs are assembled so you don’t mess with existing numbers 😉
Magento Invoice and Billing ID Schema
Have a look at the eav_entity_type table and search for the entity_type_codes
you can set unique billing and invoice IDs for your stores.
In addition to the increment prefix you can also set advanced features such as
Changing Billing or Invoice IDs
In case you want to change your billing or invoice IDs make sure that your new ID schema does not conflict with an existing one (and as always make a backup of your database). To update the IDs alter the corresponding increment_prefix and generate all artefacts at least once so that Magento sets the initial IDs for your new ID schema.