reconcile: Tweak output.

This commit is contained in:
Ben Sturmfels 2022-02-09 14:42:32 +11:00
parent 3bff7845d5
commit bc4d897c92
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -92,9 +92,9 @@ def records_match(r1: Dict, r2: Dict) -> Tuple[bool, str]:
elif date_matches_loosly and amount_matches and payee_matches: elif date_matches_loosly and amount_matches and payee_matches:
return True, 'Matched +/- 3 days' return True, 'Matched +/- 3 days'
elif date_matches_exactly and amount_matches: elif date_matches_exactly and amount_matches:
return True, f'Matched with low-payee match ({payee_match_quality}%)' return True, f'Matched ignoring payee'
elif date_matches_loosly and amount_matches: elif date_matches_loosly and amount_matches:
return True, f'Matched +/- 3 days, low-payee match ({payee_match_quality}%)' return True, f'Matched +/- 3 days, ignoring payee'
else: else:
return False, '' return False, ''
@ -174,7 +174,7 @@ for r2 in books_trans:
matches.append([r2['date'], f'{" ":^45}{format_record(r2)} ✗ Not on statement ({os.path.basename(r2["filename"])}:{r2["line"]})']) matches.append([r2['date'], f'{" ":^45}{format_record(r2)} ✗ Not on statement ({os.path.basename(r2["filename"])}:{r2["line"]})'])
print('-' * 155) print('-' * 155)
print(f'{"STATEMENT":<38} {"BOOKS":<44} NOTES') print(f'{"Statement transaction":<38} {"Books transaction":<44} Notes')
print('-' * 155) print('-' * 155)
for _, output in sorted(matches): for _, output in sorted(matches):
print(output) print(output)