Käufer-USt-ID inkludieren wenn vorhanden
Bernd Wurst

Bernd Wurst commited on 2024-07-10 19:12:44
Zeige 2 geänderte Dateien mit 5 Einfügungen und 0 Löschungen.

... ...
@@ -188,6 +188,7 @@ class Invoice(object):
188 188
         self.contract_number = None
189 189
         self.debit_mandate_id = None
190 190
         self.creditor_reference_id = None
191
+        self.buyer_vat_id = None
191 192
         self.buyer_bank_data = {
192 193
             'kontoinhaber': None,
193 194
             'iban': None,
... ...
@@ -85,6 +85,10 @@ def InvoiceToXML(invoice):
85 85
     doc.trade.agreement.buyer.address.line_one = invoice.customer['address']['line1']
86 86
     doc.trade.agreement.buyer.address.line_two = invoice.customer['address']['line2']
87 87
     doc.trade.agreement.buyer.address.line_three = invoice.customer['address']['line3']
88
+    if invoice.buyer_vat_id:
89
+        tax_reg = TaxRegistration()
90
+        tax_reg.id = ('VA', invoice.buyer_vat_id)
91
+        doc.trade.agreement.buyer.tax_registrations.add(tax_reg)
88 92
     if invoice.leitweg_id:
89 93
         leitwegid = URIUniversalCommunication()
90 94
         leitwegid.uri_ID = ('0204', invoice.leitweg_id)
91 95