fix: fallback to Categoria when natixis=true but Nome is empty

This commit is contained in:
2026-03-26 14:06:25 +01:00
parent 86bb25ef1e
commit a3f6d6000c
2 changed files with 2 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
const float bidW = 70f;
const float askW = 70f;
string tipologia = showNatixis ? info.Nome : info.Categoria;
string tipologia = showNatixis && !string.IsNullOrEmpty(info.Nome) ? 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);

View File

@@ -83,7 +83,7 @@ public class ExpiredAnagraficaSectionRenderer : IPdfSectionRenderer
// Solo box Tipologia, niente Data/Bid/Ask
const float boxH = 28f;
string tipologia = showNatixis ? info.Nome : info.Categoria;
string tipologia = showNatixis && !string.IsNullOrEmpty(info.Nome) ? info.Nome : info.Categoria;
if (!string.IsNullOrEmpty(tipologia))
{
DrawInfoBox(g, 0, y, w, boxH,