(parse): Added "D" directive to ledger files, which allows the user to
specify which commodity is used for the default when none is specified or calculated by the "entry" command.
This commit is contained in:
parent
fdac1f14e9
commit
b697424b44
1 changed files with 5 additions and 0 deletions
|
|
@ -389,6 +389,11 @@ unsigned int textual_parser_t::parse(std::istream& in,
|
|||
break;
|
||||
#endif // TIMELOG_SUPPORT
|
||||
|
||||
case 'D': // a default commodity for "entry"
|
||||
commodity_t::default_commodity =
|
||||
commodity_t::find_commodity(skip_ws(line + 1), true);
|
||||
break;
|
||||
|
||||
case 'C': // a set of conversions
|
||||
if (char * p = std::strchr(line + 1, '=')) {
|
||||
*p++ = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue