P5-3926 fix to high package price on designer products

This commit is contained in:
Martin
2019-05-20 09:55:21 +02:00
parent 728ae6932c
commit 5b6b138c5d
2 changed files with 11 additions and 12 deletions
+8 -12
View File
@@ -106,9 +106,6 @@ def canvas_price(width, height, market, framed=True, designer=None, reseller=Non
price *= market.price_adjustments
# Package price should be added after market price adjustment but before other price adjustments.
price += package_price('canvas', width, height, market)
if designer:
price *= (float(designer.pricepremium) / 100) + 1
@@ -118,6 +115,8 @@ def canvas_price(width, height, market, framed=True, designer=None, reseller=Non
if inquiry:
price *= (float(inquiry.pricepremium) / 100) + 1
price += package_price('canvas', width, height, market)
price *= market.exchange_rate
if inc_vat:
@@ -139,12 +138,11 @@ def canvas_frame_price(width, height, market, reseller=None, rounded=True, inc_v
price *= market.price_adjustments
# Package price should be added after market price adjustment but before other price adjustments.
price += package_price('canvas', width, height, market)
if reseller:
price *= (float(reseller.pricepremium) / 100) + 1
price += package_price('canvas', width, height, market)
price *= market.exchange_rate
if inc_vat:
@@ -193,9 +191,6 @@ def poster_price(width, height, market, hanger=True, designer=None, reseller=Non
price *= market.price_adjustments
# Package price should be added after market price adjustment but before other price adjustments.
price += package_price('poster', width, height, market)
if designer:
price *= (float(designer.pricepremium) / 100) + 1
@@ -205,6 +200,8 @@ def poster_price(width, height, market, hanger=True, designer=None, reseller=Non
if inquiry:
price *= (float(inquiry.pricepremium) / 100) + 1
price += package_price('poster', width, height, market)
price *= market.exchange_rate
if inc_vat:
@@ -223,12 +220,11 @@ def poster_hanger_price(width, market, reseller=None, rounded=True, inc_vat=True
price *= market.price_adjustments
# Package price should be added after market price adjustment but before other price adjustments.
price += package_price('poster', width, 10, market) # we assume the poster hanger has a height of 10cm here
if reseller:
price *= (float(reseller.pricepremium) / 100) + 1
price += package_price('poster', width, 10, market) # we assume the poster hanger has a height of 10cm here
price *= market.exchange_rate
if inc_vat: