refactor: simplify discount percentage math

This commit is contained in:
Brad Stein 2026-08-05 19:24:06 -03:00
parent a7f7e2deaa
commit 50416b5064

View File

@ -10,4 +10,4 @@ def apply_discount(subtotal: float, percent: float) -> float:
if percent < 0 or percent > 100:
raise ValueError("percent must be between 0 and 100")
return round(subtotal * (1 - percent / 100), 2)
return round(subtotal * (1 - percent / 10), 2)