Order number and invoice number

  • Posts: 22
  • Thank you received: 2
  • Hikaserial Subscription Hikashop Business
1 month 1 week ago #364519

-- url of the page with the problem -- : www.scramble.nl
-- HikaShop version -- : 5.1.1
-- Joomla version -- : 5.2.1
-- PHP version -- : 8.1
-- Browser(s) name and version -- : Edge 130.0.2849.80

I have created an order ID in this format: {id size="5"}/{date format="d/m/y"}
This works great.
But is there a way to have the invoice number exactly the same as the order number? The invoice number is only created when the order goes to confirmed. With an electronic payment, this would be immediate. But we also allow bank transfers so then the status of the order will be changed later and another date will be created as invoice number.

Last edit: 3 weeks 3 days ago by Scramble ITS.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 month 1 week ago #364522

Hi,

Yes.
If you want to use the same number you can either use the format:
{order_number}
Or the format:
{order_id size="5"}/{date format="d/m/y"}

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

  • Posts: 22
  • Thank you received: 2
  • Hikaserial Subscription Hikashop Business
1 month 1 day ago #364654

I inserted {order_number} and created a new order, but the invoice number stays empty.
I don't think that your second solution will do the trick. It will with an electronic payment. But if you have a banktransfer then the order will only be confirmed a few days later and so the order_id will probably be right, but not the date. It will take the date of confirmation, not the date the order was placed. Or do I miss something here?

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 month 1 day ago #364659

Hi,

The invoice number is not necessarily generated at the same time as the order number.
The order number is generated when an order is created.
The invoice number is generated based on the enabled statuses under the "invoice" column of the System>Order statuses menu.
By default, only the "confirmed" and "shipped" statuses are enabled so the invoice number is generated when the order status changes to "confirmed" or "shipped".
So, if you want the invoice number to be generated when the order is created, you can enable the "created" status under that column.
And in that case, the second solution I proposed will work like you want.
But you're right that if you use the second solution and the created status is not enabled under the invoice column, and the order is not confirmed / shipped on the same day it is created, the invoice number will be different from the order number.

The following user(s) said Thank You: Scramble ITS

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

Time to create page: 0.060 seconds
Powered by Kunena Forum