Post by philfab » Mon Aug 07, 2017 8:15 pm

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

Newbie

Posts

Joined
Mon Aug 07, 2017 8:05 pm

Post by ADD Creative » Tue Aug 08, 2017 7:20 pm

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>

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 12 guests