@using Microsoft.AspNetCore.Mvc.Localization @using gehGassi.Web.Helper @using gehGassi.Web.Models @using Microsoft.Extensions.Localization @using gehGassi.Domain.Users @using gehGassi.Core.Services @using Microsoft.Graph.Models @inject IViewLocalizer Localizer @inject ICountryService countryService @model gehGassi.Web.Models.OrderVm @{ IStringLocalizer annotationsLocalizer = ViewBag.AnnotationsLocalizer; ViewData["Title"] = Localizer["Button_Details"]; ApplicationUser applicationUser = ViewBag.ApplicationUser; OrderAddressVm deliveryAddress = Model.DeliveryAddress; if (Model.DeliveryAddressIsBilling) { deliveryAddress = Model.BillingAddress; } }
@Localizer["Order_Tab_Info"]
@Localizer["Order_Tab_Billing"]
@Localizer["Order_Tab_Delivery"]
@Localizer["Order_Tab_Products"]
@Model.Number
@Model.UniqueId

@Model.SubtotalGross.ToString("N2")
@Model.ShipmentGross.ToString("N2")
@Model.TotalGross.ToString("N2")
@if (Model.TaxRates.Any()) { foreach (var modelTaxRate in Model.TaxRates) {
€ @modelTaxRate.Value.ToString("N2")
} }
@Model.PaymentType.GetDisplayName(annotationsLocalizer)
@Model.PaymentStatus.GetDisplayName(annotationsLocalizer)
@Model.Created.ToDateTimeTimeZone(applicationUser.TimeZoneId).ToDateTime()
@Model.LastUpdate.Value.ToDateTimeTimeZone(applicationUser.TimeZoneId).ToDateTime()
@if (Model.PaymentType == PaymentTypeVm.PayPal) {
@Model.PaymentDate
@Model.PayPalOrderId
} @if (Model.PaymentType == PaymentTypeVm.Klarna) {
@Model.PaymentDate
@Model.KlarnaOrderId
@(Model.KlarnaShipmentSentDate.HasValue ? Model.KlarnaShipmentSentDate.Value.ToString() : "")
} @if (!string.IsNullOrWhiteSpace(Model.PaymentInfo)) {
@Html.Raw(Model.PaymentInfo.Replace(Environment.NewLine, "
"))
}
@Model.BillingAddress.Title
@Model.BillingAddress.FirstName
@Model.BillingAddress.LastName
@Model.BillingAddress.Company
@Model.BillingAddress.Vat

@Model.BillingAddress.AddressLine1
@Model.BillingAddress.AddressLine2
@Model.BillingAddress.Zip
@Model.BillingAddress.City
@countryService.GetState(Model.BillingAddress.CountryCode, Model.BillingAddress.State).Name
@countryService.GetCountry(Model.BillingAddress.CountryCode).Name
@deliveryAddress.Title
@deliveryAddress.FirstName
@deliveryAddress.LastName
@deliveryAddress.Company
@deliveryAddress.Vat

@deliveryAddress.AddressLine1
@deliveryAddress.AddressLine2
@deliveryAddress.Zip
@deliveryAddress.City
@countryService.GetState(deliveryAddress.CountryCode, deliveryAddress.State).Name
@countryService.GetCountry(deliveryAddress.CountryCode).Name
@foreach (var item in Model.Items) { } @if (Model.TaxRates.Any()) { foreach (var modelTaxRate in Model.TaxRates) { } }
@Localizer["Common_Order_Sku"] @Localizer["Common_Order_Name"] @Localizer["Common_Order_Quantity"] @Localizer["Common_Order_SinglePrice"] € @Localizer["Common_Order_TotalPrice"] €
@item.Sku @item.Name @if(!string.IsNullOrWhiteSpace(item.ProductSpecialInfo)){ (@item.ProductSpecialInfo)} @item.Quantity @item.PriceGross.ToString("n2") @item.TotalGross.ToString("n2")

@Localizer["Common_Order_Subtotal"] €: @Model.SubtotalGross.ToString("n2")
@Localizer["Common_Order_ShipmentPrice"] €: @Model.ShipmentGross.ToString("n2")

@Localizer["Common_Order_Total"] €: @((Model.TotalGross).ToString("n2"))
@Localizer["Cart_Tax"] @modelTaxRate.Key% €: @modelTaxRate.Value.ToString("N2")