diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-06 02:52:14 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-06 02:52:14 -0400 |
commit | 4a0f5f9034dc24c7ae5f0464d407f4cf2279558b (patch) | |
tree | b7a4fa4659d366b34e8ecb25267ec2ea9c11f93c /src/textual.cc | |
parent | 80c51bf0a524ed80c0c248374a75e7fc392e1a3d (diff) | |
parent | aff490534a8e7826d89bbc75c6885b4a6bff4d17 (diff) | |
download | fork-ledger-4a0f5f9034dc24c7ae5f0464d407f4cf2279558b.tar.gz fork-ledger-4a0f5f9034dc24c7ae5f0464d407f4cf2279558b.tar.bz2 fork-ledger-4a0f5f9034dc24c7ae5f0464d407f4cf2279558b.zip |
Merge branch 'next'
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/textual.cc b/src/textual.cc index 1c3bcb02..3652176a 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -1013,25 +1013,24 @@ post_t * instance_t::parse_post(char * line, DEBUG("textual.parse", "line " << linenum << ": " << "POST assign: parsed amt = " << *post->assigned_amount); - account_t::xdata_t& xdata(post->account->xdata()); - amount_t& amt(*post->assigned_amount); + amount_t& amt(*post->assigned_amount); + value_t account_total(post->account->self_total(false)); DEBUG("post.assign", "line " << linenum << ": " - "account balance = " << xdata.self_details.total); + "account balance = " << account_total); DEBUG("post.assign", "line " << linenum << ": " "post amount = " << amt); amount_t diff; - switch (xdata.self_details.total.type()) { + switch (account_total.type()) { case value_t::AMOUNT: - diff = amt - xdata.self_details.total.as_amount(); + diff = amt - account_total.as_amount(); break; case value_t::BALANCE: if (optional<amount_t> comm_bal = - xdata.self_details.total.as_balance() - .commodity_amount(amt.commodity())) + account_total.as_balance().commodity_amount(amt.commodity())) diff = amt - *comm_bal; else diff = amt; |