Automated transactions now use report query syntax

This returns their behavior back very close to what 2.x accepts.
This commit is contained in:
John Wiegley 2009-11-10 02:44:16 -05:00
parent a779751fc7
commit 39532bdf35
5 changed files with 7 additions and 6 deletions

View file

@ -36,6 +36,7 @@
#include "post.h"
#include "account.h"
#include "option.h"
#include "query.h"
#include "pstream.h"
#include "pool.h"
#include "session.h"
@ -508,8 +509,8 @@ void instance_t::automated_xact_directive(char * line)
}
std::auto_ptr<auto_xact_t> ae
(new auto_xact_t(predicate_t(skip_ws(line + 1),
keep_details_t(true, true, true))));
(new auto_xact_t(query_t(string(skip_ws(line + 1)),
keep_details_t(true, true, true))));
reveal_context = false;

View file

@ -1,6 +1,6 @@
print --actual
<<<
= account =~ /Books/
= Books
Expenses:Taxes 0.05
Assets:Checking -0.05

View file

@ -1,6 +1,6 @@
bal assets
<<<
= account =~ /^Income/
= /^Income/
(Liabilities:Tithe) 0.12
~ Monthly

View file

@ -2,7 +2,7 @@ reg --color --force-color
<<<
N $
= account =~ /^Expenses:Books/
= /^Expenses:Books/
(Liabilities:Taxes) -0.10
~ Monthly

View file

@ -2,7 +2,7 @@ entry 2009/03/15 book 10
<<<
N $
= account =~ /^Expenses:Books/
= /^Expenses:Books/
(Liabilities:Taxes) -0.10
~ Monthly