You can try the following.
In app/code/core/Mage/Sales/Model/Resource/Quote.php
Search for isOrderIncrementIdUsed Method
In this method
replace
$bind = array(':increment_id' => (int)$orderIncrementId);
with
$bind = array(':increment_id' => $orderIncrementId);
----------------------------------------------- --- ---------- OR------------------------------------ --- ----------------------------------------
Go to admin-> sales-> orders and see the highest order number (for each type of store!)
Then look at your database. In the eav_entity_type table, you will find all of the listed object types. Interested in a change where the order number begins, i.e. order / order order. Remember entity_type_id.
Then go to the eav_entity_store table. Find the entity_type_id object. Now you can change the increment_last_id value to the last number of the actual order. (That is, if you want your next orderId to be 15000, set increment_last_id to 14999.)
source share