summaryrefslogtreecommitdiff
path: root/ledger.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-06-22 01:48:16 -0400
committerjohnw <johnw@newartisans.com>2004-06-22 01:48:16 -0400
commit48db20547ab04fd39525668b370187f84865fbc1 (patch)
treed3ac2600bfc1c00f0e21ed0f0aaa12dd6f07b2e0 /ledger.cc
parent7894005d28721f2971024a86739880599c222a79 (diff)
downloadfork-ledger-48db20547ab04fd39525668b370187f84865fbc1.tar.gz
fork-ledger-48db20547ab04fd39525668b370187f84865fbc1.tar.bz2
fork-ledger-48db20547ab04fd39525668b370187f84865fbc1.zip
show re-pricing history in register report
Diffstat (limited to 'ledger.cc')
-rw-r--r--ledger.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/ledger.cc b/ledger.cc
index 31a369b0..5f5326a4 100644
--- a/ledger.cc
+++ b/ledger.cc
@@ -40,13 +40,12 @@ amount * commodity::price(std::time_t * when,
for (price_map::reverse_iterator i = history.rbegin();
i != history.rend();
- i++) {
+ i++)
if (std::difftime(*when, (*i).first) >= 0) {
age = (*i).first;
price = (*i).second;
break;
}
- }
extern long pricing_leeway;
time_t now = time(NULL); // the time of the query