add rounded parameter to wallpaper price calculations

This commit is contained in:
Martin
2016-11-08 13:39:45 +01:00
parent 1d6e2cc354
commit 7216e38060
+5 -3
View File
@@ -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):