diff --git a/PyroFetes/DTO/Price/Response/GetPriceDto.cs b/PyroFetes/DTO/Price/Response/GetPriceDto.cs index fbd38a8..32ae092 100644 --- a/PyroFetes/DTO/Price/Response/GetPriceDto.cs +++ b/PyroFetes/DTO/Price/Response/GetPriceDto.cs @@ -15,7 +15,7 @@ public class GetPriceDto public int SupplierDeliveryDelay { get; set; } public int ProductId { get; set; } - public string? ProductReferences { get; set; } + public string? ProductReference { get; set; } public string? ProductName { get; set; } public decimal ProductDuration {get; set;} public int ProductCaliber { get; set; } diff --git a/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs index b781bd4..cdfc15e 100644 --- a/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs +++ b/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs @@ -13,6 +13,7 @@ public class GetPurchaseProductDto public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } + public decimal ProductPrice { get; set; } public int PurchaseOrderId { get; set; } public string? PurchaseOrderPurchaseConditions { get; set; } diff --git a/PyroFetes/MappingProfiles/EntityToDtoMappings.cs b/PyroFetes/MappingProfiles/EntityToDtoMappings.cs index 617891f..b1d0b85 100644 --- a/PyroFetes/MappingProfiles/EntityToDtoMappings.cs +++ b/PyroFetes/MappingProfiles/EntityToDtoMappings.cs @@ -34,7 +34,8 @@ public class EntityToDtoMappings : Profile // CreateMap(); // - // CreateMap(); + CreateMap(); + CreateMap() .ForMember(dest => dest.Products, diff --git a/PyroFetes/Specifications/Products/GetProductByIdSpec.cs b/PyroFetes/Specifications/Products/GetProductByIdSpec.cs index fb7322c..db1421f 100644 --- a/PyroFetes/Specifications/Products/GetProductByIdSpec.cs +++ b/PyroFetes/Specifications/Products/GetProductByIdSpec.cs @@ -8,6 +8,7 @@ public sealed class GetProductByIdSpec : Specification public GetProductByIdSpec(int? productId) { Query - .Where(p => p.Id == productId); + .Where(p => p.Id == productId) + .Include(p => p.Prices); } } \ No newline at end of file diff --git a/PyroFetes/Specifications/PurchaseOrders/GetPurchaseOrderByIdWithProductsSpec.cs b/PyroFetes/Specifications/PurchaseOrders/GetPurchaseOrderByIdWithProductsSpec.cs index 734738e..7bac3f8 100644 --- a/PyroFetes/Specifications/PurchaseOrders/GetPurchaseOrderByIdWithProductsSpec.cs +++ b/PyroFetes/Specifications/PurchaseOrders/GetPurchaseOrderByIdWithProductsSpec.cs @@ -10,6 +10,7 @@ public class GetPurchaseOrderByIdWithProductsSpec : Specification Query .Where(p => p.Id == purchaseOrderId) .Include(p => p.PurchaseProducts!) - .ThenInclude(pp => pp.Product); + .ThenInclude(pp => pp.Product) + .ThenInclude(pp=> pp!.Prices); } -} \ No newline at end of file +} \ No newline at end of file diff --git a/PyroFetes/Specifications/Quotations/GetQuotationByIdSpec.cs b/PyroFetes/Specifications/Quotations/GetQuotationByIdSpec.cs index 37424e9..5f1e183 100644 --- a/PyroFetes/Specifications/Quotations/GetQuotationByIdSpec.cs +++ b/PyroFetes/Specifications/Quotations/GetQuotationByIdSpec.cs @@ -8,7 +8,7 @@ public sealed class GetQuotationByIdSpec : Specification public GetQuotationByIdSpec(int quotationId) { Query - .Include(q => q.QuotationProducts) + .Include(q => q.QuotationProducts) .Where(x => x.Id == quotationId); } } \ No newline at end of file