mirror of
https://github.com/pretix/pretix.git
synced 2026-04-25 23:42:32 +00:00
Compare commits
1 Commits
plugin-ava
...
vat-valida
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4282613fd4 |
@@ -518,6 +518,7 @@ def pretixcontrol_orderposition_blocked_display(sender: Event, orderposition, bl
|
|||||||
'The order requires approval before it can continue to be processed.'),
|
'The order requires approval before it can continue to be processed.'),
|
||||||
'pretix.event.order.approved': _('The order has been approved.'),
|
'pretix.event.order.approved': _('The order has been approved.'),
|
||||||
'pretix.event.order.denied': _('The order has been denied (comment: "{comment}").'),
|
'pretix.event.order.denied': _('The order has been denied (comment: "{comment}").'),
|
||||||
|
'pretix.event.order.vatid.validated': _('The customer VAT ID has been verified.'),
|
||||||
'pretix.event.order.contact.changed': _('The email address has been changed from "{old_email}" '
|
'pretix.event.order.contact.changed': _('The email address has been changed from "{old_email}" '
|
||||||
'to "{new_email}".'),
|
'to "{new_email}".'),
|
||||||
'pretix.event.order.contact.confirmed': _(
|
'pretix.event.order.contact.confirmed': _(
|
||||||
|
|||||||
@@ -1641,9 +1641,17 @@ class OrderCheckVATID(OrderView):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
normalized_id = validate_vat_id(ia.vat_id, str(ia.country))
|
normalized_id = validate_vat_id(ia.vat_id, str(ia.country))
|
||||||
ia.vat_id_validated = True
|
with transaction.atomic():
|
||||||
ia.vat_id = normalized_id
|
ia.vat_id_validated = True
|
||||||
ia.save()
|
ia.vat_id = normalized_id
|
||||||
|
ia.save()
|
||||||
|
self.order.log_action(
|
||||||
|
'pretix.event.order.vatid.validated',
|
||||||
|
data={
|
||||||
|
'vat_id': normalized_id,
|
||||||
|
},
|
||||||
|
user=self.request.user,
|
||||||
|
)
|
||||||
except VATIDFinalError as e:
|
except VATIDFinalError as e:
|
||||||
messages.error(self.request, e.message)
|
messages.error(self.request, e.message)
|
||||||
except VATIDTemporaryError:
|
except VATIDTemporaryError:
|
||||||
|
|||||||
Reference in New Issue
Block a user