From 6853464fd0c4a0428540edc635f1257cfb534bcd Mon Sep 17 00:00:00 2001 From: Christoph Dittmann Date: Sat, 9 Jun 2018 21:57:39 +0100 Subject: Make automated transactions work with assertions This fixes issue #1127. In my understanding, PR #552 was meant to fix this, but was incomplete. Without this patch, automated transactions are invisible to assertions. This patch fixes this by adding a flag to the account to tell it that there is a new posting, analogous to the behavior of finalize(). I dug up issue #1127 too late to find that this is the same solution proposed by @tbm. Although I wrote this independently, credit goes to Martin Michlmayr (@tbm). --- test/regress/1127.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/regress/1127.test (limited to 'test') diff --git a/test/regress/1127.test b/test/regress/1127.test new file mode 100644 index 00000000..905401f8 --- /dev/null +++ b/test/regress/1127.test @@ -0,0 +1,15 @@ +; Test that automated transactions are added to accounts soon enough +; for assertions to work. + += expr account =~ /^Assets/ + (Foo) 1 + +2018-06-09 Something + Assets $100 + Equity + +2018-06-09 Assert amount added by automated transaction + [Foo] = $100 +test bal Foo + $100 Foo +end test -- cgit v1.2.3