P5-4783 add different designer pricepremium for each product group

This commit is contained in:
Martin Carlsson
2020-02-24 10:07:43 +01:00
committed by GitHub
parent b6437b3d25
commit fcf79ca75a
5 changed files with 63 additions and 63 deletions
+6 -6
View File
@@ -13,7 +13,7 @@ from api.lib.prices import (
poster_price,
poster_hanger_price,
framed_print_price,
m2_price,
wallpaper_m2_price,
inquiry_price,
)
from api.lib.limits import calculate_canvas_limits
@@ -56,7 +56,7 @@ def wallpaper():
{
"material": material.name,
"material_id": material.id,
"m2_price": m2_price(
"m2_price": wallpaper_m2_price(
material,
market,
reseller=reseller,
@@ -64,7 +64,7 @@ def wallpaper():
rounded=False,
inc_vat=True,
),
"m2_price_excl_vat": m2_price(
"m2_price_excl_vat": wallpaper_m2_price(
material,
market,
reseller=reseller,
@@ -311,7 +311,7 @@ def inquiry_wallpaper(inquiry):
{
"material": material.name,
"material_id": material.id,
"m2_price": m2_price(
"m2_price": wallpaper_m2_price(
material,
inquiry.market,
designer=inquiry.designer,
@@ -320,7 +320,7 @@ def inquiry_wallpaper(inquiry):
rounded=False,
inc_vat=True,
),
"m2_price_excl_vat": m2_price(
"m2_price_excl_vat": wallpaper_m2_price(
material,
inquiry.market,
designer=inquiry.designer,
@@ -555,7 +555,7 @@ def list_prices_wallpaper(territory):
market = market_model.from_territory(territory)
for wallpaper in wallpapers:
result[wallpaper.id] = m2_price(
result[wallpaper.id] = wallpaper_m2_price(
material=material, market=market, designer=wallpaper.product.designer
)
return jsonify(result)