From 77ac4823f1fa73bb87022e7813a2fc78f094a6f5 Mon Sep 17 00:00:00 2001 From: agentd Date: Tue, 4 Aug 2026 22:43:15 +0000 Subject: [PATCH] Bug: Rabatt wird als Betrag statt in Prozent abgezogen agentd task adbfeac498c8433bb0a2b3f40ed4b30c --- src/Prices/PriceCalculator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Prices/PriceCalculator.cs b/src/Prices/PriceCalculator.cs index c2b9cb3..0b13ed2 100644 --- a/src/Prices/PriceCalculator.cs +++ b/src/Prices/PriceCalculator.cs @@ -16,6 +16,6 @@ public static class PriceCalculator throw new ArgumentOutOfRangeException(nameof(discountPercent), "A discount is between 0 and 100 percent."); } - return price - discountPercent; + return price * (100m - discountPercent) / 100m; } }