summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xact.cc b/src/xact.cc
index ec1d372c..cac19a02 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -36,6 +36,7 @@
#include "account.h"
#include "journal.h"
#include "context.h"
+#include "format.h"
#include "pool.h"
namespace ledger {
@@ -775,6 +776,14 @@ void auto_xact_t::extend_xact(xact_base_t& xact, parse_context_t& context)
account = account->parent;
account = account->find_account(fullname);
}
+ else if (contains(fullname, "%")) {
+ format_t account_name(fullname);
+ std::ostringstream buf;
+ buf << account_name(bound_scope);
+ while (account->parent)
+ account = account->parent;
+ account = account->find_account(buf.str());
+ }
// Copy over details so that the resulting post is a mirror of
// the automated xact's one.