Page 1 of 1

PREVAT and INC VAT on cart and invoice 1564

Posted: Mon Aug 07, 2017 8:15 pm
by philfab
1564 I want invoices to show BOTH the prevat price and the with vat price. The product information shows both, but this does not carry through to the cart and invoice. Sorry to be a dummy, I have looked extensively and cant't find info on how to do this or if someone could do it for me- many thanks Phil

Re: PREVAT and INC VAT on cart and invoice 1564

Posted: Tue Aug 08, 2017 7:20 pm
by ADD Creative
Try something like below. Remember to back up files and database first.

Find the following in admin/controller/sale/order.php

Code: Select all

'price'    => $this->currency->format($product['price'] + ($this->config->get('config_tax') ? $product['tax'] : 0), $order_info['currency_code'], $order_info['currency_value']),
'total'    => $this->currency->format($product['total'] + ($this->config->get('config_tax') ? ($product['tax'] * $product['quantity']) : 0), $order_info['currency_code'], $order_info['currency_value'])
And add the following just above.

Code: Select all

'price_ex'    => $this->currency->format($product['price'], $order_info['currency_code'], $order_info['currency_value']),
'total_ex'    => $this->currency->format($product['total'], $order_info['currency_code'], $order_info['currency_value']),
In admin/view/template/sale/order_invoice.tpl change.

Code: Select all

<td align="right"><?php echo $product['price']; ?></td>
<td align="right"><?php echo $product['total']; ?></td>
To.

Code: Select all

<td align="right"><?php echo $product['price_ex']; ?> <?php echo $product['price']; ?></td>
<td align="right"><?php echo $product['total_ex']; ?> <?php echo $product['total']; ?></td>