Improved the behavior of pivot reports
This commit is contained in:
parent
7533cf7ddb
commit
428a2b4019
1 changed files with 17 additions and 10 deletions
|
|
@ -793,18 +793,25 @@ void transfer_details::operator()(post_t& post)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SET_ACCOUNT: {
|
case SET_ACCOUNT: {
|
||||||
account_t * prev_account = temp.account;
|
string account_name = substitute.to_string();
|
||||||
temp.account->remove_post(&temp);
|
if (! account_name.empty() &&
|
||||||
|
account_name[account_name.length() - 1] != ':') {
|
||||||
|
account_t * prev_account = temp.account;
|
||||||
|
temp.account->remove_post(&temp);
|
||||||
|
|
||||||
std::list<string> account_names;
|
account_name += ':';
|
||||||
split_string(substitute.to_string(), ':', account_names);
|
account_name += prev_account->fullname();
|
||||||
temp.account = create_temp_account_from_path(account_names, temps,
|
|
||||||
xact.journal->master);
|
|
||||||
temp.account->add_post(&temp);
|
|
||||||
|
|
||||||
temp.account->add_flags(prev_account->flags());
|
std::list<string> account_names;
|
||||||
if (prev_account->has_xdata())
|
split_string(account_name, ':', account_names);
|
||||||
temp.account->xdata().add_flags(prev_account->xdata().flags());
|
temp.account = create_temp_account_from_path(account_names, temps,
|
||||||
|
xact.journal->master);
|
||||||
|
temp.account->add_post(&temp);
|
||||||
|
|
||||||
|
temp.account->add_flags(prev_account->flags());
|
||||||
|
if (prev_account->has_xdata())
|
||||||
|
temp.account->xdata().add_flags(prev_account->xdata().flags());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue