Cleaned code

This commit is contained in:
2026-05-24 17:24:44 +01:00
parent 656100d15e
commit 1434a5d77a
88 changed files with 197 additions and 213 deletions
@@ -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
@@ -92,16 +92,16 @@ public class DeliveryNotePdfService : IDeliveryNotePdfService
header.Cell().Element(CellHeader).AlignRight().Text("PU");
header.Cell().Element(CellHeader).AlignRight().Text("Total");
});
foreach (ProductDelivery l in lignes)
{
table.Cell().Element(CellBody).Text(l.Product?.Name);
table.Cell().Element(CellBody).AlignRight().Text(l.Quantity.ToString());
table.Cell().Element(CellBody).AlignRight().Text($"{l.Quantity:n2} €");
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,13 +121,10 @@ 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); });
});
});
return document.GeneratePdf();
}
}
}