PW-622 Use column in materials table for getting prices
Squashed commit of the following: commit 801333b25a635c5fce12d937d6808894ef2475d3 Author: Martin <me.carlsson@gmail.com> Date: Tue Jan 3 10:59:45 2017 +0100 PW-622 divide by float commit 9e2c696751c28c017bcb452ea4349509ca787fd9 Author: Martin <me.carlsson@gmail.com> Date: Mon Jan 2 13:46:57 2017 +0100 PW-622 use new material_price column
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ from api.lib.limits import calculate_canvas_limits
|
||||
|
||||
def m2_price(material, market, designer=None, reseller=None, inquiry=None, rounded=True, inc_vat=True):
|
||||
""" calculates price per square meter """
|
||||
price = material.price
|
||||
price = material.price / 100.0
|
||||
|
||||
if designer:
|
||||
price *= (float(designer.pricepremium) / 100) + 1
|
||||
|
||||
Reference in New Issue
Block a user