From 716f191fc56207f0d8f13e1e0e72adea86c098ec Mon Sep 17 00:00:00 2001 From: SmartRootsSrl Date: Thu, 26 Mar 2026 12:48:51 +0100 Subject: [PATCH] feat: add Memoria field to Analisi and natixis support to AnagraficaSectionRenderer Co-Authored-By: Claude Sonnet 4.6 --- .../Implementations/AnagraficaSectionRenderer.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs b/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs index 9949524..bf964a8 100644 --- a/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs +++ b/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs @@ -34,7 +34,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer float y = 0f; // ── TITOLO ──────────────────────────────────────────────────── - y = DrawTitle(g, info, PageW, y); + y = DrawTitle(g, info, PageW, y, data.ShowNatixis); // ── SEZIONE A: CARATTERISTICHE PRODOTTO ─────────────────────── y = DrawSectionLabel(g, "Caratteristiche Prodotto", y); @@ -71,7 +71,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer // 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 ────────────────────────────────────────── g.DrawString($"Scheda Prodotto {info.Isin}", @@ -92,7 +92,8 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer const float bidW = 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 showBidAsk = !string.IsNullOrEmpty(info.Bid) && !string.IsNullOrEmpty(info.Ask); @@ -107,7 +108,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer if (showTip) { DrawInfoBox(g, xCursor, y, tipW, boxH, - "TIPOLOGIA", info.Categoria, + "TIPOLOGIA", tipologia, PdfTheme.BoxLightBlueBgBrush, PdfTheme.AccentBlueBrush, PdfTheme.AccentBlueBrush, PdfTheme.AccentBlueDarkBrush, PdfTheme.Bold); @@ -325,6 +326,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer ("Tipo Barriera", info.BarrierType ?? "-"), ("Tipo Basket", info.BasketType ?? "-"), ("Leva", string.IsNullOrWhiteSpace(info.Leva) ? "—" : info.Leva), + ("Memoria", string.IsNullOrWhiteSpace(info.Memory) ? "—" : info.Memory), }; var rightItems = new (string Label, string Value)[]