# Implementing two currency formatting on product prices

**URL:** <https://forum.litium.com/t/implementing-two-currency-formatting-on-product-prices/2982>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [June 15, 2023, 11:24am UTC](https://forum.litium.com/t/implementing-two-currency-formatting-on-product-prices/2982 "2023-06-15T11:24:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreeanenciu](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@andreeanenciu](https://forum.litium.com/u/andreeanenciu)\
**Post date:** [June 15, 2023, 11:24am UTC](https://forum.litium.com/t/implementing-two-currency-formatting-on-product-prices/2982/1 "2023-06-15T11:24:30Z")

</div>

Hi

We have a customer that would like to have to types of currency formatting.  
One for products with price \>= 100 where the price should not be displayed with decimals. (Currency format type C0).  
And another one for products with price \< 100 where the price should be displayed with two decimals (Currency format type C2).

Is there any way to add another field on currency model that can have a different value from the existing one and where we could apply a price limit?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/2995f6724290dc63a7bbf645b3edf0cb0987fb64.png)

Or do you have another idea how to implement the feature that the customer wants that can be more flexible?  
I would like to avoid replacing the currency.Format() method to with another one on all places in the solution where currency.Format() is used.  
That method could maybe look something like this:

```auto
    private string NewFormatting(decimal price, Globalization.Currency currency)
        {
            if (price < 100)
            {
                var newCurrency = new Globalization.Currency("C2");
                newCurrency.ExchangeRate = currency.ExchangeRate;
                newCurrency.TextFormat = "C2";
                newCurrency.Symbol = currency.Symbol;
                newCurrency.SymbolPosition = currency.SymbolPosition;
                return newCurrency.Format(price, true, CultureInfo.CurrentUICulture);
            }
            return currency.Format(price, true, CultureInfo.CurrentUICulture);
        }

```

Thank you!

Litium version: _[8.8.0]_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [July 13, 2023, 11:25am UTC](https://forum.litium.com/t/implementing-two-currency-formatting-on-product-prices/2982/2 "2023-07-13T11:25:20Z")

</div>

Closed on July 13, 2023, 11:25am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
