Bug: Rabatt wird als Betrag statt in Prozent abgezogen
agentd task adbfeac498c8433bb0a2b3f40ed4b30c
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user