namespace MMDAL.DTO.VendorComparison { // Type=0 ("Summary") response row — one per unique {ItemId, SkuId, UomId, Quantity, Remarks}. // GB4 never ran a separate SQL query for this: MMHeadBLL.GetVendorComparison groups the same // Detail rows in-memory and takes the first of each group. GB5 does the same (see // VendorComparisonBLL.GetVendorComparison) rather than duplicating the query. public class VendorComparisonSummaryDTO { public int ItemSlNo { get; set; } public int ItemId { get; set; } public string ItemCode { get; set; } = ""; public string ItemName { get; set; } = ""; public int SkuId { get; set; } public string SkuCode { get; set; } = ""; public string SkuName { get; set; } = ""; public decimal? Quantity { get; set; } public int UomId { get; set; } public string? UomCode { get; set; } public string? UomName { get; set; } public string? Remarks { get; set; } // Top-4-by-OverallRank vendor comparison, per explicit design confirmation (GB4 never // implemented these — no source SQL/DTO field existed there at all). V1 = OverallRank 1 // (best), V2 = rank 2, etc.; null when this item has fewer than that many vendors. // Value shown depends on the caller's MetricType (see VendorComparisonBLL): // 0=Rate, 1=Cost(NetCost), 2=DeliveryRank, 3=QualityRank, 4=OverallRank. // Grade (5) is intentionally unsupported — no confirmed per-vendor grade source exists. public decimal? V1 { get; set; } public decimal? V2 { get; set; } public decimal? V3 { get; set; } public decimal? V4 { get; set; } // Which of V1-V4 has the best value for the active metric — "lower wins" for // Rate/Cost/DeliveryRank/QualityRank/OverallRank (all of them, since ranks are // already "lower = better" and Rate/Cost are cheaper-is-better). Slot label // ("V1".."V4"), not the vendor's own PartyCode — matches the UI's column labels. public string? BestFit { get; set; } // How many vendors are actually configured in MITEMPARTY for this item/sku (not capped // at 4, unlike V1-V4). Disambiguates the two reasons V1-V4 can all be null: VendorCount=0 // means no vendor is configured at all; VendorCount>0 with V1-V4 still null means vendors // exist but none have a value for the currently-selected MetricType (e.g. no Rate entered // yet) — the client can't tell those apart from V1-V4 alone. public int VendorCount { get; set; } } }