diff options
author | John Wiegley <johnw@newartisans.com> | 2004-06-22 01:48:16 -0400 |
---|---|---|
committer | johnw <johnw@newartisans.com> | 2004-06-22 01:48:16 -0400 |
commit | 48db20547ab04fd39525668b370187f84865fbc1 (patch) | |
tree | d3ac2600bfc1c00f0e21ed0f0aaa12dd6f07b2e0 /ledger.cc | |
parent | 7894005d28721f2971024a86739880599c222a79 (diff) | |
download | fork-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.cc | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |