Bug: Rabatt wird als Betrag statt in Prozent abgezogen

agentd task adbfeac498c8433bb0a2b3f40ed4b30c
This commit is contained in:
agentd
2026-08-04 22:43:15 +00:00
parent 3f086f9dca
commit 77ac4823f1

View File

@@ -16,6 +16,6 @@ public static class PriceCalculator
throw new ArgumentOutOfRangeException(nameof(discountPercent), "A discount is between 0 and 100 percent."); throw new ArgumentOutOfRangeException(nameof(discountPercent), "A discount is between 0 and 100 percent.");
} }
return price - discountPercent; return price * (100m - discountPercent) / 100m;
} }
} }