diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 21:09:57 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-07-14 21:09:57 -0400 |
commit | 3f9fc276d3a802ebdd3c694029d56b948fecb841 (patch) | |
tree | 08ffacae3c1d72251d8ba25a446c5ea10140f40f /src/print.cc | |
parent | 511b17a21f79bbb19fe151402b07e3d0cc3948ec (diff) | |
parent | b88634206402814f63ba8db192e52d3e3bec2b38 (diff) | |
download | fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.tar.gz fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.tar.bz2 fork-ledger-3f9fc276d3a802ebdd3c694029d56b948fecb841.zip |
Merge pull request #310 from tbm/712-713-costs
Change the definition of cost
Diffstat (limited to 'src/print.cc')
-rw-r--r-- | src/print.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/print.cc b/src/print.cc index 9be3b511..54cfa578 100644 --- a/src/print.cc +++ b/src/print.cc @@ -243,7 +243,7 @@ namespace { amtbuf << string(2 - (slip + amt_slip), ' '); amtbuf << amt; - if (post->cost && + if (post->given_cost && ! post->has_flags(POST_CALCULATED | POST_COST_CALCULATED)) { std::string cost_op; if (post->has_flags(POST_COST_IN_FULL)) @@ -254,10 +254,10 @@ namespace { cost_op = "(" + cost_op + ")"; if (post->has_flags(POST_COST_IN_FULL)) - amtbuf << " " << cost_op << " " << post->cost->abs(); + amtbuf << " " << cost_op << " " << post->given_cost->abs(); else amtbuf << " " << cost_op << " " - << (*post->cost / post->amount).abs(); + << (*post->given_cost / post->amount).abs(); } if (post->assigned_amount) |