Telefonnummer
Bernd Wurst

Bernd Wurst commited on 2024-02-14 08:44:25
Zeige 2 geänderte Dateien mit 9 Einfügungen und 0 Löschungen.

... ...
@@ -130,6 +130,7 @@ class Invoice(object):
130 130
                 "line3": None,
131 131
                 "country_id": None,
132 132
             },
133
+            "phone": None,
133 134
             "email": None,
134 135
         }
135 136
         self.buyer = self.customer
... ...
@@ -158,6 +159,8 @@ class Invoice(object):
158 159
         self.due_date = None
159 160
         self.debit = False
160 161
         self.payment_type = PAYMENT_UEBERWEISUNG
162
+        self.buyer_reference = None
163
+        self.order_number = None
161 164
         self.debit_mandate_id = None
162 165
         self.creditor_reference_id = None
163 166
         self.buyer_bank_data = {
... ...
@@ -75,6 +75,8 @@ def InvoiceToXML(invoice):
75 75
     doc.trade.agreement.seller.address.line_one = invoice.seller['address']['line1']
76 76
     doc.trade.agreement.seller.address.line_two = invoice.seller['address']['line2']
77 77
     doc.trade.agreement.seller.address.line_three = invoice.seller['address']['line3']
78
+    if invoice.seller['phone']:
79
+        doc.trade.agreement.seller.contact.telephone.number = invoice.seller['phone']
78 80
     if invoice.seller_vat_id:
79 81
         tax_reg = TaxRegistration()
80 82
         tax_reg.id = ('VA', invoice.seller_vat_id)
... ...
@@ -94,6 +96,10 @@ def InvoiceToXML(invoice):
94 96
     doc.trade.agreement.buyer.address.line_two = invoice.customer['address']['line2']
95 97
     doc.trade.agreement.buyer.address.line_three = invoice.customer['address']['line3']
96 98
 
99
+    if invoice.buyer_reference:
100
+        # "Leitweg-ID" in XRechnung
101
+        doc.trade.agreement.buyer_reference = invoice.buyer_reference
102
+
97 103
     # Line Items
98 104
     summe_netto = 0.0
99 105
     summe_brutto = 0.0
100 106