Skip to main content

[SOLVED] Invoicing number starts from 0

More
12 years 7 months ago - 12 years 7 months ago #142693 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
Last edit: 12 years 7 months ago by mitchie.

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

More
12 years 7 months ago #142699 by Eliot
Hi,

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.

More
12 years 7 months ago #142702 by mitchie
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?

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

More
12 years 7 months ago #142709 by Eliot
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.

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

More
12 years 7 months ago - 12 years 7 months ago #142720 by mitchie
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)
Last edit: 12 years 7 months ago by mitchie.

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

More
12 years 7 months ago #142876 by nicolas
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.

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

More
12 years 7 months ago #142882 by mitchie
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!

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

Time to create page: 0.196 seconds
Powered by Kunena Forum