SELECT
entity_type_id
, entity_type_code
FROM eav_entity_type
ORDER BY entity_type_id
5 order
6 invoice
7 creditmemo
8 shipment
### Order
INSERT INTO magento191.eav_entity_store (entity_type_id, store_id, increment_prefix, increment_last_id)
VALUES (5, 1, 2, 200000000);
### Invoice
INSERT INTO magento191.eav_entity_store (entity_type_id, store_id, increment_prefix, increment_last_id)
VALUES (6, 1, 2, 200000000);
### Credit Memo
INSERT INTO magento191.eav_entity_store (entity_type_id, store_id, increment_prefix, increment_last_id)
VALUES (7, 1, 2, 200000000);
### Shipment
INSERT INTO magento191.eav_entity_store (entity_type_id, store_id, increment_prefix, increment_last_id)
VALUES (8, 1, 2, 200000000);
SELECT
*
FROM magento191.eav_entity_store;
SELECT
core_store_group.name AS group_name
, core_website.name AS website_name
, core_store.name AS store_name
, core_store.store_id
, increment_prefix
, increment_last_id
, entity_type_code
FROM eav_entity_store
INNER JOIN eav_entity_type ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
INNER JOIN core_store ON core_store.store_id = eav_entity_store.store_id
INNER JOIN core_store_group ON core_store_group.group_id = core_store.group_id
INNER JOIN core_website ON core_website.website_id = core_store.website_id
WHERE eav_entity_store.store_id != 0 ORDER BY eav_entity_store.store_id;
If you have encountered "duplicated invoice number" error message from Paypal, try to examine the "reserved_order_id" field and reset it accordingly:
SELECT
entity_id
, store_id
, reserved_order_id
, base_currency_code
, base_grand_total
, customer_email
FROM sales_flat_quote
ORDER BY entity_id DESC
Reference:
http://www.warpconduit.net/2012/04/18/how-to-change-the-order-increment-id-and-prefix-in-magento/
No comments:
Post a Comment