From bba8f6c215c1af855481f4d772f9bf6a2a8877e0 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 22 Jan 2025 18:36:07 +0100 Subject: [PATCH] Fix failing tests --- pretix_zugferd/invoice.py | 2 +- tests/results/cancellation.xml | 1 + tests/results/default.xml | 1 + tests/results/delivery_dates.xml | 1 + tests/results/paid.xml | 1 + tests/results/tax_code_exempt.xml | 1 + tests/results/tax_code_guess_AU.xml | 1 + tests/results/tax_code_reverse_charge.xml | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pretix_zugferd/invoice.py b/pretix_zugferd/invoice.py index c090512..2c295fb 100644 --- a/pretix_zugferd/invoice.py +++ b/pretix_zugferd/invoice.py @@ -469,6 +469,6 @@ class Modern1ZugferdXRechnungInvoiceRenderer(ZugferdMixin, Modern1Renderer): def _zugferd_generate_document(self, invoice): doc = super()._zugferd_generate_document(invoice) - if self.order.event.settings.invoice_address_custom_field: + if self.event.settings.invoice_address_custom_field: doc.trade.agreement.buyer_reference = invoice.custom_field or "unknown" return doc diff --git a/tests/results/cancellation.xml b/tests/results/cancellation.xml index 3379498..cacf42a 100644 --- a/tests/results/cancellation.xml +++ b/tests/results/cancellation.xml @@ -73,6 +73,7 @@ Attendee: Peter + PO-12345 Musterfirma diff --git a/tests/results/default.xml b/tests/results/default.xml index 1852739..d74b004 100644 --- a/tests/results/default.xml +++ b/tests/results/default.xml @@ -73,6 +73,7 @@ Attendee: Peter + PO-12345 Musterfirma diff --git a/tests/results/delivery_dates.xml b/tests/results/delivery_dates.xml index 48501e1..90d51c4 100644 --- a/tests/results/delivery_dates.xml +++ b/tests/results/delivery_dates.xml @@ -73,6 +73,7 @@ Attendee: Peter + PO-12345 Musterfirma diff --git a/tests/results/paid.xml b/tests/results/paid.xml index 5b7df79..e1fbcf2 100644 --- a/tests/results/paid.xml +++ b/tests/results/paid.xml @@ -73,6 +73,7 @@ Attendee: Peter + PO-12345 Musterfirma diff --git a/tests/results/tax_code_exempt.xml b/tests/results/tax_code_exempt.xml index cd628e5..e3ba274 100644 --- a/tests/results/tax_code_exempt.xml +++ b/tests/results/tax_code_exempt.xml @@ -73,6 +73,7 @@ Attendee: Peter + PO-12345 Musterfirma diff --git a/tests/results/tax_code_guess_AU.xml b/tests/results/tax_code_guess_AU.xml index 97973c7..b98693f 100644 --- a/tests/results/tax_code_guess_AU.xml +++ b/tests/results/tax_code_guess_AU.xml @@ -72,6 +72,7 @@ Attendee: Peter + PO-12345 Musterfirma diff --git a/tests/results/tax_code_reverse_charge.xml b/tests/results/tax_code_reverse_charge.xml index e97ad7d..bf056b2 100644 --- a/tests/results/tax_code_reverse_charge.xml +++ b/tests/results/tax_code_reverse_charge.xml @@ -72,6 +72,7 @@ Attendee: Peter + PO-12345 Musterfirma