1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2025-06-29 17:51:08 +02:00

Anonymize data, fix remittancei import

This commit is contained in:
Yohann D'ANELLO
2020-07-26 12:05:26 +02:00
parent 748ad7eb48
commit 126e5fa1e4
5 changed files with 33 additions and 8 deletions

View File

@ -295,7 +295,7 @@ class Command(ImportCommand):
remittance_dict = {
"pk": pk_remittance,
"date": make_aware(row["date"]),
"date": make_aware(row["date"][:19]),
"remittance_type_id": 1, # Only Bank checks are supported in NK15
"comment": row["commentaire"],
"closed": row["close"],
@ -315,6 +315,9 @@ class Command(ImportCommand):
for idx, row in enumerate(cur):
self.update_line(idx, n, row["nom"])
if not row["idremise"]:
continue
tr = SpecialTransactionProxy.objects.get(transaction__id=MAP_TRANSACTION[row["idtransaction"]])
tr.remittance_id = MAP_REMITTANCE[row["idremise"]]
tr.save()