One constraint I'm dealing with on a project is for all order numbers to be consecutive in nature.

Current: 1000, 1001, 1003, 1004, 1008, 1010
Desired: 1000, 1001, 1002, 1003, 1004, 1005

Problem Statement

Accounting systems can only record sales receipts and invoices in consecutive numbers. If a non-consecutive number comes through, the accounting system is forced to rewrite the number to a consecutive number.

When that happens, Magento and the accounting system are no longer synced by transaction number. I have a clear understanding of why Magento does not store consecutive order numbers - due to sales quotes being created before order is transacted.

Requirements & Question

The requirement is to keep some form of sync between Magento and the accounting system. That means a transaction number or another identifier.


  1. Is there a way to maintain consecutive order numbers in Magento without breaking the core?
  2. Is there another common identifier that can be used between the accounting system and Magento if the transaction numbers don't sync up?
  • +1 Interesting issue. I would guess that it might be simpler to maintain a correlation between the Magento order ID and the accounting ID. You could potentially go the route of trying to force consecutive order numbers even in the case of rolled-back transactions, but I have a feeling that would be more complicated and error-prone...just a hunch though haven't dug too deep into these waters before! Jun 11, 2014 at 14:23

2 Answers 2


Magento is not intended to have consecutive order numbers. This is what accounting systems are for. Not every order in Magento necessarily is going to have an invoice. For example there are orders which ...

  • never get paid (pre payment)
  • get cancelled in an early state
  • may be splitted in multiple invoices
  • are changed on request

Invoice numbers need to be consecutive, not order numbers. As a result there is no other way to logically get them in an uninterrupted order. Use an accounting system and keep the references.


I am using shipping and Quickbooks integration software from Teapplix. They support using ebay Sales Order number or Magento sales order number as Quickbooks sales receipt number. For Magento orders, they just needed to do a customization for me on my teapplix account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.