Ongoing enhancements

This commit is contained in:
2025-07-24 14:36:35 +02:00
parent 4baa544458
commit ebed331760
2 changed files with 12 additions and 4 deletions
+2
View File
@@ -93,6 +93,8 @@ if __name__ == "__main__":
if len(new_list) > 0:
outData.append([i[0], new_list[0].get('Auftraggeber'), new_list[0].get('Zahlungsreferenz'), new_list[0].get('Verwendungszweck'), new_list[0].get('IBAN'), i[2], i[3].replace(',','.'), i[4], i[5]])
# Replace None with empty string before saving
outData = [['' if x is None else x for x in row] for row in outData]
savetxt(target_csv, outData, delimiter=";", encoding='utf-8', header='valuta_date;client;reference;intended;IBAN;entry_date;amount;currency;timestamp', fmt='%s')
bak_dir = os.path.join(os.path.dirname(source_csv), "bak")
os.makedirs(bak_dir, exist_ok=True)