Add Unit Price column to quote PDF

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-06 21:41:44 -04:00
parent 90f93b6e2f
commit 12f784f34c
@@ -640,12 +640,13 @@ public class PdfService : IPdfService
{
column.Item().PaddingTop(10).Table(table =>
{
// Define columns: Description, Color, Qty, Total
// Define columns: Description, Color, Qty, Unit Price, Total
table.ColumnsDefinition(columns =>
{
columns.RelativeColumn(4); // Description
columns.RelativeColumn(2); // Color
columns.ConstantColumn(40); // Qty
columns.ConstantColumn(80); // Unit Price
columns.ConstantColumn(80); // Total
});
@@ -655,6 +656,7 @@ public class PdfService : IPdfService
header.Cell().Background(accentColor).Padding(5).Text("Description").FontSize(9).Bold().FontColor(Colors.White);
header.Cell().Background(accentColor).Padding(5).Text("Color").FontSize(9).Bold().FontColor(Colors.White);
header.Cell().Background(accentColor).Padding(5).Text("Qty").FontSize(9).Bold().FontColor(Colors.White);
header.Cell().Background(accentColor).Padding(5).AlignRight().Text("Unit Price").FontSize(9).Bold().FontColor(Colors.White);
header.Cell().Background(accentColor).Padding(5).AlignRight().Text("Total").FontSize(9).Bold().FontColor(Colors.White);
});
@@ -757,6 +759,9 @@ public class PdfService : IPdfService
// Quantity (centered)
table.Cell().Background(bgColor).Padding(5).AlignCenter().Text(item.Quantity.ToString()).FontSize(9);
// Unit Price (right-aligned)
table.Cell().Background(bgColor).Padding(5).AlignRight().Text($"${item.UnitPrice:N2}").FontSize(9);
// Total (right-aligned, bold)
table.Cell().Background(bgColor).Padding(5).AlignRight().Text($"${item.TotalPrice:N2}").FontSize(9).Bold();