add rounded parameter to wallpaper price calculations
This commit is contained in:
+5
-3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user