﻿@using System.Linq;
@using Nwazet.Commerce.Models;
@{
    var priceTiers = new List<PriceTier>(Model.PriceTiers);
    var discountedPriceTiers = new List<PriceTier>(Model.DiscountedPriceTiers);
}
@if (Model.PriceTiers != null && Enumerable.Count(Model.PriceTiers) > 0) {
    <table class="tiered-prices">
        <tr>
            <td>@T("Quantity")</td>
            <td>@T("Price")</td>
        </tr>
        @for (var i = 0; i < priceTiers.Count(); i++ ) {
            <tr>
                <td>@priceTiers[i].Quantity</td>
                <td>
                    @if (priceTiers[i].Price != discountedPriceTiers[i].Price) {
                        <span class="inactive-price" style="text-decoration:line-through" title="@T("Was {0}", priceTiers[i].Price.ToString("c"))">@priceTiers[i].Price.ToString("c")</span>
                        <span class="discounted-price" title="@T("Now {0}", discountedPriceTiers[i].Price.ToString("c"))">@discountedPriceTiers[i].Price.ToString("c")</span>
                    }
                    else {
                        <span class="regular-price">@priceTiers[i].Price.ToString("c")</span>
                    }

                </td>
            </tr>
        }
    </table>
}
﻿@using System.Linq;
@using Nwazet.Commerce.Models;
@{
    var priceTiers = new List<PriceTier>(Model.PriceTiers);
    var discountedPriceTiers = new List<PriceTier>(Model.DiscountedPriceTiers);
}
@if (Model.PriceTiers != null && Enumerable.Count(Model.PriceTiers) > 0) {
    <table class="tiered-prices">
        <tr>
            <td>@T("Quantity")</td>
            <td>@T("Price")</td>
        </tr>
        @for (var i = 0; i < priceTiers.Count(); i++ ) {
            <tr>
                <td>@priceTiers[i].Quantity</td>
                <td>
                    @if (priceTiers[i].Price != discountedPriceTiers[i].Price) {
                        <span class="inactive-price" style="text-decoration:line-through" title="@T("Was {0:c}", priceTiers[i].Price)">@priceTiers[i].Price.ToString("c")</span>
                        <span class="discounted-price" title="@T("Now {0:c}", discountedPriceTiers[i].Price)">@discountedPriceTiers[i].Price.ToString("c")</span>
                    }
                    else {
                        <span class="regular-price">@priceTiers[i].Price.ToString("c")</span>
                    }

                </td>
            </tr>
        }
    </table>
}
Use {0:c} rather than ToString("c") where possible.
Use {0:c} rather than ToString("c") where possible.

--HG--
branch : currency_string_format
