Skip to main content

Order number and Invoice number

More
10 years 11 months ago #217056 by Nello
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4

Hi,
I need to start the order number and invoice number from a specific number.
The order number must be 222, and the invoice number must be 003.

So for the order number I can use this on my DB my Sql: ALTER TABLE hd_hikashop_order AUTO_INCREMENT = 222;
How can I alter the start number for the invoice?

Thank you!

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

More
10 years 11 months ago #217078 by nicolas
Hi,

The start number for the invoices comes from the biggest value of order_invoice_id in the orders already in the database.
So if you don't have yet any order, create a fake one with the order_invoice_id being set to 2 via your phpmyadmin and that should do it.

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

More
10 years 1 month ago #247923 by ali
Replied by ali on topic Order number and Invoice number
Sorry to dig up an old message, but I don't understand your statement in the case of
"Invoice number reset frequency = Every year".

My problem is that I have set
Code:
Invoice Number format = F-{date format="y"}{id size="5"} Invoice number reset frequency = Every year
and, having orders since 2014, want to apply this only for 2016 orders.

What I did is set, directly with SQL:
#__hikashop_order.order_invoice_id of 2016 only from 1 to 98
#__hikashop_order.order_invoice_number of 2016 only from F-1600001 to F-1600098
(98 if or the example).
The next order posted registered in the database with
#__hikashop_order.order_invoice_id = 1 and #__hikashop_order.order_invoice_number = F-1600001
instead of #__hikashop_order.order_invoice_id = 99 and #__hikashop_order.order_invoice_number = F-1600099
Why?

And according to your statement "The start number for the invoices comes from the biggest value of order_invoice_id in the orders already in the database" what will happen if, let say, the next order is in 2017. Will it be?
#__hikashop_order.order_invoice_id = 1 and #__hikashop_order.order_invoice_number = F-1700001


It looks like that the start rely on some other value coming from another table than #__hikashop_order.

How does it work?

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

More
10 years 1 month ago #247932 by Jerome
Hi,

having orders since 2014, want to apply this only for 2016 orders.

Once an "order number" or an "invoice number" is generated ; it becomes a fixed value.
So you can change your configuration afterwards, it won't affect old (confirmed) orders.

order_invoice_id generation
In the orders you also have a field for the order_invoice_created ; which is the used field to get the orders in a time period.
If the field is empty, the order is considered as "not confirmed".

So you should put a date (timestamp) in the 2016 orders to let them be considered as 2016 orders by HikaShop.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: ali

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

More
10 years 1 month ago #247983 by ali
Replied by ali on topic Order number and Invoice number
Thanks a lot for your answer.

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

Time to create page: 0.252 seconds
Powered by Kunena Forum