forked from CGM_Public/pretix_original
Add field internal_reference to invoice addresses
This commit is contained in:
@@ -85,7 +85,8 @@ class InvoiceAddressForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = InvoiceAddress
|
||||
fields = ('is_business', 'company', 'name', 'street', 'zipcode', 'city', 'country', 'vat_id')
|
||||
fields = ('is_business', 'company', 'name', 'street', 'zipcode', 'city', 'country', 'vat_id',
|
||||
'internal_reference')
|
||||
widgets = {
|
||||
'is_business': BusinessBooleanRadio,
|
||||
'street': forms.Textarea(attrs={'rows': 2, 'placeholder': _('Street and Number')}),
|
||||
@@ -93,6 +94,7 @@ class InvoiceAddressForm(forms.ModelForm):
|
||||
'data-display-dependency': '#id_is_business_1'}),
|
||||
'name': forms.TextInput(attrs={'data-typocheck-source': '1'}),
|
||||
'vat_id': forms.TextInput(attrs={'data-display-dependency': '#id_is_business_1'}),
|
||||
'internal_reference': forms.TextInput,
|
||||
}
|
||||
labels = {
|
||||
'is_business': ''
|
||||
|
||||
@@ -90,6 +90,8 @@
|
||||
<dt>{% trans "VAT ID" %}</dt>
|
||||
<dd>{{ addr.vat_id }}</dd>
|
||||
{% endif %}
|
||||
<dt>{% trans "Internal reference" %}</dt>
|
||||
<dd>{{ addr.internal_reference }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -188,6 +188,8 @@
|
||||
<dt>{% trans "VAT ID" %}</dt>
|
||||
<dd>{{ order.invoice_address.vat_id }}</dd>
|
||||
{% endif %}
|
||||
<dt>{% trans "Internal Reference" %}</dt>
|
||||
<dd>{{ order.invoice_address.internal_reference }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -409,6 +409,7 @@ class OrderInvoiceCreate(EventViewMixin, OrderDetailMixin, View):
|
||||
class OrderModify(EventViewMixin, OrderDetailMixin, QuestionsViewMixin, TemplateView):
|
||||
template_name = "pretixpresale/event/order_modify.html"
|
||||
|
||||
@cached_property
|
||||
def _positions_for_questions(self):
|
||||
return self.positions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user