forked from CGM_Public/pretix_original
Item list: Fix exclusive tax rules
This commit is contained in:
@@ -136,9 +136,15 @@
|
|||||||
{% if i.tax_rule and i.default_price %}
|
{% if i.tax_rule and i.default_price %}
|
||||||
<br/>
|
<br/>
|
||||||
<small class="text-muted">
|
<small class="text-muted">
|
||||||
{% blocktrans trimmed with rate=i.tax_rule.rate|floatformat:-2 taxname=i.tax_rule.name|default:s_taxes %}
|
{% if not i.tax_rule.price_includes_tax %}
|
||||||
incl. {{ rate }}% {{ taxname }}
|
{% blocktrans trimmed with rate=i.tax_rule.rate|floatformat:-2 taxname=i.tax_rule.name %}
|
||||||
{% endblocktrans %}
|
<strong>plus</strong> {{ rate }}% {{ taxname }}
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% else %}
|
||||||
|
{% blocktrans trimmed with rate=i.tax_rule.rate|floatformat:-2 taxname=i.tax_rule.name|default:s_taxes %}
|
||||||
|
incl. {{ rate }}% {{ taxname }}
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% endif %}
|
||||||
</small>
|
</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class ItemList(ListView):
|
|||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return Item.objects.filter(
|
return Item.objects.filter(
|
||||||
event=self.request.event
|
event=self.request.event
|
||||||
).annotate(
|
).select_related("tax_rule").annotate(
|
||||||
var_count=Count('variations')
|
var_count=Count('variations')
|
||||||
).prefetch_related("category", "limit_sales_channels").order_by(
|
).prefetch_related("category", "limit_sales_channels").order_by(
|
||||||
F('category__position').asc(nulls_first=True),
|
F('category__position').asc(nulls_first=True),
|
||||||
|
|||||||
Reference in New Issue
Block a user