Fix Company Settings save, invoice PAID stamp, and purge script
- Company Settings: switch save button from type=submit to type=button to bypass HTML5 form validation blocking the submit event; replace AutoMapper Map() with explicit property assignment so EF change tracking reliably detects mutations; fix showButtonSuccess() never re-enabling the button after a successful save - Invoice PDF: move PAID stamp into the header row as a centered middle column so it sits between the company and invoice blocks without adding height to the document - Purge script: use business-date fields instead of CreatedAt so imported records (which all share today's CreatedAt) are correctly filtered by actual transaction dates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -147,6 +147,14 @@ public class PdfService : IPdfService
|
||||
column.Item().Text(companyInfo.PrimaryContactEmail).FontSize(9).FontColor(Colors.Grey.Darken1);
|
||||
});
|
||||
|
||||
if (invoice.Status == InvoiceStatus.Paid)
|
||||
{
|
||||
row.RelativeItem().AlignCenter().AlignMiddle()
|
||||
.Border(2).BorderColor(Colors.Green.Darken1)
|
||||
.PaddingVertical(6).PaddingHorizontal(16)
|
||||
.Text("PAID").FontSize(20).Bold().FontColor(Colors.Green.Darken1).LetterSpacing(0.15f);
|
||||
}
|
||||
|
||||
row.RelativeItem().AlignRight().Column(column =>
|
||||
{
|
||||
column.Item().Text("INVOICE").FontSize(28).Bold().FontColor(accentColor);
|
||||
@@ -158,16 +166,6 @@ public class PdfService : IPdfService
|
||||
});
|
||||
});
|
||||
|
||||
if (invoice.Status == InvoiceStatus.Paid)
|
||||
{
|
||||
col.Item().PaddingVertical(6).AlignCenter().Column(badge =>
|
||||
{
|
||||
badge.Item().AlignCenter().Border(2).BorderColor(Colors.Green.Darken1)
|
||||
.PaddingVertical(4).PaddingHorizontal(24)
|
||||
.Text("PAID").FontSize(18).Bold().FontColor(Colors.Green.Darken1).LetterSpacing(0.15f);
|
||||
});
|
||||
}
|
||||
|
||||
col.Item().PaddingVertical(4).LineHorizontal(1).LineColor(accentColor);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user