take PricePerUnit from customer if not set in invoice position
This commit is contained in:
@@ -32,8 +32,7 @@ class HtmlTemplate:
|
||||
|
||||
@staticmethod
|
||||
def calculate_total(invoice_data):
|
||||
return sum(
|
||||
(pos['Quantity'] * (pos['PricePerUnit'] or invoice_data.PricePerUnit)) for pos in invoice_data.Positions)
|
||||
return sum((pos['Quantity'] * pos['PricePerUnit']) for pos in invoice_data.Positions)
|
||||
|
||||
@staticmethod
|
||||
def named_replace(value, **replacements):
|
||||
|
||||
Reference in New Issue
Block a user