Skip to content

Commit

Permalink
also follow precision from balance assignment
Browse files Browse the repository at this point in the history
Fixes #2129
  • Loading branch information
kcwu authored and jwiegley committed Oct 11, 2024
1 parent d5c1735 commit 033759c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/textual.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ post_t * instance_t::parse_post(char * line,
ptristream stream(p, static_cast<std::size_t>(len - beg));

if (*p != '(') // indicates a value expression
post->assigned_amount->parse(stream, PARSE_NO_MIGRATE);
post->assigned_amount->parse(stream);
else
parse_amount_expr(stream, *context.scope, *post.get(),
*post->assigned_amount,
Expand Down
10 changes: 10 additions & 0 deletions test/regress/1654.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
2018/01/01 foo
Account = 10 USD
Equity

test balance
10 USD Account
-10 USD Equity
--------------------
0
end test
2 changes: 1 addition & 1 deletion test/regress/640D3205.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test print
Income:Somewhere

2008/12/31 * Interest
Assets:Brokerage $200.00 = $1000.00
Assets:Brokerage $200.00 = $1,000.00
Income:Somewhere
end test

0 comments on commit 033759c

Please sign in to comment.