fix(reports): render renewal-letter premium lines as booleans
`r.netPremium` / `r.total` are strings, so an empty-string value leaked ""` into the JSX instead of rendering nothing. Wrap in Boolean() so the guard is a real conditional. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -595,10 +595,10 @@ function LetterLayout({ result }: { result: ReportRunResult }) {
|
||||
</div>
|
||||
|
||||
<div className="renewal-letter-premium">
|
||||
{r.netPremium && (
|
||||
{Boolean(r.netPremium) && (
|
||||
<span>Prima neta: {formatCell(r.netPremium, "money")}</span>
|
||||
)}
|
||||
{r.total && (
|
||||
{Boolean(r.total) && (
|
||||
<span className="renewal-letter-total">
|
||||
Total: {formatCell(r.total, "money")} {String(r.currency ?? "")}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user