P5-4394 add framed-prints price formulas
This commit is contained in:
@@ -296,6 +296,50 @@ def _price_for_poster_hanger_size(size):
|
||||
raise ValueError("Invalid poster hanger size: {}".format(size))
|
||||
|
||||
|
||||
def framed_print_price(
|
||||
sku, market, designer=None, reseller=None, inquiry=None, rounded=True, inc_vat=True
|
||||
):
|
||||
sku_prices = {
|
||||
"GLOBAL-CFP-12x12": 446,
|
||||
"GLOBAL-CFP-11x14": 478,
|
||||
"GLOBAL-CFP-12x16": 494,
|
||||
"GLOBAL-CFP-16x20": 574,
|
||||
"GLOBAL-CFP-20x20": 690,
|
||||
"GLOBAL-CFP-18x24": 708,
|
||||
"GLOBAL-CFP-20x28": 761,
|
||||
"GLOBAL-CFP-24x32": 831,
|
||||
"GLOBAL-CFP-28x28": 867,
|
||||
"GLOBAL-CFP-24x36": 1035,
|
||||
"GLOBAL-CFP-28x40": 1127,
|
||||
}
|
||||
|
||||
if not sku in sku_prices:
|
||||
raise ValueError("Invalid SKU number: {}".format(sku))
|
||||
|
||||
price = sku_prices[sku]
|
||||
|
||||
price *= market.price_adjustments
|
||||
|
||||
if designer:
|
||||
price *= (float(designer.pricepremium) / 100) + 1
|
||||
|
||||
if reseller:
|
||||
price *= (float(reseller.pricepremium) / 100) + 1
|
||||
|
||||
if inquiry:
|
||||
price *= (float(inquiry.pricepremium) / 100) + 1
|
||||
|
||||
price *= market.exchange_rate
|
||||
|
||||
if inc_vat:
|
||||
price *= market.vat
|
||||
|
||||
if rounded:
|
||||
price = round_half_up(price)
|
||||
|
||||
return price
|
||||
|
||||
|
||||
def inquiry_price(
|
||||
inquiry, inc_price_retouch=True, rounded=True, inc_vat=True, **kwargs
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user