From 72385fd0bd6417425a523338b7e96788c918817c Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 24 Feb 2022 20:58:04 +1100 Subject: [PATCH] reconcile: Quote metadata, fix hiding of matched + reconciled lines. --- conservancy_beancount/reconcile/statement_reconciler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conservancy_beancount/reconcile/statement_reconciler.py b/conservancy_beancount/reconcile/statement_reconciler.py index 9d247f7..df52a99 100644 --- a/conservancy_beancount/reconcile/statement_reconciler.py +++ b/conservancy_beancount/reconcile/statement_reconciler.py @@ -294,7 +294,7 @@ def format_matches(matches, csv_statement: str, show_reconciled_matches): note = ', '.join(note) note = ': ' + note if note else note if r1s and r2s: - if show_reconciled_matches and all(x['bank_statement'] for x in r2s): + if show_reconciled_matches or not all(x['bank_statement'] for x in r2s): if len(r2s) == 1: match_output.append([r1s[0]['date'], f'{format_record(r1s[0])} → {format_record(r2s[0])} ✓ Matched{note}']) else: @@ -322,8 +322,8 @@ def metadata_for_match(match, statement_filename, csv_filename): for books_entry in books_entries: for statement_entry in statement_entries: if not books_entry['bank_statement']: - metadata.append((books_entry['filename'], books_entry['line'], f' bank-statement: {statement_filename}')) - metadata.append((books_entry['filename'], books_entry['line'], f' bank-statement-csv: {csv_filename}:{statement_entry["line"]}')) + metadata.append((books_entry['filename'], books_entry['line'], f' bank-statement: "{statement_filename}"')) + metadata.append((books_entry['filename'], books_entry['line'], f' bank-statement-csv: "{csv_filename}:{statement_entry["line"]}"')) return metadata