@model Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Models.PreorderDetailModel @using FruitBank.Common.Enums @{ ViewBag.PageTitle = $"Előrendelés #{Model.PreorderId}"; Layout = "~/Plugins/Misc.FruitBankPlugin/Areas/Admin/Views/_FruitBankAdminLayout.cshtml"; var statusClass = Model.Status switch { PreorderStatus.Confirmed => "po-status-confirmed", PreorderStatus.PartiallyFulfilled => "po-status-partial", PreorderStatus.Cancelled => "po-status-cancelled", _ => "po-status-pending" }; var statusLabel = Model.Status switch { PreorderStatus.Confirmed => "Megerősítve", PreorderStatus.PartiallyFulfilled => "Részben teljesítve", PreorderStatus.Cancelled => "Törölve", _ => "Függőben" }; } @Html.AntiForgeryToken() Vissza a listához

Előrendelés #@Model.PreorderId @statusLabel

@if (Model.OrderId.HasValue) { Rendelés #@Model.OrderId } @if (Model.Status == PreorderStatus.Pending) { }
Ügyfél
@Model.CustomerEmail
Kért szállítási időpont
@Model.DateOfReceipt
Leadva
@Model.CreatedOnUtc
Utoljára frissítve
@Model.UpdatedOnUtc
@if (!string.IsNullOrWhiteSpace(Model.CustomerNote)) {
Ügyfél megjegyzése
@Model.CustomerNote
}
Tételek (@Model.Items.Count) @{ var fulfilled = Model.Items.Count(i => i.Status == PreorderItemStatus.Fulfilled); var partial = Model.Items.Count(i => i.Status == PreorderItemStatus.PartiallyFulfilled); var dropped = Model.Items.Count(i => i.Status == PreorderItemStatus.Dropped); var pending = Model.Items.Count(i => i.Status == PreorderItemStatus.Pending); } @if (fulfilled > 0) { @fulfilled teljesítve } @if (partial > 0) { @partial részben } @if (dropped > 0) { @dropped ejtve } @if (pending > 0) { @pending függőben }
@foreach (var item in Model.Items) { var rowClass = item.Status switch { PreorderItemStatus.Fulfilled => "item-fulfilled", PreorderItemStatus.PartiallyFulfilled => "item-partial", PreorderItemStatus.Dropped => "item-dropped", _ => "item-pending" }; var pct = item.RequestedQuantity > 0 ? (int)Math.Round((double)item.FulfilledQuantity / item.RequestedQuantity * 100) : 0; var barColor = pct == 100 ? "#2d7a3a" : pct > 0 ? "#f4a236" : "#dc3545"; var estimatedPrice = item.IsMeasurable ? "—" : (item.UnitPriceInclTax * item.FulfilledQuantity).ToString("N0") + " Ft"; var unitPrice = item.IsMeasurable ? "súlymérés" : item.UnitPriceInclTax.ToString("N0") + " Ft"; } @{ var totalEstimated = Model.Items .Where(i => !i.IsMeasurable && (i.Status == PreorderItemStatus.Fulfilled || i.Status == PreorderItemStatus.PartiallyFulfilled)) .Sum(i => i.UnitPriceInclTax * i.FulfilledQuantity); }
Termék Kérve Teljesítve Teljesítés Egységár Becsült ár Állapot
@item.ProductName @if (item.IsMeasurable) { ⚖️ } @item.RequestedQuantity db @item.FulfilledQuantity db
@pct%
@unitPrice @estimatedPrice @item.StatusLabel
Becsült összeg: @totalEstimated.ToString("N0") Ft
@if (Model.Status == PreorderStatus.Pending) { }