From 49b02614a39ad86bb499df8b410232a5948247d7 Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Sat, 13 Oct 2012 15:17:09 +0200 Subject: fix account mapping in csv conversion By using payees_for_unknown_accounts instead of account_mappings in csv.cc ledger will have the same behaviour as in `ledger -f - print` in that it uses payee fields in account directives to rewrite the account. --- src/csv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/csv.cc') diff --git a/src/csv.cc b/src/csv.cc index 71b6516a..dbd2dbfe 100644 --- a/src/csv.cc +++ b/src/csv.cc @@ -243,7 +243,7 @@ xact_t * csv_reader::read_xact(bool rich_data) // Translate the account name, if we have enough information to do so - foreach (account_mapping_t& value, context.journal->account_mappings) { + foreach (account_mapping_t& value, context.journal->payees_for_unknown_accounts) { if (value.first.match(xact->payee)) { post->account = value.second; break; -- cgit v1.2.3