Enable payee mappings
This commit is contained in:
parent
4b58047ecb
commit
3d8cad77c4
1 changed files with 10 additions and 13 deletions
|
|
@ -156,9 +156,10 @@ account_t * journal_t::register_account(const string& name, post_t * post,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
string journal_t::register_payee(const string& name, xact_t * xact,
|
string journal_t::register_payee(const string& name, xact_t *, const string&)
|
||||||
const string& location)
|
|
||||||
{
|
{
|
||||||
|
string payee;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
std::set<string>::iterator i = known_payees.find(name);
|
std::set<string>::iterator i = known_payees.find(name);
|
||||||
|
|
||||||
|
|
@ -180,18 +181,14 @@ string journal_t::register_payee(const string& name, xact_t * xact,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
foreach (payee_mapping_t& value, payee_mappings) {
|
||||||
foreach (payee_mapping_t& value, context.journal.payee_mappings) {
|
if (value.first.match(name)) {
|
||||||
if (value.first.match(next)) {
|
payee = value.second;
|
||||||
xact->payee = value.second;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (xact->payee.empty())
|
}
|
||||||
xact->payee = next;
|
|
||||||
#else
|
return payee.empty() ? name : payee;
|
||||||
return name;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void journal_t::register_commodity(commodity_t& comm,
|
void journal_t::register_commodity(commodity_t& comm,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue