PW-865: Piterra bug fix

This commit is contained in:
Ruslan Getmansky
2017-12-06 16:24:47 +02:00
parent 8eb74f2a48
commit 8e33c1b102
4 changed files with 12 additions and 4 deletions
+3 -2
View File
@@ -139,13 +139,14 @@ def inquiry_price(inquiry, inc_price_retouch=True, rounded=True, inc_vat=True, *
height = kwargs.get('height', inquiry.height)
material = kwargs.get('material', inquiry.material)
framed = kwargs.get('framed', inquiry.framed)
reseller = kwargs.get('reseller', inquiry.dealer_store)
if inquiry.product_group == 'photo-wallpaper':
price = wallpaper_price(width, height, material, inquiry.market,
designer=inquiry.designer, reseller=inquiry.dealer_store, inquiry=inquiry, rounded=False, inc_vat=False)
designer=inquiry.designer, reseller=reseller, inquiry=inquiry, rounded=False, inc_vat=False)
elif inquiry.product_group == 'canvas':
price = canvas_price(width, height, inquiry.market,
designer=inquiry.designer, reseller=inquiry.dealer_store, inquiry=inquiry, framed=framed, rounded=False, inc_vat=False)
designer=inquiry.designer, reseller=reseller, inquiry=inquiry, framed=framed, rounded=False, inc_vat=False)
else:
raise ValueError(
'Invalid product group: {}'.format(inquiry.product_group))
+4 -2
View File
@@ -144,7 +144,8 @@ def inquiry_wallpaper(inquiry):
'm2_price_excl_vat': m2_price(material, inquiry.market, designer=inquiry.designer, reseller=inquiry.dealer_store, inquiry=inquiry, rounded=False, inc_vat=False),
'inquiry_price_excl_retouch': inquiry_price(inquiry, material=material, width=width, height=height, rounded=False, inc_price_retouch=False, inc_vat=True),
'inquiry_price': inquiry_price(inquiry, material=material, width=width, height=height, rounded=False, inc_vat=True),
'inquiry_price_excl_vat': inquiry_price(inquiry, material=material, width=width, height=height, rounded=False, inc_vat=False)
'inquiry_price_excl_vat': inquiry_price(inquiry, material=material, width=width, height=height, rounded=False, inc_vat=False),
'inquiry_price_excl_price_premium': inquiry_price(inquiry, material=material, width=width, height=height, reseller=None, inc_price_retouch=False, rounded=False, inc_vat=False)
})
data['prices'] = prices
return data
@@ -170,7 +171,8 @@ def inquiry_canvas(inquiry):
'height': height,
'inquiry_price_excl_retouch': inquiry_price(inquiry, material=material, width=width, height=height, framed=framed, rounded=False, inc_price_retouch=False, inc_vat=True),
'inquiry_price': inquiry_price(inquiry, material=material, width=width, height=height, framed=framed, rounded=False, inc_vat=True),
'inquiry_price_excl_vat': inquiry_price(inquiry, material=material, width=width, height=height, framed=framed, rounded=False, inc_vat=False)
'inquiry_price_excl_vat': inquiry_price(inquiry, material=material, width=width, height=height, framed=framed, rounded=False, inc_vat=False),
'inquiry_price_excl_price_premium': inquiry_price(inquiry, material=material, width=width, height=height, reseller=None, inc_price_retouch=False, framed=framed, rounded=False, inc_vat=False)
})
data['prices'] = prices