- Posts: 60
- Thank you received: 1
[SOLVED] Invoicing number starts from 0
12 years 7 months ago - 12 years 7 months ago #142693
by mitchie
[SOLVED] Invoicing number starts from 0 was created by mitchie
-- HikaShop version -- : Business 2.2.3
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.28
How to start invoicing number from 1?
Thanks in advance
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.28
How to start invoicing number from 1?
Thanks in advance
Last edit: 12 years 7 months ago by mitchie.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142699
by Eliot
Replied by Eliot on topic Invoicing number starts from 0
Hi,
How about create an order and delete it?
Next order will start from 1.
How about create an order and delete it?
Next order will start from 1.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142702
by mitchie
Replied by mitchie on topic Invoicing number starts from 0
Hi Eliot,
thanks for your reply.
As in Europe we need to restate numbering each year, it requires to make a new order each 1st january?
thanks for your reply.
As in Europe we need to restate numbering each year, it requires to make a new order each 1st january?
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142709
by Eliot
Replied by Eliot on topic Invoicing number starts from 0
It's a solution.
You can also change the database structure. The table key_hikashop_order as a column order_invoice_id and you can change the default value from 0 to 1.
You can also change the database structure. The table key_hikashop_order as a column order_invoice_id and you can change the default value from 0 to 1.
Please Log in or Create an account to join the conversation.
12 years 7 months ago - 12 years 7 months ago #142720
by mitchie
Replied by mitchie on topic Invoicing number starts from 0
What about to edit the function?
I wonder how many countries require to start invoicing number from 0 to not make it by default?
Or, even better, add an option to set the starting number to fit every local laws (please, keep in mind these are not personal desires)
I wonder how many countries require to start invoicing number from 0 to not make it by default?
Or, even better, add an option to set the starting number to fit every local laws (please, keep in mind these are not personal desires)
Last edit: 12 years 7 months ago by mitchie.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142876
by nicolas
Replied by nicolas on topic Invoicing number starts from 0
The system should start at 1 not 0.
We did some tests and there is a bug.
You should add the line:
if(empty($order->order_invoice_id)) $order->order_invoice_id = 1;
after the line:
$order->order_invoice_id = $this->database->loadResult();
in the file administrator/components/com_hikashop/classes/order.php and that will fix the problem.
We did some tests and there is a bug.
You should add the line:
if(empty($order->order_invoice_id)) $order->order_invoice_id = 1;
after the line:
$order->order_invoice_id = $this->database->loadResult();
in the file administrator/components/com_hikashop/classes/order.php and that will fix the problem.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142882
by mitchie
Replied by mitchie on topic Invoicing number starts from 0
GREAT!
Thank you.
I've fixed it by myself but I don't like to hack the core component, so this is a great news!
Thank you.
I've fixed it by myself but I don't like to hack the core component, so this is a great news!
Please Log in or Create an account to join the conversation.
Time to create page: 0.196 seconds