diff --git a/CertReports.Syncfusion/Models/CertificateModels.cs b/CertReports.Syncfusion/Models/CertificateModels.cs index 7613048..2ac2ec8 100644 --- a/CertReports.Syncfusion/Models/CertificateModels.cs +++ b/CertReports.Syncfusion/Models/CertificateModels.cs @@ -73,6 +73,8 @@ public class CertificateInfo public string Leva { get; set; } = string.Empty; public string FattoreAirbag { get; set; } = string.Empty; public string TriggerOneStar { get; set; } = string.Empty; + public string RendimentoPotenziale { get; set; } = string.Empty; + public int CategoryID { get; set; } public string Note { get; set; } = string.Empty; // Stato quotazione (da SP rpt_Master_CFT_ISIN) diff --git a/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs b/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs index eb3d6d4..d8bbf46 100644 --- a/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs +++ b/CertReports.Syncfusion/Services/Implementations/AnagraficaSectionRenderer.cs @@ -325,21 +325,23 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer ("Barriera Capitale", info.LivelloBarriera ?? "-"), ("Tipo Barriera", info.BarrierType ?? "-"), ("Tipo Basket", info.BasketType ?? "-"), + ("Direzione", string.IsNullOrWhiteSpace(info.Direzione) ? "-" : info.Direzione), ("Leva", string.IsNullOrWhiteSpace(info.Leva) ? "—" : info.Leva), ("Memoria", string.IsNullOrWhiteSpace(info.Memory) ? "—" : info.Memory), }; var rightItems = new (string Label, string Value)[] { - ("Rend. Capitale a Scadenza", info.CapitalReturnAtMaturity ?? "-"), - ("Tasso Rendimento Interno", info.IRR ?? "-"), - ("Protezione Capitale", info.BufferKProt ?? "-"), - ("Protezione Cedola", info.BufferCPNProt ?? "-"), - ("Valore Richiamo Anticipato", info.AutocallValue ?? "-"), - ("Distanza Richiamo Anticipato", info.TriggerAutocallDistance ?? "-"), + ("Rend. Capitale a Scadenza", (info.CategoryID == 1 || info.CategoryID == 4) ? "" : (info.CapitalReturnAtMaturity ?? "-")), + ("Rend. Potenziale a Scadenza", string.IsNullOrWhiteSpace(info.RendimentoPotenziale) ? "-" : info.RendimentoPotenziale), + ("Tasso Rendimento Interno", info.IRR ?? "-"), + ("Protezione Capitale", info.BufferKProt ?? "-"), + ("Protezione Cedola", info.BufferCPNProt ?? "-"), + ("Valore Richiamo Anticipato", info.AutocallValue ?? "-"), + ("Distanza Richiamo Anticipato", info.TriggerAutocallDistance ?? "-"), ("Rendimento Richiamo Anticipato", info.AutocallReturn ?? "-"), - ("Fattore Airbag", string.IsNullOrWhiteSpace(info.FattoreAirbag) ? "—" : info.FattoreAirbag), - ("Livello OneStar", string.IsNullOrWhiteSpace(info.TriggerOneStar) ? "—" : info.TriggerOneStar), + ("Fattore Airbag", string.IsNullOrWhiteSpace(info.FattoreAirbag) ? "—" : info.FattoreAirbag), + ("Livello OneStar", string.IsNullOrWhiteSpace(info.TriggerOneStar) ? "—" : info.TriggerOneStar), }; float leftY = DrawKVList(g, leftItems, 0, ColW, y); diff --git a/CertReports.Syncfusion/Services/Implementations/CertificateDataService.cs b/CertReports.Syncfusion/Services/Implementations/CertificateDataService.cs index 247b523..ee5b994 100644 --- a/CertReports.Syncfusion/Services/Implementations/CertificateDataService.cs +++ b/CertReports.Syncfusion/Services/Implementations/CertificateDataService.cs @@ -93,6 +93,8 @@ public class CertificateDataService : ICertificateDataService info.Leva = r.GetStringSafe("Leva"); info.FattoreAirbag = r.GetStringSafe("FattoreAirbag"); info.TriggerOneStar = r.GetStringSafe("TriggerOneStar"); + info.RendimentoPotenziale = r.GetStringSafe("RendimentoPotenziale"); + info.CategoryID = r.GetSafe("CategoryID"); info.PrezzoEmissione = r.GetNullableDecimal("PrezzoEmissione"); info.CpnInMemoria = r.GetNullableDecimal("CpnInMemoria"); info.CpnDaPagare = r.GetNullableDecimal("CpnDaPagare");