From b34f39cc44a334c963e54f8f3fbebb21fb49601b Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 11 Mar 2022 02:16:05 +0100 Subject: [PATCH] fix wrong fix ;-) --- InvenTree/order/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index 4efa76449f..379422b2f3 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -161,7 +161,7 @@ class Order(ReferenceIndexingMixin): # gather name reference price_ref = 'sale_price' if isinstance(self, SalesOrder) else 'purchase_price' # order items - total += sum([a.quantity * convert_money(getattr(a, price_ref), target_currency) for a in self.lines.all() if hasattr(a, price_ref)]) + total += sum([a.quantity * convert_money(getattr(a, price_ref), target_currency) for a in self.lines.all() if getattr(a, price_ref)]) # additional lines total += sum([a.quantity * convert_money(a.sale_price, target_currency) for a in self.additional_lines.all() if a.sale_price])