mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Backend UX: Hide advanced tax rule settings
This commit is contained in:
@@ -125,6 +125,10 @@ class TaxRule(LoggedModel):
|
|||||||
s += ' ({})'.format(_('reverse charge enabled'))
|
s += ' ({})'.format(_('reverse charge enabled'))
|
||||||
return str(s)
|
return str(s)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_custom_rules(self):
|
||||||
|
return self.custom_rules and self.custom_rules != '[]'
|
||||||
|
|
||||||
def tax(self, base_price, base_price_is='auto'):
|
def tax(self, base_price, base_price_is='auto'):
|
||||||
if self.rate == Decimal('0.00'):
|
if self.rate == Decimal('0.00'):
|
||||||
return TaxedPrice(
|
return TaxedPrice(
|
||||||
|
|||||||
@@ -20,11 +20,24 @@
|
|||||||
{% bootstrap_form_errors form %}
|
{% bootstrap_form_errors form %}
|
||||||
{% bootstrap_field form.name layout="control" %}
|
{% bootstrap_field form.name layout="control" %}
|
||||||
{% bootstrap_field form.rate addon_after="%" layout="control" %}
|
{% bootstrap_field form.rate addon_after="%" layout="control" %}
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<a data-toggle="collapse" href="#advanced">
|
||||||
|
<strong>{% trans "Advanced settings" %}</strong>
|
||||||
|
<i class="fa fa-angle-down collapse-indicator"></i>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div id="advanced" class="panel-collapse collapsed {% if rule.eu_reverse_charge or rule.has_custom_rules or form.errors %}in{% endif %}">
|
||||||
|
<div class="panel-body">
|
||||||
<legend>{% trans "Advanced settings" %}</legend>
|
<legend>{% trans "Advanced settings" %}</legend>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<span class="fa fa-fw fa-legal fa-4x pull-left"></span>
|
<span class="fa fa-fw fa-legal fa-4x pull-left"></span>
|
||||||
{% blocktrans trimmed with docs="https://docs.pretix.eu/en/latest/user/events/taxes.html" %}
|
{% blocktrans trimmed with docs="https://docs.pretix.eu/en/latest/user/events/taxes.html" %}
|
||||||
These settings are intended for advanced users. See the <a href="{{ docs }}">documentation</a>
|
These settings are intended for advanced users. See the
|
||||||
|
<a href="{{ docs }}">documentation</a>
|
||||||
for more information. Note that we are not responsible for the correct handling
|
for more information. Note that we are not responsible for the correct handling
|
||||||
of taxes in your ticket shop. If in doubt, please contact a lawyer or tax consultant.
|
of taxes in your ticket shop. If in doubt, please contact a lawyer or tax consultant.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
@@ -100,6 +113,9 @@
|
|||||||
<i class="fa fa-plus"></i> {% trans "Add a new rule" %}</button>
|
<i class="fa fa-plus"></i> {% trans "Add a new rule" %}</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group submit-group">
|
<div class="form-group submit-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user