Invoice Number for Points Payment

  • Posts: 548
  • Thank you received: 11
  • Hikamarket Multivendor Hikashop Business
4 years 9 months 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: 81508
  • Thank you received: 13064
  • MODERATOR
4 years 9 months 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: 548
  • Thank you received: 11
  • Hikamarket Multivendor Hikashop Business
4 years 9 months 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: 81508
  • Thank you received: 13064
  • MODERATOR
4 years 9 months 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: 548
  • Thank you received: 11
  • Hikamarket Multivendor Hikashop Business
4 years 9 months ago #308792

Hi,

As requested, please have a look.

Attachments:

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

  • Posts: 81508
  • Thank you received: 13064
  • MODERATOR
4 years 9 months 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