diff --git a/api/lib/prices.py b/api/lib/prices.py index be95bc3..a2ae8e1 100644 --- a/api/lib/prices.py +++ b/api/lib/prices.py @@ -32,9 +32,9 @@ def material_price(material, market, designer=None, reseller=None, rounded=True, return price -def wallpaper_price(width, height, material, market, designer=None, reseller=None, inc_vat=True): +def wallpaper_price(width, height, material, market, designer=None, reseller=None, rounded=True, inc_vat=True): m2_price = material_price( - material, market, designer, reseller, inc_vat=False) + material, market, designer, reseller, rounded=rounded, inc_vat=False) # calculate price per square meter sqm = (width / 100) * (height / 100) @@ -52,7 +52,9 @@ def wallpaper_price(width, height, material, market, designer=None, reseller=Non if inc_vat: price *= market.vat - return round(price) + if rounded: + price = round(price) + return price def canvas_cm2_price(cm2):