Invoice Number for Points Payment

  • Posts: 351
  • Thank you received: 7
  • Hikashop Business
2 months 1 week ago #308655

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.6

Hi,

We found that the orders that using points payment method does not generate a correct invoice ID,
Can you please have a look?

Thank you.

Attachments:

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

  • Posts: 66889
  • Thank you received: 9887
  • MODERATOR
2 months 1 week ago #308670

Hi,

How did you configure the "invoice number format" setting of the Hikashop configuration ?
And could you provide a screenshot of the settings of the user points payment method ?

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

  • Posts: 351
  • Thank you received: 7
  • Hikashop Business
2 months 1 week ago #308735

Hi,

The screenshot has been attached, please have a look. Thank you.

Attachments:

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

  • Posts: 66889
  • Thank you received: 9887
  • MODERATOR
2 months 6 days ago #308742

Hi,

I'm not sure why it does that.
Could you also provide a screenshot of the history area of that order with the issue so that we can get a better understanding of the flow when the order is created/confirmed ?

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

  • Posts: 351
  • Thank you received: 7
  • Hikashop Business
2 months 6 days ago #308792

Hi,

As requested, please have a look.

Attachments:

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

  • Posts: 66889
  • Thank you received: 9887
  • MODERATOR
2 months 5 days ago #308820

Hi,

Ah yes, I see what is the problem.
In this case, the order status is changed by the user points plugin before the order is created.
And the invoice number is generated before the order is created.
However, you're using the "order_id" instead of "id" or "order_invoice_id" to generate the invoice number and the order_id is not available yet at this point.
So that will require moving the creating of the order_invoice_number just after the order is created instead to all for the order_id to be used in such cases where the order is directly created as confirmed.

I've added a patch on our end to fix that. You get the patch once you update to HikaShop 4.2.0

The following user(s) said Thank You: n00bster

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

Time to create page: 0.065 seconds
Powered by Kunena Forum