Change behavior if "entry" ends with null account
A final null account (no amount specified) is now taken to be the "from" account, not another "to" account.
This commit is contained in:
parent
a8a87ab908
commit
23380aad04
1 changed files with 5 additions and 0 deletions
|
|
@ -208,6 +208,11 @@ namespace {
|
|||
bool has_only_from = true;
|
||||
bool has_only_to = true;
|
||||
|
||||
// A single account at the end of the line is the "from" account
|
||||
if (tmpl.posts.size() > 1 &&
|
||||
tmpl.posts.back().account_mask && ! tmpl.posts.back().amount)
|
||||
tmpl.posts.back().from = true;
|
||||
|
||||
foreach (xact_template_t::post_template_t& post, tmpl.posts) {
|
||||
if (post.from)
|
||||
has_only_to = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue