Add missing vat_number field to user billing address
This commit is contained in:
parent
e3078f3ea9
commit
32cfdea68c
2 changed files with 12 additions and 4 deletions
|
@ -182,6 +182,7 @@ class UserBillingAddressForm(forms.ModelForm):
|
||||||
'city': _('City'),
|
'city': _('City'),
|
||||||
'postal_code': _('Postal Code'),
|
'postal_code': _('Postal Code'),
|
||||||
'Country': _('Country'),
|
'Country': _('Country'),
|
||||||
|
'vat_number': _('VAT Number'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,12 @@ class UserBillingAddress(BaseBillingAddress):
|
||||||
current = models.BooleanField(default=True)
|
current = models.BooleanField(default=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
if self.vat_number:
|
||||||
|
return "%s, %s, %s, %s, %s, %s" % (
|
||||||
|
self.cardholder_name, self.street_address, self.city,
|
||||||
|
self.postal_code, self.country, self.vat_number
|
||||||
|
)
|
||||||
|
else:
|
||||||
return "%s, %s, %s, %s, %s" % (
|
return "%s, %s, %s, %s, %s" % (
|
||||||
self.cardholder_name, self.street_address, self.city,
|
self.cardholder_name, self.street_address, self.city,
|
||||||
self.postal_code, self.country
|
self.postal_code, self.country
|
||||||
|
@ -50,6 +56,7 @@ class UserBillingAddress(BaseBillingAddress):
|
||||||
'City': self.city,
|
'City': self.city,
|
||||||
'Postal Code': self.postal_code,
|
'Postal Code': self.postal_code,
|
||||||
'Country': self.country,
|
'Country': self.country,
|
||||||
|
'VAT Number': self.vat_number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue