add support for product price calculations

This commit is contained in:
Martin
2016-11-19 19:56:39 +01:00
parent b5c8145f96
commit 3433113cb9
5 changed files with 145 additions and 32 deletions
+5 -2
View File
@@ -153,7 +153,7 @@ def old_canvas_diy_frame_price(width, height, market, reseller=None, rounded=Tru
return canvas_frame_price(width, height, stock_price, market, additional_price, reseller=reseller, rounded=rounded, inc_vat=inc_vat)
def old_canvas_price(width, height, material, market, framed=True, designer=None, reseller=None, inquiry=None, inc_vat=True):
def old_canvas_price(width, height, material, market, framed=True, designer=None, reseller=None, inquiry=None, rounded=True, inc_vat=True):
width, height = calculate_canvas_limits(width, height, framed)
price = m2_price(material, market, designer, reseller,
inquiry, rounded=False, inc_vat=False)
@@ -175,7 +175,10 @@ def old_canvas_price(width, height, material, market, framed=True, designer=None
if inc_vat:
price *= market.vat
return round_half_up(price)
if rounded:
price = round_half_up(price)
return price
def inquiry_price(inquiry, inc_price_retouch=True, rounded=True, inc_vat=True, **kwargs):