Hi,
When an order is created, the order number is created for it.
When the order status changes from created to confirmed the invoice status is created.
So if you try to display the invoice before the order status is changed to confirmed, HikaShop will only have the order number, not the invoice number. Thus, in that case, it uses the order number instead of the invoice number on the invoice as it doesn't have another possibility.
So normally, and that's the case by default, the customer doesn't have access to the invoice on the frontend or in the email notifications before the order status is confirmed and thus he should normally see the invoice number and not the order number on it. That can however be changed if you modify the order status settings in the menu System>Order statuses.