Hi,
Whether it is the invoice or the shipping invoice, in both cases, the system will try to use the invoice number if available, and if not, it will use the order number.
So if you display the shipping invoice before the invoice number is generated, you will get the order number on it.
I don't believe this has changed in the last few years.
This is handled by the code:
if(!empty($this->element->order_invoice_number)) {
echo JText::_('INVOICE').': '.$this->element->order_invoice_number;
} else {
echo JText::_('INVOICE').': '.@$this->element->order_number;
}
in the file order / invoice.php that you can edit via the menu Display>Views.