Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix invoice template

michal90e5c15ddc5e
diff --git a/saleor/order/models.py b/saleor/order/models.py
index 63d2cbcaba..ccad21ce31 100644
--- a/saleor/order/models.py
+++ b/saleor/order/models.py
@@ -278,6 +278,10 @@ class DeliveryGroup(models.Model, ItemSet):
subtotal = super(DeliveryGroup, self).get_total(**kwargs)
return subtotal + self.shipping_price
+ def get_subtotal_without_voucher(self, **kwargs):
+ subtotal = super(DeliveryGroup, self).get_total(**kwargs)
+ return subtotal
+
def get_total_quantity(self):
return sum([item.get_quantity() for item in self])
diff --git a/templates/dashboard/order/pdf/invoice.html b/templates/dashboard/order/pdf/invoice.html
index 26d9cb173a..3d39baee74 100644
--- a/templates/dashboard/order/pdf/invoice.html
+++ b/templates/dashboard/order/pdf/invoice.html
@@ -113,7 +113,7 @@
{% trans "Subtotal" context "Order subtotal" %}
</td>
<td class="right-align">
- {% gross group.order.get_subtotal_without_voucher html=True %}
+ {% gross group.get_subtotal_without_voucher html=True %}
</td>
</tr>
<tr>
@@ -121,7 +121,7 @@
{% trans "Total Shipping Price" context "Order totals header" %}
</td>
<td class="right-align">
- {% gross group.order.get_total_shipping html=True %}
+ {% gross group.shipping_price html=True %}
</td>
</tr>
</tbody>