feat: rename Memoria Cedola and add natixis support to ExpiredAnagraficaSectionRenderer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-26 12:52:48 +01:00
parent 716f191fc5
commit 7a3a8114bd

View File

@@ -33,7 +33,7 @@ public class ExpiredAnagraficaSectionRenderer : IPdfSectionRenderer
float y = 0f; float y = 0f;
// ── TITOLO ──────────────────────────────────────────────────── // ── TITOLO ────────────────────────────────────────────────────
y = DrawTitle(g, info, PageW, y); y = DrawTitle(g, info, PageW, y, data.ShowNatixis);
// ── SEZIONE A: CARATTERISTICHE PRODOTTO ─────────────────────── // ── SEZIONE A: CARATTERISTICHE PRODOTTO ───────────────────────
y = DrawSectionLabel(g, "Caratteristiche Prodotto", y); y = DrawSectionLabel(g, "Caratteristiche Prodotto", y);
@@ -69,7 +69,7 @@ public class ExpiredAnagraficaSectionRenderer : IPdfSectionRenderer
// TITOLO — Solo Tipologia box (niente Data/Bid/Ask) // TITOLO — Solo Tipologia box (niente Data/Bid/Ask)
// ═══════════════════════════════════════════════════════════════ // ═══════════════════════════════════════════════════════════════
private float DrawTitle(PdfGraphics g, CertificateInfo info, float w, float y) private float DrawTitle(PdfGraphics g, CertificateInfo info, float w, float y, bool showNatixis)
{ {
g.DrawString($"Scheda Prodotto {info.Isin}", g.DrawString($"Scheda Prodotto {info.Isin}",
PdfTheme.SectionTitleFont, PdfTheme.SectionTitleFont,
@@ -83,10 +83,11 @@ public class ExpiredAnagraficaSectionRenderer : IPdfSectionRenderer
// Solo box Tipologia, niente Data/Bid/Ask // Solo box Tipologia, niente Data/Bid/Ask
const float boxH = 28f; const float boxH = 28f;
if (!string.IsNullOrEmpty(info.Categoria)) string tipologia = showNatixis ? info.Nome : info.Categoria;
if (!string.IsNullOrEmpty(tipologia))
{ {
DrawInfoBox(g, 0, y, w, boxH, DrawInfoBox(g, 0, y, w, boxH,
"TIPOLOGIA", info.Categoria, "TIPOLOGIA", tipologia,
PdfTheme.BoxLightBlueBgBrush, PdfTheme.AccentBlueBrush, PdfTheme.BoxLightBlueBgBrush, PdfTheme.AccentBlueBrush,
PdfTheme.AccentBlueBrush, PdfTheme.AccentBlueDarkBrush, PdfTheme.AccentBlueBrush, PdfTheme.AccentBlueDarkBrush,
PdfTheme.Bold); PdfTheme.Bold);
@@ -208,7 +209,7 @@ public class ExpiredAnagraficaSectionRenderer : IPdfSectionRenderer
("Importo Cedola (p.a.)", info.NominalAnnualYield), ("Importo Cedola (p.a.)", info.NominalAnnualYield),
("Frequenza Cedola", info.FrequenzaCedole), ("Frequenza Cedola", info.FrequenzaCedole),
("Valore Nominale", info.NominalValue?.ToString("N0") ?? string.Empty), ("Valore Nominale", info.NominalValue?.ToString("N0") ?? string.Empty),
("Memoria Cedola", info.Memory), ("Memoria", info.Memory),
("Tipo Barriera", info.BarrierType), ("Tipo Barriera", info.BarrierType),
("Barriera Capitale", info.LivelloBarriera), ("Barriera Capitale", info.LivelloBarriera),
("Rimborso Capitale", info.CapitalValue), ("Rimborso Capitale", info.CapitalValue),