@using gehGassi.Domain.Shop @using Microsoft.AspNetCore.Mvc.Localization @using gehGassi.Core.Services @using gehGassi.Web.Models @using System.Globalization @using gehGassi.Web.Helper @using Microsoft.Extensions.Localization @model gehGassi.Web.Models.OrderVm @inject IViewLocalizer Localizer @inject ICountryService countryService @{ IStringLocalizer annotationsLocalizer = ViewBag.AnnotationsLocalizer; Layout = ""; CreditNote creditNote = ViewBag.CreditNote; OrderAddressVm deliveryAddress = Model.BillingAddress; if (Model.DeliveryAddressIsBilling) { deliveryAddress = Model.DeliveryAddress; } ViewData["Title"] = Localizer["Common_CreditNote"].Value; int itemCounter = 0; string itemSpecialInfo = string.Empty; string customerNumber = ViewBag.CustomerNumber ?? ""; } gehgassi @Localizer["Common_CreditNote"]
gehgassi GmbH, c/o frebels, Judengasse 12/2, 5020 Salzburg

@if (!string.IsNullOrWhiteSpace(Model.BillingAddress.Company)) {
@Model.BillingAddress.Company
@Model.BillingAddress.FirstName @Model.BillingAddress.LastName
} else {
@Model.BillingAddress.FirstName @Model.BillingAddress.LastName
}
@Model.BillingAddress.AddressLine1
@Model.BillingAddress.AddressLine2
@Model.BillingAddress.Zip @Model.BillingAddress.City
@countryService.GetCountry(Model.BillingAddress.CountryCode).Name
@if (!string.IsNullOrWhiteSpace(Model.BillingAddress.Vat)) {
@Model.BillingAddress.Vat
}
@Localizer["Custormer_Number"]: @customerNumber
@Localizer["Invoice_Number"]: @creditNote.Number
@Localizer["Invoice_OrderNumber"]: @Model.Number
@Localizer["Invoice_PaymentType"]: @Model.PaymentType.GetDisplayName(annotationsLocalizer)
@Localizer["Invoice_PaymentStatus"]: @Model.PaymentStatus.GetDisplayName(annotationsLocalizer)

@Localizer["Invoice_CreditNote"]

@string.Format(Localizer["Invoice_CreditNote_Text"].Value, creditNote.InvoiceNumber, Model.PaymentDate.Value.Date.ToShortDateString()):
@foreach (var item in Model.Items) { itemCounter += 1; if (!string.IsNullOrWhiteSpace(item.ProductSpecialInfo)) { itemSpecialInfo = $" ({item.ProductSpecialInfo})"; } else { itemSpecialInfo = string.Empty; } } @foreach (var tax in Model.TaxRates) { }
@Localizer["Invoice_Pos"] @Localizer["Invoice_ItemNr"] @Localizer["Invoice_Item"] @Localizer["Invoice_ItemCount"] @Localizer["Invoice_SinglePrice"] @Localizer["Invoice_TotalPrice"]
@itemCounter @item.Sku @item.Name @itemSpecialInfo @item.Quantity @item.PriceGross.ToString("n2") @item.TotalGross.ToString("n2")

@Localizer["Invoice_Subtotal"] € @Model.SubtotalGross.ToString("n2")
@Localizer["Invoice_ShipmentCost"] € @Model.ShipmentGross.ToString("n2")

@Localizer["Invoice_Total"] € @((Model.TotalGross).ToString("n2"))
@Localizer["Invoice_Tax"] @tax.Key% € @tax.Value.ToString("n2")