Order numbers out of sync

  • Posts: 68
  • Thank you received: 8
  • Hikashop Business
2 years 1 month ago #345863

-- HikaShop version -- : 4.6.2
-- Joomla version -- : ‎3.10

Hello,

We have our Order number format and Invoice number format both set to W{id} so the order and invoice number are the same.

Recently an employee accidentally created an order and then deleted it now the invoice id is always 1 lower than the order id.

For example:
Order number: W600
Invoice number: W599
ID: 600

Why is this the case if we are using W{id} as the format for both? Shouldn't this match the orders ID column?

Thanks,
Nathan

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345865

Hi,

{id} means {order_id} for the "order number format" and {order_invoice_id} for the "invoice number format".
The order_id is incremented when a new order is created.
The order_invoice_id is incremented when an order is confirmed (usually after a payment).
So if an order is created but not confirmed, the order_id will be incremented but not the order_invoice_id and thus if you use {id} for both formats you'll get a discrepency.
If you want the invoice number format setting to use the order_id, then you need to use {order_id} instead of {id}

Last edit: 2 years 1 month ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 8
  • Hikashop Business
2 years 1 month ago #345886

Thank you very much. That makes sense.
Is there any risk to changing order/invoice number format now? Will it change old old orders or just the future ones?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 4 weeks ago #345910

Hi,

It won't change the old orders, only the future ones.
There is no risk.

The following user(s) said Thank You: MumsHealth

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 8
  • Hikashop Business
2 years 2 weeks ago #346372

Thank you. I forgot to respond to this but it worked!

Please Log in or Create an account to join the conversation.

Time to create page: 0.044 seconds
Powered by Kunena Forum