Tag: change

  • Managing Magento Invoice and Billing Ids

    Managing Magento Invoice and Billing Ids

    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

    • order
    • invoice
    • creditmemo
    • shipment

    Magento Entity Type IDs Note the corresponding entity_type_id column which will be used by the eav_entity_store table: Magento Order ID and Invoice ID Based on the triplet

    • store_id
    • entity_type_id
    • increment_prefix

    you can set unique billing and invoice IDs for your stores.

    Advanced settings

    In addition to the increment prefix you can also set advanced features such as

    • increment_pad_length
    • increment_pad_char

    Magento advanced billing and invoice ID settings Thus, in case you want to set custom padding characters or change the default ID length simply update to corresponding value in the table eav_entity_type.

    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.