summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/textual.cc b/textual.cc
index 18eef1e0..b6bc934c 100644
--- a/textual.cc
+++ b/textual.cc
@@ -1,4 +1,4 @@
-#include "ledger.h"
+#include "journal.h"
#include "textual.h"
#include "datetime.h"
#include "autoxact.h"
@@ -223,6 +223,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
account_t * master,
const std::string * original_file)
{
+ static bool added_autoxact_hook = false;
static char line[MAX_LINE + 1];
char c;
unsigned int count = 0;
@@ -431,6 +432,10 @@ unsigned int textual_parser_t::parse(std::istream& in,
}
case '=': // automated transactions
+ if (! added_autoxact_hook) {
+ add_hook(journal->entry_finalize_hooks, handle_auto_xacts);
+ added_autoxact_hook = true;
+ }
parse_automated_transactions(in, account_stack.front(), auto_xacts);
break;