Bug: Rabatt wird als Betrag statt in Prozent abgezogen #1

Open
developer wants to merge 1 commits from agentd/task-adbfeac4 into main
Showing only changes of commit 77ac4823f1 - Show all commits

View File

@@ -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;
}
}