diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-18 02:16:41 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-18 02:25:14 -0500 |
commit | 47d7f5a43b286b3c736e21480d84caf75cea885f (patch) | |
tree | e28c3162c6628fbe6a0621e246799744b362d5a3 /src/annotate.cc | |
parent | f9088f88360019bb4be8743dd8091036502adb9c (diff) | |
download | fork-ledger-47d7f5a43b286b3c736e21480d84caf75cea885f.tar.gz fork-ledger-47d7f5a43b286b3c736e21480d84caf75cea885f.tar.bz2 fork-ledger-47d7f5a43b286b3c736e21480d84caf75cea885f.zip |
Fix problem with -H and lack of pricing info
Fixes #691
Diffstat (limited to 'src/annotate.cc')
-rw-r--r-- | src/annotate.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/annotate.cc b/src/annotate.cc index 2b118e76..25f0e582 100644 --- a/src/annotate.cc +++ b/src/annotate.cc @@ -56,6 +56,7 @@ bool annotation_t::operator<(const annotation_t& rhs) const return true; if (price->commodity().symbol() > rhs.price->commodity().symbol()) return false; + if (*price < *rhs.price) return true; if (*price > *rhs.price) return false; } @@ -68,9 +69,12 @@ bool annotation_t::operator<(const annotation_t& rhs) const if (*tag > *rhs.tag) return false; } if (value_expr) { + DEBUG("annotate.less", "Comparing (" << value_expr->text() + << ") < (" << rhs.value_expr->text()); if (value_expr->text() < rhs.value_expr->text()) return true; - if (value_expr->text() > rhs.value_expr->text()) return false; + //if (value_expr->text() > rhs.value_expr->text()) return false; } + return false; } |