Changeset - 9ae36feed2f8
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 2 years ago 2022-02-24 10:11:02
ben@sturm.com.au
reconciler: Remove debug warning.
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reconcile/statement_reconciler.py
Show inline comments
...
 
@@ -129,6 +129,11 @@ def read_transactions_from_csv(f: TextIO, standardize_statement_record: Callable
 
    reader = csv.DictReader(f)
 
    return sort_records([standardize_statement_record(row, reader.line_num) for row in reader])
 

	
 
# Does the account you entered match the CSV?
 
# Is the CSV in the format we expect? (ie. did they download through the right interface?)
 
# Logical CSV line numbers
 
# CSV reconciliation report
 
# Merge helper script.
 

	
 
def standardize_amex_record(row: Dict, line: int) -> Dict:
 
    """Turn an AMEX CSV row into a standard dict format representing a transaction."""
...
 
@@ -251,13 +256,10 @@ def records_match(r1: Dict, r2: Dict) -> Tuple[bool, str]:
 

	
 
def match_statement_and_books(statement_trans: list, books_trans: list):
 
    """
 

	
 

	
 
    Runs through all the statement transactions to find a matching transaction
 
    in the books. If found, the books transaction is marked off so that it can
 
    only be matched once. Some transactions will be matched, some will be on the
 
    statement but not the books and some on the books but not the statement.
 

	
 
    """
 
    matches = []
 
    remaining_books_trans = []
...
 
@@ -276,8 +278,6 @@ def match_statement_and_books(statement_trans: list, books_trans: list):
 
                best_match_index = i
 
                best_match_note = note
 
        if best_match_score > 0.5 and matches_found == 1 and 'check-id mismatch' not in best_match_note or best_match_score > 0.8:
 
            if best_match_score <= 0.8:
 
                best_match_note.append('only one decent match')
 
            matches.append(([r1], [books_trans[best_match_index]], best_match_note))
 
            # Don't try to make a second match against this books entry.
 
            del books_trans[best_match_index]
0 comments (0 inline, 0 general)