- Posts: 515
- Thank you received: 22
shipping invoice shows invoicenumber after payment
- jouwnaambord.nl
-
Topic Author
- Offline
Less
More
5 years 8 months ago #327991
by jouwnaambord.nl
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4
Hi,
At least until version Hikashop 4.2 when printing an shipping invoice the ordernumber was used. I use the shipping invoice as an orderform, I suppose as most users do.
Now I recently removed some customcode from the invoice view, so now it's the 4.4 version. While printing the shipping invoice now when the order is paid the invoicenumber is used instead of the ordernumber. That's not logical, as the invoicenumber should only be used for the invoice itself?
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4
Hi,
At least until version Hikashop 4.2 when printing an shipping invoice the ordernumber was used. I use the shipping invoice as an orderform, I suppose as most users do.
Now I recently removed some customcode from the invoice view, so now it's the 4.4 version. While printing the shipping invoice now when the order is paid the invoicenumber is used instead of the ordernumber. That's not logical, as the invoicenumber should only be used for the invoice itself?
Please Log in or Create an account to join the conversation.
5 years 8 months ago #327994
by nicolas
Replied by nicolas on topic shipping invoice shows invoicenumber after payment
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:
in the file order / invoice.php that you can edit via the menu Display>Views.
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:
Code:
if(!empty($this->element->order_invoice_number)) {
echo JText::_('INVOICE').': '.$this->element->order_invoice_number;
} else {
echo JText::_('INVOICE').': '.@$this->element->order_number;
}
Please Log in or Create an account to join the conversation.
- jouwnaambord.nl
-
Topic Author
- Offline
Less
More
- Posts: 515
- Thank you received: 22
5 years 8 months ago #328035
by jouwnaambord.nl
Replied by jouwnaambord.nl on topic shipping invoice shows invoicenumber after payment
Hi,
I understand the code, but if I alter that code the only option is to never show the order_invoice_number. But what if I want to have the order_number on the shipping invoice, also when the order is paid immediately at ordering (and thus an invoicenumber is generated)? Now the order_number will never be used when the client pays at ordering?
I understand the code, but if I alter that code the only option is to never show the order_invoice_number. But what if I want to have the order_number on the shipping invoice, also when the order is paid immediately at ordering (and thus an invoicenumber is generated)? Now the order_number will never be used when the client pays at ordering?
Please Log in or Create an account to join the conversation.
5 years 8 months ago #328044
by nicolas
Replied by nicolas on topic shipping invoice shows invoicenumber after payment
Hi,
Well, if you want to display the order number for shipping invoices, you just need to adapt the code for that.
Nothing crazy. For example :
Well, if you want to display the order number for shipping invoices, you just need to adapt the code for that.
Nothing crazy. For example :
Code:
if($this->invoice_type == 'full') {
if(!empty($this->element->order_invoice_number)) {
echo JText::_('INVOICE').': '.$this->element->order_invoice_number;
} else {
echo JText::_('INVOICE').': '.@$this->element->order_number;
}
} else {
echo JText::_('ORDER').': '.$this->element->order_number;
}
Please Log in or Create an account to join the conversation.
- jouwnaambord.nl
-
Topic Author
- Offline
Less
More
- Posts: 515
- Thank you received: 22
5 years 8 months ago #328082
by jouwnaambord.nl
Replied by jouwnaambord.nl on topic shipping invoice shows invoicenumber after payment
Thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.153 seconds