Merge pull request #1646 from Kukks/fix/pos-format

Fix possible view exception in pos app
This commit is contained in:
Nicolas Dorier
2020-06-10 10:27:37 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -249,7 +249,7 @@
</div>
<div class="card-footer pt-0 bg-transparent border-0">
<span class="text-muted small">@String.Format(Model.ButtonText, @item.Price.Formatted)</span>
<span class="text-muted small">@Model.ButtonText.Replace("{0}",item.Price.Formatted).Replace("{Price}",item.Price.Formatted)</span>
@if (item.Inventory.HasValue)
{

View File

@@ -55,7 +55,7 @@
{
<form method="post" asp-controller="AppsPublic" asp-action="ViewPointOfSale" asp-route-appId="@Model.AppId" asp-antiforgery="false">
<button type="submit" name="choiceKey" class="js-add-cart btn btn-primary" value="@item.Id">
@String.Format(Model.ButtonText, @item.Price.Formatted)
@Model.ButtonText.Replace("{0}",item.Price.Formatted).Replace("{Price}",item.Price.Formatted)
</button>
</form>
}