VAT on invoice has dissapeared

  • Posts: 29
  • Thank you received: 0
7 years 10 months ago #259038

-- url of the page with the problem -- : www.belysningsimporten.se/
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.4.45

Hello

The compilation of VAT previously available has disappeared on the invoice, so now it's just the sub total, shipping and total that appears.
VAT will still appear in the order and confirmation email and the box for detailed VAT is checked.

I have exactly the same information in the order / invoice.php on our other site, but where VAT is shown as it should on the invoice.

Any ideas on what could be wrong?

Thanks in advance!

Regards,
Henrik

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
7 years 10 months ago #259073

Hi,

The VAT data displayed in the invoice is taken from the VAT data in the order in the database.
So if you edit the order details in the backend do you see the VAT like you want ?
Could you provide some screenshots so that we can understand the situation ?
- of the tax rules
- of the order details in the backend
- of the invoice
- of the email

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

  • Posts: 29
  • Thank you received: 0
7 years 10 months ago #259082

Hi Nicolas,

Accompany pictures on order, e-mail, tax rates and the code for the invoice and the invoice

.
<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.6.0
 * @author	hikashop.com
 * @copyright	(C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><div id="hikashop_invoice_main_div">
	<div id="print" style="float:right">
					<tr>
						<?php if($this->invoice_type=='full' && !empty($this->element->billing_address)){?>
						<td>
							<fieldset class="adminform" id="htmlfieldset_billing">
							<legend style="background-color: #FFFFFF;"><?php echo JText::_('HIKASHOP_BILLING_ADDRESS'); ?></legend>
								<?php
									$class = hikashop_get('class.address');
									echo $class->displayAddress($this->element->fields,$this->element->billing_address,'order');
								?>
							</fieldset>
						</td>
						<?php }?>

Regards,
Henrik

Attachments:
Last edit: 7 years 10 months ago by Jerome.

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
7 years 10 months ago #259118

Hello,

I'm quite surprised by your screenshots, one question do you have some override view and especially on your order view ?
To check this point, go to Components => HikaShop => Configuration, on Display dropdown select Views.
Then, use the three dropdown filters with : Order/Your backend template/Back end.



See, the view number 13, called invoice, the little trash icon means that there some custom (or an override) on the invoice view.
If you have this, save it on your side, and try to delete it by clicking on the trash icon.
And if, that solve your issue that means that your override is the roots issue.

Awaiting news from you.

Regards

Attachments:
Last edit: 7 years 10 months ago by Philip.

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

  • Posts: 29
  • Thank you received: 0
7 years 10 months ago #259155

Hi Philip

Yes we have a few overrides, also on the view order invoice but it does not help to trash the override.
We have the exact same code in this file as we have on our other site where it works fine, so it feels like there is something else that cause the error.

Regards,
Henrik

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
7 years 10 months ago #259157

Hi,

The tax data is in the order details page based on your screenshots. So if it's not in the invoice I can only think that the code of the invoice has been changed.
I don't see what else it could be.
Could you provide a backend access via our contact form along with a link to this thread so that we could check on the issue ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 29
  • Thank you received: 0
7 years 10 months ago #259182

Hi

I have sent access information to your contact form.

Regards,
Henrik

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
7 years 10 months ago #259251

Hi,

Thank you. I've found the issue and fix it.
The problem came from the line:

$taxes = round($this->order->order_subtotal - $this->order->order_subtotal_no_vat + $this->order->order_shipping_tax + $this->order->order_payment_tax - $this->order->order_discount_tax,$this->currencyHelper->getRounding($this->order->order_currency_id,true));
which had to be changed to:
$taxes = $this->currencyHelper->round($this->order->order_subtotal - $this->order->order_subtotal_no_vat + $this->order->order_shipping_tax + $this->order->order_payment_tax - $this->order->order_discount_tax,$this->currencyHelper->getRounding($this->order->order_currency_id,true));
in the invoice view file.

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

  • Posts: 29
  • Thank you received: 0
7 years 10 months ago #259315

Brilliant! Thank you for your help.

Regards,
Henrik

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

Time to create page: 0.113 seconds
Powered by Kunena Forum