@using BTCPayServer.Plugins.PointOfSale.Models @using BTCPayServer.Services @using Microsoft.AspNetCore.Mvc.TagHelpers @using Newtonsoft.Json.Linq @using BTCPayServer.Client @inject DisplayFormatter DisplayFormatter @model BTCPayServer.Plugins.PointOfSale.Models.ViewPointOfSaleViewModel @functions { private string GetItemPriceFormatted(ViewPointOfSaleViewModel.Item item) { if (item.PriceType == ViewPointOfSaleViewModel.ItemPriceType.Topup) return "any amount"; if (item.Price == 0) return "free"; var formatted = DisplayFormatter.Currency(item.Price ?? 0, Model.CurrencyCode, DisplayFormatter.CurrencyFormat.Symbol); return item.PriceType == ViewPointOfSaleViewModel.ItemPriceType.Minimum ? $"{formatted} minimum" : formatted; } }