diff --git a/PyroFetes/Endpoints/Quotations/CreateQuotationEndpoint.cs b/PyroFetes/Endpoints/Quotations/CreateQuotationEndpoint.cs index f8b2f9a..4dfcda5 100644 --- a/PyroFetes/Endpoints/Quotations/CreateQuotationEndpoint.cs +++ b/PyroFetes/Endpoints/Quotations/CreateQuotationEndpoint.cs @@ -23,7 +23,6 @@ public class CreateQuotationEndpoint( public override async Task HandleAsync(CreateQuotationDto req, CancellationToken ct) { Quotation quotation = mapper.Map(req); - quotation.CustomerId = 1; // TODO: A changer await quotationsRepository.AddAsync(quotation, ct); if (req.Products != null) diff --git a/PyroFetes/Services/Pdf/QuotationPdfService.cs b/PyroFetes/Services/Pdf/QuotationPdfService.cs index 87204e7..9456932 100644 --- a/PyroFetes/Services/Pdf/QuotationPdfService.cs +++ b/PyroFetes/Services/Pdf/QuotationPdfService.cs @@ -35,7 +35,8 @@ public class QuotationPdfService : IQuotationPdfService col.Item().Text(""); col.Item().Text(""); col.Item().Text("Client").SemiBold().FontSize(12); - col.Item().Text($"{quotation.Customer}"); + col.Item().Text($"{quotation.Customer?.Note}"); + col.Item().Text($"{quotation.Customer?.CustomerType?.Label}"); }); // Logo + société à droite diff --git a/PyroFetes/Specifications/Quotations/GetQuotationByIdWithProductsSpec.cs b/PyroFetes/Specifications/Quotations/GetQuotationByIdWithProductsSpec.cs index b7f0e88..b689f14 100644 --- a/PyroFetes/Specifications/Quotations/GetQuotationByIdWithProductsSpec.cs +++ b/PyroFetes/Specifications/Quotations/GetQuotationByIdWithProductsSpec.cs @@ -11,6 +11,8 @@ public class GetQuotationByIdWithProductsSpec : SingleResultSpecification x.Id == quotationId) .Include(x => x.QuotationProducts!) .ThenInclude(x => x.Product) - .ThenInclude(x => x!.Prices); + .ThenInclude(x => x!.Prices) + .Include(x => x.Customer) + .ThenInclude(x => x!.CustomerType); } } \ No newline at end of file