mirror of
https://github.com/pretix/pretix.git
synced 2025-12-05 21:32:28 +00:00
committed by
Raphael Michel
parent
6e4750336b
commit
a2acd336eb
@@ -216,6 +216,8 @@ class BaseInvoiceAddressForm(forms.ModelForm):
|
||||
|
||||
def clean(self):
|
||||
data = self.cleaned_data
|
||||
if not data.get('is_business'):
|
||||
data['company'] = ''
|
||||
if not data.get('name') and not data.get('company') and self.event.settings.invoice_address_required:
|
||||
raise ValidationError(_('You need to provide either a company name or your name.'))
|
||||
|
||||
|
||||
@@ -87,8 +87,10 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{% trans "Company" %}</dt>
|
||||
<dd>{{ addr.company }}</dd>
|
||||
{% if addr.company %}
|
||||
<dt>{% trans "Company" %}</dt>
|
||||
<dd>{{ addr.company }}</dd>
|
||||
{% endif %}
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ addr.name }}</dd>
|
||||
<dt>{% trans "Address" %}</dt>
|
||||
|
||||
Reference in New Issue
Block a user