Jump to content

VAT issues (decimals and invoice name)


sitesme

Recommended Posts

Dear all,

I am facing two problems at the moment and it would be great if someone could help me with it.

1. Remove decimals from VAT values
When we add a tax rate, it automatically shows 2 decimals such as 5.00%
Is there an easy way to remove the decimals and only show 5%?

 

2. Display a different title when VAT is enabled or disabled
We need to display TAX INVOICE in the invoice title when VAT is enabled for a specific user.
When VAT doesn't apply, it can simply display Invoice as it is now.

I got the following code from support but there is a variable missing and I hope someone can help me to complete it:

{if !$taxname}
<h3>{$pagetitle}</h3>
{else}
<h3>Tax Invoice</h3>
{/if}

Thank you all in advance.

Link to comment
Share on other sites

On 1/8/2018 at 13:00, sitesme said:

Is there an easy way to remove the decimals and only show 5%?

if you're talking about the Smarty templates, you could use...

{$taxrate|string_format:"%.0f"}

or use an action hook, e.g ClientAreaPageViewInvoice, to modify the values of $taxname and $taxname2.

On 1/8/2018 at 13:00, sitesme said:

I got the following code from support but there is a variable missing and I hope someone can help me to complete it:

you could try...

{if !$taxname}
<h3>{$pagetitle}</h3>
{else}
<h3>TAX {$pagetitle|strtoupper}</h3>
{/if}

there would be plenty of other ways to do this, including Language Overrides,

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated