Skip to content

Commit

Permalink
[FIX] note only contains info of the current move
Browse files Browse the repository at this point in the history
The communication given in a line of a coda file contains a lot of information (such as
the partner's name and home address, the bank's name and identification, the structured
communication...). This information is what we get in transaction_ref.
But in the move communication we only want to keep the actual payment transaction
communication, which is given in ref_move
  • Loading branch information
marielejeune committed Jan 19, 2023
1 parent 1a65ddf commit d2eb9da
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ def get_st_vals(self, statement):
if st.type == MovementRecordType.GLOBALISATION
}
information_dict = {}
# build a dict of information by transaction_ref. The transaction_ref
# refers to the transaction_ref of a movement record
# build a dict of information by reF_move. The ref_move
# refers to the ref_move of a movement record
for info_line in statement.informations:
infos = information_dict.setdefault(info_line.transaction_ref, [])
infos = information_dict.setdefault(info_line.ref_move, [])
infos.append(info_line)

for sequence, line in enumerate(
Expand Down Expand Up @@ -151,7 +151,7 @@ def get_st_line_note(self, line, information_dict):
note.append(_("Counter Party Account") + ": " + line.counterparty_number)
if line.counterparty_address:
note.append(_("Counter Party Address") + ": " + line.counterparty_address)
infos = information_dict.get(line.transaction_ref, [])
infos = information_dict.get(line.ref_move, [])
if line.communication or infos:
communications = []
if line.communication:
Expand Down

0 comments on commit d2eb9da

Please sign in to comment.