mirror of
https://github.com/pretix/pretix.git
synced 2026-05-18 17:24:03 +00:00
Invoice address: Make Peppol required in Belgium if available (Z#23220397) (#5808)
* Invoice address: Make Peppol required in Belgium if available (Z#23220397) * Fix failing test, remove template bit that's now impossible
This commit is contained in:
@@ -179,6 +179,12 @@ class PeppolTransmissionType(TransmissionType):
|
||||
def is_available(self, event, country: Country, is_business: bool):
|
||||
return is_business and super().is_available(event, country, is_business)
|
||||
|
||||
def is_exclusive(self, event, country: Country, is_business: bool) -> bool:
|
||||
if is_business and str(country) == "BE" and event and event.settings.invoice_address_from_country == "BE":
|
||||
# Peppol is required to be used for intra-Belgian B2B invoices
|
||||
return True
|
||||
return False
|
||||
|
||||
@property
|
||||
def invoice_address_form_fields(self) -> dict:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user