feat: add Memoria field to Analisi and natixis support to AnagraficaSectionRenderer

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

View File

@@ -34,7 +34,7 @@ public class AnagraficaSectionRenderer : 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);
@@ -71,7 +71,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
// TITOLO centrato + riga box informativi (Tipologia/Data/Bid/Ask) // TITOLO centrato + riga box informativi (Tipologia/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)
{ {
// ── Titolo centrato ────────────────────────────────────────── // ── Titolo centrato ──────────────────────────────────────────
g.DrawString($"Scheda Prodotto {info.Isin}", g.DrawString($"Scheda Prodotto {info.Isin}",
@@ -92,7 +92,8 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
const float bidW = 70f; const float bidW = 70f;
const float askW = 70f; const float askW = 70f;
bool showTip = !string.IsNullOrEmpty(info.Categoria); string tipologia = showNatixis ? info.Nome : info.Categoria;
bool showTip = !string.IsNullOrEmpty(tipologia);
bool showData = !string.IsNullOrEmpty(info.LastPriceDate); bool showData = !string.IsNullOrEmpty(info.LastPriceDate);
bool showBidAsk = !string.IsNullOrEmpty(info.Bid) && !string.IsNullOrEmpty(info.Ask); bool showBidAsk = !string.IsNullOrEmpty(info.Bid) && !string.IsNullOrEmpty(info.Ask);
@@ -107,7 +108,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
if (showTip) if (showTip)
{ {
DrawInfoBox(g, xCursor, y, tipW, boxH, DrawInfoBox(g, xCursor, y, tipW, 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);
@@ -325,6 +326,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
("Tipo Barriera", info.BarrierType ?? "-"), ("Tipo Barriera", info.BarrierType ?? "-"),
("Tipo Basket", info.BasketType ?? "-"), ("Tipo Basket", info.BasketType ?? "-"),
("Leva", string.IsNullOrWhiteSpace(info.Leva) ? "—" : info.Leva), ("Leva", string.IsNullOrWhiteSpace(info.Leva) ? "—" : info.Leva),
("Memoria", string.IsNullOrWhiteSpace(info.Memory) ? "—" : info.Memory),
}; };
var rightItems = new (string Label, string Value)[] var rightItems = new (string Label, string Value)[]