Preisrechner: Rappenrundung im Backend und Rabatt-Rechner im Web

agentd task d23b198e9bef4e0c99f52c532c317f70
This commit is contained in:
agentd
2026-08-04 23:17:03 +00:00
parent 605a952f7a
commit df12cee1ef
9 changed files with 238 additions and 350 deletions

View File

@@ -16,6 +16,7 @@ public static class PriceCalculator
throw new ArgumentOutOfRangeException(nameof(discountPercent), "A discount is between 0 and 100 percent.");
}
return price - discountPercent;
var raw = price * (100 - discountPercent) / 100;
return Math.Round(raw / 0.05m, MidpointRounding.AwayFromZero) * 0.05m;
}
}
}