Bernd Wurst commited on 2024-02-14 08:44:25
Zeige 2 geänderte Dateien mit 8 Einfügungen und 8 Löschungen.
... | ... |
@@ -240,7 +240,7 @@ class PDF(object): |
240 | 240 |
lines = [ |
241 | 241 |
f"IBAN: {iban}", |
242 | 242 |
self.invoice.seller_bank_data['bankname'], |
243 |
- f"BIC: {self.invoice.seller_bank_data['bic']}" |
|
243 |
+ f"BIC: {self.invoice.seller_bank_data['bic']}" if self.invoice.seller_bank_data['bic'] else None, |
|
244 | 244 |
] |
245 | 245 |
c = 0 |
246 | 246 |
for line in lines: |
... | ... |
@@ -120,14 +120,14 @@ def InvoiceToXML(invoice): |
120 | 120 |
li.delivery.event.occurrence = el['period_start'] |
121 | 121 |
|
122 | 122 |
# FIXME: Hier sollte der passende Code benutzt werden (z.B. Monat) |
123 |
- li.delivery.billed_quantity = (Decimal(el['count']), 'H87') |
|
123 |
+ li.delivery.billed_quantity = (Decimal(el['count']), 'C62') |
|
124 |
+ # C62 = ohne Einheit |
|
125 |
+ # H87 = Stück |
|
126 |
+ # MON = Month |
|
124 | 127 |
# LTR = Liter (1 dm3) |
125 |
- # MTQ = cubic meter |
|
126 | 128 |
# KGM = Kilogram |
127 | 129 |
# MTR = Meter |
128 |
- # H87 = Piece |
|
129 | 130 |
# TNE = Tonne |
130 |
- # MON = Month |
|
131 | 131 |
|
132 | 132 |
li.settlement.trade_tax.type_code = "VAT" |
133 | 133 |
if invoice.vat_type == VAT_REGULAR: |
... | ... |
@@ -198,8 +198,8 @@ def InvoiceToXML(invoice): |
198 | 198 |
|
199 | 199 |
if invoice.seller_bank_data['iban'] and invoice.payment_type == PAYMENT_UEBERWEISUNG: |
200 | 200 |
doc.trade.settlement.payment_means.payee_account.iban = invoice.seller_bank_data['iban'] |
201 |
- doc.trade.settlement.payment_means.payee_institution.bic = "GENODES1VBK" |
|
202 |
- # Ist in der Library vorhanden, validiert aber nicht im XML?! |
|
201 |
+ if invoice.seller_bank_data['bic']: |
|
202 |
+ doc.trade.settlement.payment_means.payee_institution.bic = invoice.seller_bank_data['bic'] |
|
203 | 203 |
if invoice.buyer_bank_data['iban'] and invoice.payment_type == PAYMENT_LASTSCHRIFT: |
204 | 204 |
# Kunden-Bankverbindung bei Lastschrift |
205 | 205 |
doc.trade.settlement.payment_means.payer_account.iban = invoice.buyer_bank_data['iban'] |
... | ... |
@@ -208,7 +208,7 @@ def InvoiceToXML(invoice): |
208 | 208 |
if invoice.due_date and invoice.payment_type == PAYMENT_UEBERWEISUNG: |
209 | 209 |
terms.description = f"Bitte begleichen Sie den Betrag bis zum {invoice.due_date.strftime('%d.%m.%Y')} ohne Abzüge." |
210 | 210 |
terms.due = invoice.due_date |
211 |
- if invoice.type == GUTSCHRIFT: |
|
211 |
+ if invoice.type in [GUTSCHRIFT, KORREKTUR]: |
|
212 | 212 |
terms.description = f"Wir überweisen den Betrag auf Ihr Konto." |
213 | 213 |
elif invoice.debit: |
214 | 214 |
if invoice.debit_mandate_id: |
215 | 215 |