diff --git a/rechnung.typ b/rechnung.typ index 1e0cf80..0be0d38 100644 --- a/rechnung.typ +++ b/rechnung.typ @@ -66,7 +66,14 @@ if i == 0 { return "0.00€" } - str(calc.round(i * 100)).slice(0,-2)+ "." + str(calc.round(i * 100)).slice(-2) + "€" + + let j = str(calc.round(i * 100)) + + if i < 1 { + "0." + j.slice(-2) + "€" + } else { + j.slice(0,-2)+ "." + j.slice(-2) + "€" + } } // DIN 5008 nach Faltmarke 1