P5-4394 add framed-prints price formulas
This commit is contained in:
@@ -11,6 +11,7 @@ from api.lib.prices import (
|
||||
canvas_frame_price,
|
||||
poster_price,
|
||||
poster_hanger_price,
|
||||
framed_print_price,
|
||||
m2_price,
|
||||
inquiry_price,
|
||||
)
|
||||
@@ -239,6 +240,39 @@ def poster_hanger():
|
||||
return jsonify(data=data)
|
||||
|
||||
|
||||
@mod.route("/framed-print", methods=["GET"])
|
||||
@validate_territory("territory")
|
||||
def framed_print():
|
||||
sku = request.args.get("sku", type=str)
|
||||
market = market_model.from_territory(request.args.get("territory"))
|
||||
reseller = get_reseller()
|
||||
designer = get_designer()
|
||||
|
||||
data = [
|
||||
{
|
||||
"sku": sku,
|
||||
"price": framed_print_price(
|
||||
sku,
|
||||
market,
|
||||
designer=designer,
|
||||
reseller=reseller,
|
||||
rounded=False,
|
||||
inc_vat=True,
|
||||
),
|
||||
"price_excl_vat": framed_print_price(
|
||||
sku,
|
||||
market,
|
||||
designer=designer,
|
||||
reseller=reseller,
|
||||
rounded=False,
|
||||
inc_vat=False,
|
||||
),
|
||||
}
|
||||
]
|
||||
|
||||
return jsonify(data=data)
|
||||
|
||||
|
||||
def get_inquiry_measurements(inquiry):
|
||||
""" this function returns width and height to be used in the price calculations """
|
||||
|
||||
|
||||
Reference in New Issue
Block a user