[ic] Diplaying item prices inclusive of sales tax

Dan Browning interchange-users@icdevgroup.org
Wed Aug 7 18:23:01 2002


At 11:10 PM 8/7/2002 +0100, you wrote:
>Hello,
>
>I want to display prices with and without UK tax. Can anyone tell me the best
>way to do this?
>
>The following doesn't work because [item-price] returns a currency character
>before the price:
>
>[calc][item-price] * __TAX_MULTIPLYER__[/calc]
>
>If I use [item-price noformat=1], I get a 5 d.p. number, and I would have to
>display the currency symbol manually.
>
>Is there some other way around this, or shall I use Perl?
>
>Thank you.

As you've already discovered, you can display the price without formatting 
by using the noformat=1 option.  To get the currency simbol back in there, 
surround the amount with the [currency] tag.  I.e.,

[currency][calc][item-price] * __TAX_MULTIPLYER__[/calc][/currency]

HTH, HAND,

+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Dan Browning, Kavod Technologies <db@kavod.com>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't let your mind wander -- it's too little to be let out alone.