namespace MMDAL.DTO.StockReservation; public class ReservationAvailabilityDTO { public int ItemId { get; set; } public int? SKUId { get; set; } public string ItemCode { get; set; } = string.Empty; public string ItemName { get; set; } = string.Empty; // Stock availability public int? StoreId { get; set; } public string? StoreName { get; set; } public decimal TotalQuantity { get; set; } public decimal ReservedQuantity { get; set; } public decimal AvailableQuantity { get; set; } // TotalQuantity - ReservedQuantity // Pipeline availability (document source) public decimal PipelineTotalQuantity { get; set; } public decimal PipelineReservedQty { get; set; } public decimal PipelineAvailableQty { get; set; } // Combined public decimal TotalAvailable => AvailableQuantity + PipelineAvailableQty; } public class StoreAvailabilityDTO { public int StoreId { get; set; } public string StoreCode { get; set; } = string.Empty; public string StoreName { get; set; } = string.Empty; public decimal TotalQuantity { get; set; } public decimal ReservedQuantity { get; set; } public decimal AvailableQuantity { get; set; } } public class PipelineAvailabilityDTO { public int DocumentHeaderId { get; set; } public string DocumentNumber { get; set; } = string.Empty; public string? SupplierName { get; set; } public DateTime? ExpectedDate { get; set; } public decimal OrderedQuantity { get; set; } public decimal AlreadyReserved { get; set; } public decimal AvailableQuantity { get; set; } }