@using BTCPayServer.Plugins.PointOfSale.Models @using BTCPayServer.Services @using Microsoft.AspNetCore.Mvc.TagHelpers @using Newtonsoft.Json.Linq @using BTCPayServer.Client @using BTCPayServer.Client.Models @inject DisplayFormatter DisplayFormatter @model BTCPayServer.Plugins.PointOfSale.Models.ViewPointOfSaleViewModel @functions { private string GetItemPriceFormatted(AppItem item) { if (item.PriceType == AppItemPriceType.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 == AppItemPriceType.Minimum ? $"{formatted} minimum" : formatted; } }