Invoice number is always as for {automatic_code}

  • Posts: 13
  • Thank you received: 0
7 years 5 months ago #272512

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 5.6.30

Dears,

I observe incorect behaviour on generated Invoices (backend),
generated invoice number stays in format corresponding for {automatic_code} when Invoice number format is changed as below:

My settings:

Order number format: {automatic_code}
Invoice Number format: {order_id size="5"}/{date format="m/Y"}

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #272519

Hello,

I'm sorry but I am not able to understand your message and the problem you're describing.
Please clarify.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 13
  • Thank you received: 0
7 years 5 months ago #272611

Hmm, in other words, when I generate Invoice by pressing Invoice button on order details page,
I get there invoice number in form M2M64 (which would be correct but for {automatic_code} in invoice number format)
while I have Invoice Number format: set to {order_id size="5"}/{date format="m/Y"}
which should result in invoice number something like 00264/7/2017 not B1M99, am I right ?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #272617

Hello,

If you try to display an invoice (sorry, it is NOT a generation) while there is no invoice number ; the order number will be shown instead.

Now if you're talking about generation of the invoice number ; you need to configure HikaShop order statuses (HikaShop > System > Order statuses).
You need to check the "invoice order status".
www.hikashop.com/support/documentation/5...nfig.html#main_order

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 13
  • Thank you received: 0
7 years 5 months ago #272665

Hello Jerome,

Thanks for your explanation. Displaying then printing is generation of invoice for most people,
I understand that in your opinion in some technical/internal terms of HS it isn't but you are in minority of all people ;-)

For reducing your support work some some requests/hints:
In my opinion there should be tag or mark on invoice if Invoice No not correct / isn't consistent with specification,
and/or there should be haze in configuration option which states, there could be no Inv.No assigned if order is treated as not confirmed
and there will be Incorrect information there.
and/or HS manual page near description of "Invoice number format:..." should state as above

if any of above would be existent than I would bother you

Only sentence on linked manual, which is not clear for me,
but maybe suggest actual HS behavior,
is in section for old HS version < 3.0
(...Before HikaShop 3.0,.... If "created" is listed, you will have the same invoice number than the order number....)

Some auxiliary questions:
How could I change order number and/or next available/free order nr ?

I'm asking because after migration and restoration of site
and making some test order my order numbering advanced and was persistent even after test order delete,
but here Tax Office wants continuity in invoice numbers,
it looks that Invoice Numbers are hardly connected to order number code which would lead to Invoice Numbering discontinuity ?
also for case when order was cancelled

How to handle above ?

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
7 years 5 months ago #272669

Hi,

Thank you for your feedback. I've added some text on the settings to make it more clear:
www.hikashop.com/support/documentation/5...nfig.html#main_order

In HikaShop you have two ids and two numbers for an order:
- the order id is generated when the order is created and it is incremental.
- the order number is generated out of the order id based on your order number format at the same time.
- the invoice id is generated when the order is changed based on how you configured the "invoice" column in the menu System>Order statuses. By default, the invoice id is generated when the order goes from the status created to the status confirmed (that's the way you usually want it on an online shop).
- the invoice number is generated out of the order id based on your invoice number format at the same time as the invoice id.
So the order ids/numbers are contiguous for all the orders and the invoice ids/numbers are contiguous for all the confirmed (paid) orders.
An order that was confirmed at some point and then would be refunded/cancelled would still keep it's invoice id/number.
By default that is. That's also how most online shops need it.
To have a different behavior, it's possible to change the order statuses settings and/or the formats.

If you want to reset the numbering of invoices, you need to delete all the confirmed/cancelled/refunded/shipped orders.
If you want to also reset the numbering of orders, you need to empty the hikashop_order table in your phpmyadmin:
codex.wordpress.org/Emptying_a_Database_Table
Emptying a table in MySQL will remove all its entries and reset its automatic increment to 0.
If you want the orders to start at a specific id from the next order, you need to set the automatic increment in the same table via phpmyadmin: stackoverflow.com/questions/5665571/auto...rement-in-phpmyadmin
If you want the invoices to start at a specific id from the next invoice, you need to have a confirmed order with the id before the one you want in the "order_invoice_id" column. You will have to set that manually via phpmyadmin.

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

  • Posts: 13
  • Thank you received: 0
7 years 4 months ago #272764

Thank you very much for you clarification.

Complementary question is only hikashop_order table to be modified regarding mentioned numbers
or there are others ? (some cross-references)

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #272767

Hello,

In the "hikashop_order" table only the "order_id" field is used by other tables for cross-references.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum