P5-4783 add different designer pricepremium for each product group
This commit is contained in:
+6
-6
@@ -6,7 +6,7 @@ from api.lib.limits import calculate_canvas_limits
|
||||
from api.lib import pwinty
|
||||
|
||||
|
||||
def m2_price(
|
||||
def wallpaper_m2_price(
|
||||
material,
|
||||
market,
|
||||
designer=None,
|
||||
@@ -19,7 +19,7 @@ def m2_price(
|
||||
price = material.price / 100.0
|
||||
|
||||
if designer:
|
||||
price *= (float(designer.pricepremium) / 100) + 1
|
||||
price *= (float(designer.pricepremium_wallpaper) / 100) + 1
|
||||
|
||||
if reseller:
|
||||
price *= (float(reseller.pricepremium) / 100) + 1
|
||||
@@ -50,7 +50,7 @@ def wallpaper_price(
|
||||
rounded=True,
|
||||
inc_vat=True,
|
||||
):
|
||||
price = m2_price(
|
||||
price = wallpaper_m2_price(
|
||||
material, market, designer, reseller, inquiry, rounded=False, inc_vat=False
|
||||
)
|
||||
|
||||
@@ -135,7 +135,7 @@ def canvas_price(
|
||||
price *= market.price_adjustments
|
||||
|
||||
if designer:
|
||||
price *= (float(designer.pricepremium) / 100) + 1
|
||||
price *= (float(designer.pricepremium_canvas) / 100) + 1
|
||||
|
||||
if reseller:
|
||||
price *= (float(reseller.pricepremium) / 100) + 1
|
||||
@@ -232,7 +232,7 @@ def poster_price(
|
||||
price *= market.price_adjustments
|
||||
|
||||
if designer:
|
||||
price *= (float(designer.pricepremium) / 100) + 1
|
||||
price *= (float(designer.pricepremium_poster) / 100) + 1
|
||||
|
||||
if reseller:
|
||||
price *= (float(reseller.pricepremium) / 100) + 1
|
||||
@@ -416,7 +416,7 @@ def framed_print_price(
|
||||
price *= market.price_adjustments
|
||||
|
||||
if designer:
|
||||
price *= (float(designer.pricepremium) / 100) + 1
|
||||
price *= (float(designer.pricepremium_framed_print) / 100) + 1
|
||||
|
||||
if reseller:
|
||||
price *= (float(reseller.pricepremium) / 100) + 1
|
||||
|
||||
Reference in New Issue
Block a user