Preisrechner: Rappenrundung im Backend und Rabatt-Rechner im Web
agentd task d23b198e9bef4e0c99f52c532c317f70
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user