feat: Seite Aufteilung – Auswahl, Kennzahlen, Tabelle, Tortendiagramm (A13-T5)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,3 +28,11 @@ def eur(value) -> str:
|
||||
|
||||
def de_label(value: str) -> str:
|
||||
return DE_LABELS.get(value, value)
|
||||
|
||||
|
||||
def pct(value) -> str:
|
||||
"""Decimal("12.5") -> "12,5 %"; None -> "–" (z. B. keine Einkünfte)."""
|
||||
if value is None:
|
||||
return "–"
|
||||
d = Decimal(str(value)).quantize(Decimal("0.1"), rounding=ROUND_HALF_UP)
|
||||
return f"{d}".replace(".", ",") + " %"
|
||||
|
||||
Reference in New Issue
Block a user