Cleaned code
This commit is contained in:
@@ -13,5 +13,5 @@ public class GetDeliveryNoteDto
|
||||
public int DelivererId { get; set; }
|
||||
public string? DelivererTransporter { get; set; }
|
||||
|
||||
public List<GetProductDeliveryDto>? Products { get; set; }
|
||||
public List<GetProductDeliveryDto>? Products { get; set; }
|
||||
}
|
||||
@@ -7,7 +7,7 @@ public class GetPriceDto
|
||||
public int ProductId { get; set; }
|
||||
public string? ProductReference { get; set; }
|
||||
public string? ProductName { get; set; }
|
||||
public decimal ProductDuration {get; set;}
|
||||
public decimal ProductDuration { get; set; }
|
||||
public int ProductCaliber { get; set; }
|
||||
public string? ProductApprovalNumber { get; set; }
|
||||
public decimal ProductWeight { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ public class UpdateProductDto
|
||||
public int Id { get; set; }
|
||||
public string? References { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public decimal Duration {get; set;}
|
||||
public decimal Duration { get; set; }
|
||||
public int Caliber { get; set; }
|
||||
public string? ApprovalNumber { get; set; }
|
||||
public decimal Weight { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ public class GetProductDto
|
||||
public int Id { get; set; }
|
||||
public string? References { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public decimal Duration {get; set;}
|
||||
public decimal Duration { get; set; }
|
||||
public int Caliber { get; set; }
|
||||
public string? ApprovalNumber { get; set; }
|
||||
public decimal Weight { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ public class GetProductDeliveryDto
|
||||
public int ProductId { get; set; }
|
||||
public string? ProductReference { get; set; }
|
||||
public string? ProductName { get; set; }
|
||||
public decimal ProductDuration {get; set;}
|
||||
public decimal ProductDuration { get; set; }
|
||||
public int ProductCaliber { get; set; }
|
||||
public string? ProductApprovalNumber { get; set; }
|
||||
public decimal ProductWeight { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ public class GetPurchaseProductDto
|
||||
public int ProductId { get; set; }
|
||||
public string? ProductReference { get; set; }
|
||||
public string? ProductName { get; set; }
|
||||
public decimal ProductDuration {get; set;}
|
||||
public decimal ProductDuration { get; set; }
|
||||
public int ProductCaliber { get; set; }
|
||||
public string? ProductApprovalNumber { get; set; }
|
||||
public decimal ProductWeight { get; set; }
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
public class GetQuotationPdfDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
}
|
||||
@@ -7,7 +7,7 @@ public class GetQuotationProductDto
|
||||
public int ProductId { get; set; }
|
||||
public string? ProductReference { get; set; }
|
||||
public string? ProductName { get; set; }
|
||||
public decimal ProductDuration {get; set;}
|
||||
public decimal ProductDuration { get; set; }
|
||||
public int ProductCaliber { get; set; }
|
||||
public string? ProductApprovalNumber { get; set; }
|
||||
public decimal ProductWeight { get; set; }
|
||||
|
||||
@@ -51,7 +51,7 @@ public class CreateDeliveryNoteEndpoint(
|
||||
DeliveryNote = newDeliveryNote,
|
||||
Quantity = productQuantity.Value,
|
||||
Product = product,
|
||||
ProductId = product.Id,
|
||||
ProductId = product.Id,
|
||||
DeliveryNoteId = newDeliveryNote.Id
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,6 @@ public class GetAllDeliveryNoteEndpoint(DeliveryNotesRepository deliveryNotesRep
|
||||
|
||||
public override async Task HandleAsync(CancellationToken ct)
|
||||
{
|
||||
await Send.OkAsync(await deliveryNotesRepository.ProjectToListAsync<GetDeliveryNoteDto>(new GetAllDeliveryNoteSpec() ,ct), ct);
|
||||
await Send.OkAsync(await deliveryNotesRepository.ProjectToListAsync<GetDeliveryNoteDto>(new GetAllDeliveryNoteSpec(), ct), ct);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,8 @@ using PyroFetes.Specifications.DeliveryNotes;
|
||||
|
||||
namespace PyroFetes.Endpoints.DeliveryNotes;
|
||||
|
||||
public class GetDeliveryNotePdfEndpoint(DeliveryNotesRepository deliveryNotesRepository, IDeliveryNotePdfService deliveryNotePdfService, SettingsRepository settingsRepository) : Endpoint<GetDeliveryNotePdfDto, byte[]>
|
||||
public class GetDeliveryNotePdfEndpoint(DeliveryNotesRepository deliveryNotesRepository, IDeliveryNotePdfService deliveryNotePdfService, SettingsRepository settingsRepository)
|
||||
: Endpoint<GetDeliveryNotePdfDto, byte[]>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
|
||||
@@ -19,7 +19,8 @@ public class AddProductoToQuotationEndpoint(
|
||||
|
||||
public override async Task HandleAsync(AddQuotationProductDto req, CancellationToken ct)
|
||||
{
|
||||
QuotationProduct? productQuotation = await quotationProductsRepository.SingleOrDefaultAsync(new GetQuotationProductByProductIdAndQuotationIdSpec(req.ProductId, req.QuotationId), ct);
|
||||
QuotationProduct? productQuotation =
|
||||
await quotationProductsRepository.SingleOrDefaultAsync(new GetQuotationProductByProductIdAndQuotationIdSpec(req.ProductId, req.QuotationId), ct);
|
||||
|
||||
if (productQuotation is not null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using PyroFetes.Specifications.Users;
|
||||
|
||||
namespace PyroFetes.Endpoints.Users;
|
||||
|
||||
public class PatchUserPasswordEndpoint(UsersRepository usersRepository,AutoMapper.IMapper mapper) : Endpoint<PatchUserPasswordDto, GetUserDto>
|
||||
public class PatchUserPasswordEndpoint(UsersRepository usersRepository, AutoMapper.IMapper mapper) : Endpoint<PatchUserPasswordDto, GetUserDto>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ public class PatchWareHouseProductQuantityEndpoint(WarehouseProductsRepository w
|
||||
|
||||
public override async Task HandleAsync(PatchWareHouseProductQuantityDto req, CancellationToken ct)
|
||||
{
|
||||
WarehouseProduct? wareHouseProduct = await warehouseProductsRepository.FirstOrDefaultAsync(new GetWarehouseProductByProductIdSpec(req.ProductId, req.WareHouseId) , ct);
|
||||
WarehouseProduct? wareHouseProduct = await warehouseProductsRepository.FirstOrDefaultAsync(new GetWarehouseProductByProductIdSpec(req.ProductId, req.WareHouseId), ct);
|
||||
|
||||
if (wareHouseProduct is null)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DtoToEntityMappings : Profile
|
||||
.ForMember(dest => dest.Id, opt => opt.Ignore());
|
||||
|
||||
CreateMap<CreatePurchaseOrderDto, PurchaseOrder>();
|
||||
CreateMap<PatchPurchaseOrderPurchaseConditionsDto,PurchaseOrder>()
|
||||
CreateMap<PatchPurchaseOrderPurchaseConditionsDto, PurchaseOrder>()
|
||||
.ForMember(dest => dest.Id, opt => opt.Ignore());
|
||||
|
||||
CreateMap<CreatePurchaseProductDto, PurchaseProduct>();
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Brand
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public Product? Product { get; set; }
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class City
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public int ZipCode { get; set; }
|
||||
|
||||
public List<Show>? Shows { get; set; }
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Classification
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Color
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<ProductColor>? ProductColors { get; set; }
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Communication
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Calling { get; set; }
|
||||
[Required, MaxLength(100)] public string? Email { get; set; }
|
||||
[Required, MaxLength(300)] public string? Meeting { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class CustomerType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Customer>? Customers { get; set; }
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Effect
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Label { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Label { get; set; }
|
||||
|
||||
public List<ProductEffect>? ProductEffects { get; set; }
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class HistoryOfApproval
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateOnly DeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpirationDate { get; set; }
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Material
|
||||
{
|
||||
[Key] public int Id {get; set;}
|
||||
[Required, MaxLength(100)] public string? Name {get; set;}
|
||||
[Required] public int Quantity {get; set;}
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
[Required] public int WarehouseId {get; set;}
|
||||
public Warehouse? Warehouse {get; set;}
|
||||
[Required] public int WarehouseId { get; set; }
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
|
||||
public List<ShowMaterial>? ShowMaterials {get; set;}
|
||||
public List<MaterialWarehouse>? MaterialWarehouses {get; set;}
|
||||
public List<ShowMaterial>? ShowMaterials { get; set; }
|
||||
public List<MaterialWarehouse>? MaterialWarehouses { get; set; }
|
||||
}
|
||||
@@ -4,16 +4,16 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Movement
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateTime Date { get; set; }
|
||||
[Required] public DateTime Start {get; set;}
|
||||
[Required] public DateTime Arrival {get; set;}
|
||||
[Required] public int Quantity {get; set;}
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateTime Date { get; set; }
|
||||
[Required] public DateTime Start { get; set; }
|
||||
[Required] public DateTime Arrival { get; set; }
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
|
||||
public int? SourceWarehouseId {get; set;}
|
||||
public Warehouse? SourceWarehouse {get; set;}
|
||||
public int? DestinationWarehouseId {get; set;}
|
||||
public Warehouse? DestinationWarehouse {get; set;}
|
||||
public int? SourceWarehouseId { get; set; }
|
||||
public Warehouse? SourceWarehouse { get; set; }
|
||||
public int? DestinationWarehouseId { get; set; }
|
||||
public Warehouse? DestinationWarehouse { get; set; }
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace PyroFetes.Models
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(20)] public string? Reference { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public decimal Duration {get; set;}
|
||||
[Required] public decimal Duration { get; set; }
|
||||
[Required] public int Caliber { get; set; }
|
||||
[Required, MaxLength(100)] public string? ApprovalNumber { get; set; }
|
||||
[Required] public decimal Weight { get; set; }
|
||||
@@ -23,8 +23,8 @@ namespace PyroFetes.Models
|
||||
[Required] public int ProductCategoryId { get; set; }
|
||||
public ProductCategory? ProductCategory { get; set; }
|
||||
|
||||
[Required] public int MovementId {get; set;}
|
||||
public Movement? Movement {get; set;}
|
||||
[Required] public int MovementId { get; set; }
|
||||
public Movement? Movement { get; set; }
|
||||
|
||||
public List<ProductDelivery>? ProductDeliveries { get; set; }
|
||||
public List<Brand>? Brands { get; set; }
|
||||
@@ -35,7 +35,5 @@ namespace PyroFetes.Models
|
||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class ProductCategory
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
}
|
||||
@@ -11,5 +11,4 @@ public class ProductEffect
|
||||
|
||||
public Effect? Effect { get; set; }
|
||||
[Required] public int EffectId { get; set; }
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class ProviderType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<ServiceProvider>? ServiceProviders { get; set; }
|
||||
|
||||
@@ -11,5 +11,4 @@ public class ShowMaterial
|
||||
|
||||
public Material? Material { get; set; }
|
||||
[Required] public int MaterialId { get; set; }
|
||||
|
||||
}
|
||||
@@ -5,5 +5,4 @@ namespace PyroFetes.Models;
|
||||
public class ShowServiceProvider
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ public class Supplier
|
||||
[Required, MaxLength(100)] public string? Email { get; set; }
|
||||
[Required, MaxLength(30)] public string? Phone { get; set; }
|
||||
[Required, MaxLength(100)] public string? Address { get; set; }
|
||||
[Required,Length(5,5)] public string? ZipCode { get; set; }
|
||||
[Required, Length(5, 5)] public string? ZipCode { get; set; }
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
[Required] public int DeliveryDelay { get; set; }
|
||||
|
||||
|
||||
@@ -4,18 +4,18 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Warehouse
|
||||
{
|
||||
[Key] public int Id {get; set;}
|
||||
[Required, MaxLength(100)] public string? Name {get; set;}
|
||||
[Required] public int MaxWeight {get; set;}
|
||||
[Required] public int Current {get; set;}
|
||||
[Required] public int MinWeight {get; set;}
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public int MaxWeight { get; set; }
|
||||
[Required] public int Current { get; set; }
|
||||
[Required] public int MinWeight { get; set; }
|
||||
[Required, MaxLength(100)] public string? Address { get; set; }
|
||||
[Required, Length(5,5)] public string? ZipCode { get; set; }
|
||||
[Required, Length(5, 5)] public string? ZipCode { get; set; }
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
|
||||
public List<MaterialWarehouse>? MaterialWarehouses {get; set;}
|
||||
public List<MaterialWarehouse>? MaterialWarehouses { get; set; }
|
||||
|
||||
public List<Movement>? MovementsSource { get; set; }
|
||||
public List<Movement>? MovementsDestination { get; set; }
|
||||
|
||||
@@ -20,10 +20,7 @@ builder.Services
|
||||
.AddAuthenticationJwtBearer(s => s.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong")
|
||||
.AddAuthorization()
|
||||
.AddFastEndpoints()
|
||||
.SwaggerDocument(options =>
|
||||
{
|
||||
options.ShortSchemaNames = true;
|
||||
})
|
||||
.SwaggerDocument(options => { options.ShortSchemaNames = true; })
|
||||
.AddCors(options =>
|
||||
{
|
||||
options.AddDefaultPolicy(policyBuilder =>
|
||||
|
||||
@@ -78,10 +78,10 @@ public class DeliveryNotePdfService : IDeliveryNotePdfService
|
||||
{
|
||||
table.ColumnsDefinition(columns =>
|
||||
{
|
||||
columns.RelativeColumn(4); // Produit
|
||||
columns.RelativeColumn(2); // Qté
|
||||
columns.RelativeColumn(2); // PU
|
||||
columns.RelativeColumn(2); // Total
|
||||
columns.RelativeColumn(4); // Produit
|
||||
columns.RelativeColumn(2); // Qté
|
||||
columns.RelativeColumn(2); // PU
|
||||
columns.RelativeColumn(2); // Total
|
||||
});
|
||||
|
||||
// En-têtes
|
||||
@@ -101,7 +101,7 @@ public class DeliveryNotePdfService : IDeliveryNotePdfService
|
||||
table.Cell().Element(CellBody).AlignRight().Text($"{l.Quantity * l.Quantity:n2} €");
|
||||
|
||||
totalQuantity += l.Quantity;
|
||||
total += l.Quantity * l.Quantity;
|
||||
total += l.Quantity * l.Quantity;
|
||||
}
|
||||
|
||||
IContainer CellHeader(IContainer c) =>
|
||||
@@ -121,10 +121,7 @@ public class DeliveryNotePdfService : IDeliveryNotePdfService
|
||||
});
|
||||
|
||||
// Signature en bas à droite
|
||||
page.Footer().AlignRight().Column(col =>
|
||||
{
|
||||
col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea);
|
||||
});
|
||||
page.Footer().AlignRight().Column(col => { col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea); });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -75,10 +75,10 @@ public class PurchaseOrderPdfService : IPurchaseOrderPdfService
|
||||
{
|
||||
table.ColumnsDefinition(columns =>
|
||||
{
|
||||
columns.RelativeColumn(4); // Produit
|
||||
columns.RelativeColumn(1); // Qté
|
||||
columns.RelativeColumn(2); // PU
|
||||
columns.RelativeColumn(2); // Total
|
||||
columns.RelativeColumn(4); // Produit
|
||||
columns.RelativeColumn(1); // Qté
|
||||
columns.RelativeColumn(2); // PU
|
||||
columns.RelativeColumn(2); // Total
|
||||
});
|
||||
|
||||
// En-têtes
|
||||
@@ -102,7 +102,7 @@ public class PurchaseOrderPdfService : IPurchaseOrderPdfService
|
||||
table.Cell().Element(CellBody).AlignRight().Text($"{l.Quantity * price:n2} €");
|
||||
|
||||
totalQuantity += l.Quantity;
|
||||
total += l.Quantity * price;
|
||||
total += l.Quantity * price;
|
||||
}
|
||||
|
||||
IContainer CellHeader(IContainer c) =>
|
||||
@@ -132,16 +132,13 @@ public class PurchaseOrderPdfService : IPurchaseOrderPdfService
|
||||
right.Item().AlignRight().Text($"Total: {totalQuantity:n2} produits");
|
||||
right.Item().AlignRight().Text($"Total HT: {total:n2} €");
|
||||
right.Item().AlignRight().Text("Taxe: 20 %");
|
||||
right.Item().AlignRight().Text($"Total TTC: {(total * 1,2):n2} €");
|
||||
right.Item().AlignRight().Text($"Total TTC: {(total * 1, 2):n2} €");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Signature en bas à droite
|
||||
page.Footer().AlignRight().Column(col =>
|
||||
{
|
||||
col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea);
|
||||
});
|
||||
page.Footer().AlignRight().Column(col => { col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea); });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -74,10 +74,10 @@ public class QuotationPdfService : IQuotationPdfService
|
||||
{
|
||||
table.ColumnsDefinition(columns =>
|
||||
{
|
||||
columns.RelativeColumn(10); // Produit
|
||||
columns.RelativeColumn(2); // Qté
|
||||
columns.RelativeColumn(3); // PU
|
||||
columns.RelativeColumn(3); // Total
|
||||
columns.RelativeColumn(10); // Produit
|
||||
columns.RelativeColumn(2); // Qté
|
||||
columns.RelativeColumn(3); // PU
|
||||
columns.RelativeColumn(3); // Total
|
||||
});
|
||||
|
||||
// En-têtes
|
||||
@@ -96,7 +96,7 @@ public class QuotationPdfService : IQuotationPdfService
|
||||
table.Cell().Element(CellBody).AlignRight().Text($"{l.Quantity:n2} €");
|
||||
table.Cell().Element(CellBody).AlignRight().Text($"{l.Quantity * l.Quantity:n2} €");
|
||||
|
||||
total = total + l.Quantity * l.Quantity;
|
||||
total = total + l.Quantity * l.Quantity;
|
||||
}
|
||||
|
||||
IContainer CellHeader(IContainer c) =>
|
||||
@@ -131,10 +131,7 @@ public class QuotationPdfService : IQuotationPdfService
|
||||
});
|
||||
|
||||
// Signature en bas à droite
|
||||
page.Footer().AlignRight().Column(col =>
|
||||
{
|
||||
col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea);
|
||||
});
|
||||
page.Footer().AlignRight().Column(col => { col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea); });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@ public class GetPurchaseOrderByIdWithProductsSpec : SingleResultSpecification<Pu
|
||||
.Where(x => x.Id == purchaseOrderId)
|
||||
.Include(x => x.PurchaseProducts!)
|
||||
.ThenInclude(p => p.Product)
|
||||
.ThenInclude(p=> p!.Prices);
|
||||
.ThenInclude(p => p!.Prices);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ namespace PyroFetes.Specifications.PurchaseProducts;
|
||||
|
||||
public sealed class GetPurchaseProductByProductIdAndPurchaseOrderIdSpec : SingleResultSpecification<PurchaseProduct>
|
||||
{
|
||||
public GetPurchaseProductByProductIdAndPurchaseOrderIdSpec(int productId, int purchaseOrderId)
|
||||
public GetPurchaseProductByProductIdAndPurchaseOrderIdSpec(int productId, int purchaseOrderId)
|
||||
{
|
||||
Query
|
||||
.Where(p => p.ProductId == productId && p.PurchaseOrderId == purchaseOrderId);
|
||||
|
||||
@@ -8,6 +8,6 @@ public sealed class GetUserByNameSpec : SingleResultSpecification<User>
|
||||
public GetUserByNameSpec(string userName)
|
||||
{
|
||||
Query
|
||||
.Where(x=> x.Name == userName);
|
||||
.Where(x => x.Name == userName);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,5 @@ public sealed class GetProductTotalQuantitySpec : Specification<WarehouseProduct
|
||||
{
|
||||
Query
|
||||
.Where(wp => wp.ProductId == productId);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user