Display subtotal without VAT

  • Posts: 8
  • Thank you received: 0
10 years 1 week ago #152265

Hello,
I have the problem that the subtotal in the bill contains the VAT.
How I can correct this failure?

Thanks for your help.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 week ago #152290

Hi,

You have to edit hte view "order / show" via the menu display > views and replace:

									<?php
									if($this->config->get('price_with_tax')){
										echo $this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id);
									}else{
										echo $this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id);
									} ?>
By:
echo $this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id);

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

  • Posts: 8
  • Thank you received: 0
10 years 6 days ago #152402

Hi,

in which file I must change the code?

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

  • Posts: 13201
  • Thank you received: 2322
10 years 6 days ago #152406

Hi,

You have to edit hte view "order / show" via the menu display > views and replace:

hikashop.com/support/support/documentati...ize-the-display.html

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

  • Posts: 30
  • Thank you received: 0
9 years 4 months ago #183719

Hi Xavier,

I am doing exactly as you suggested in this thread however whatever I do, it does not seem to effect the subtotal.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #183761

Hi,

Are you sure that you are editing the view in the correct template ?

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

  • Posts: 30
  • Thank you received: 0
9 years 4 months ago #183762

Yes of course...I actually selected my template from the dropdown menu so not to have mistakes etc ;)

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #183767

Where exactly do you want to display the subtotal without VAT ?

Because for the invoice you can have to edit the view "order / invoice" of the backend template too.
And replace:

									<?php
									if($this->config->get('price_with_tax')){
										echo $this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id);
									}else{
										echo $this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id);
									} ?>
By:
<?php
echo $this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id);
?>

The following user(s) said Thank You: dashmalta

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

  • Posts: 30
  • Thank you received: 0
9 years 4 months ago #183770

I will check that again.

I want to display the subtotal without VAT during the checkout process. In my opinion it does not make much sense to put sub total with VAT, the VAT under neath it and finally the total amount (same exact amount as the subtotal) :)

Thanks

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #183773

So if it's during the checkout process, you have to edit the view "checkout / cart" of the frontend template.
And replace:

						$this->row = $this->total;
						echo $this->loadTemplate();
By:
						$origTaxConfig = $this->params->get('price_with_tax');
						$this->params->set('price_with_tax','0');
						$this->row = $this->total;
						echo $this->loadTemplate();
						$this->params->set('price_with_tax',$origTaxConfig);

The following user(s) said Thank You: dashmalta

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

  • Posts: 30
  • Thank you received: 0
9 years 4 months ago #183846

Works perfectly!! So the change in code further up in the thread is to change the subtotal without VAT in the invoice that is sent to the client, right? :)

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

  • Posts: 81509
  • Thank you received: 13065
  • MODERATOR
9 years 4 months ago #183854

No.
The change on this message www.hikashop.com/forum/customers/867456-...hout-vat.html#152290 is to change that on the invoice page of the frontend (that the customer can access via his orders history page).
The change on this message www.hikashop.com/forum/customers/867456-...hout-vat.html#183767 is to change that on the invoice page that can be printed in the backend of the website.

The following user(s) said Thank You: dashmalta

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

  • Posts: 20
  • Thank you received: 0
8 years 7 months ago #212331

Cette solution ne fonctionne pas chez moi. Par contre si je modifie le fichier invoice.php du plugin "AttachPdf", ça marche :cheer:

Last edit: 8 years 7 months ago by sps2i. Reason: Solution found

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

  • Posts: 81509
  • Thank you received: 13065
  • MODERATOR
8 years 7 months ago #212333

Merci de ne pas créer plusieurs message pour la même question:
www.hikashop.com/forum/orders-management...-sur-la-facture.html

Et de poster en anglais sur le forum anglais.

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

Time to create page: 0.112 seconds
Powered by Kunena Forum