forked from CGM_Public/pretix_original
Vouchers: Allow to set all addons or bundles as included (#3322)
Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -585,7 +585,7 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
|
||||
if items:
|
||||
formsetentry['categories'].append({
|
||||
'category': iao.addon_category,
|
||||
'price_included': iao.price_included,
|
||||
'price_included': iao.price_included or (cartpos.voucher_id and cartpos.voucher.all_addons_included),
|
||||
'multi_allowed': iao.multi_allowed,
|
||||
'min_count': iao.min_count,
|
||||
'max_count': iao.max_count,
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
from {{ minprice }}
|
||||
{% endblocktrans %}
|
||||
{% elif not item.min_price and not item.max_price %}
|
||||
{% if not item.mandatory_priced_addons %}
|
||||
{% if not item.mandatory_priced_addons or voucher.all_addons_included %}
|
||||
<span class="text-uppercase">{% trans "free" context "price" %}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
@@ -207,7 +207,7 @@
|
||||
</div>
|
||||
<p>
|
||||
{% elif not var.display_price.gross %}
|
||||
{% if not item.mandatory_priced_addons or var.original_price %}
|
||||
{% if not item.mandatory_priced_addons or var.original_price or voucher.all_addons_included %}
|
||||
<span class="text-uppercase">{% trans "free" context "price" %}</span>
|
||||
{% endif %}
|
||||
{% elif event.settings.display_net_prices %}
|
||||
@@ -349,7 +349,7 @@
|
||||
</div>
|
||||
<p>
|
||||
{% elif not item.display_price.gross %}
|
||||
{% if not item.mandatory_priced_addons or item.original_price %}
|
||||
{% if not item.mandatory_priced_addons or item.original_price or voucher.all_addons_included %}
|
||||
<span class="text-uppercase">{% trans "free" context "price" %}</span>
|
||||
{% endif %}
|
||||
{% elif event.settings.display_net_prices %}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ class OrderChangeMixin:
|
||||
if items:
|
||||
p.addon_form['categories'].append({
|
||||
'category': iao.addon_category,
|
||||
'price_included': iao.price_included,
|
||||
'price_included': iao.price_included or (p.voucher_id and p.voucher.all_addons_included),
|
||||
'multi_allowed': iao.multi_allowed,
|
||||
'min_count': iao.min_count,
|
||||
'max_count': iao.max_count,
|
||||
|
||||
Reference in New Issue
Block a user