Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Jan 31, 2025
1 parent fbed4ed commit 0799d73
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions pretix_zugferd/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,15 @@ def _zugferd_generate_document(self, invoice):
doc.trade.agreement.seller.contact.email.address = (
invoice.event.settings.zugferd_seller_contact_email
)
doc.trade.agreement.buyer.electronic_address.uri_ID = ("EM", invoice.event.settings.zugferd_seller_contact_email)
doc.trade.agreement.buyer.electronic_address.uri_ID = (
"EM",
invoice.event.settings.zugferd_seller_contact_email,
)
elif invoice.event.settings.contact_mail:
doc.trade.agreement.buyer.electronic_address.uri_ID = ("EM", invoice.event.settings.contact_mail)
doc.trade.agreement.buyer.electronic_address.uri_ID = (
"EM",
invoice.event.settings.contact_mail,
)
if invoice.event.settings.zugferd_seller_contact_phone:
doc.trade.agreement.seller.contact.telephone.number = (
invoice.event.settings.zugferd_seller_contact_phone
Expand Down Expand Up @@ -198,9 +204,15 @@ def _zugferd_generate_document(self, invoice):
and invoice.custom_field
and self.re_leitweg_id.match(invoice.custom_field)
):
doc.trade.agreement.seller.electronic_address.uri_ID = ("0204", invoice.custom_field)
doc.trade.agreement.seller.electronic_address.uri_ID = (
"0204",
invoice.custom_field,
)
elif invoice.order.email:
doc.trade.agreement.seller.electronic_address.uri_ID = ("EM", invoice.order.email)
doc.trade.agreement.seller.electronic_address.uri_ID = (
"EM",
invoice.order.email,
)

if invoice.invoice_to_vat_id:
doc.trade.agreement.buyer.tax_registrations.add(
Expand Down

0 comments on commit 0799d73

Please sign in to comment.