diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-14 02:40:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-14 02:40:09 -0400 |
commit | 6a82e12ab44ce21e0c56eda728fe3cc93d84d99c (patch) | |
tree | 8d2ce38a1ebe5c8b737fd861cad0786c53414fe9 /src/xact.cc | |
parent | 450cdb2b6df565a7a7d0b572d38de3f11859b1d1 (diff) | |
download | fork-ledger-6a82e12ab44ce21e0c56eda728fe3cc93d84d99c.tar.gz fork-ledger-6a82e12ab44ce21e0c56eda728fe3cc93d84d99c.tar.bz2 fork-ledger-6a82e12ab44ce21e0c56eda728fe3cc93d84d99c.zip |
get_amount should return the xdata value if the EXT_COMPOUND flag is on.
Diffstat (limited to 'src/xact.cc')
-rw-r--r-- | src/xact.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xact.cc b/src/xact.cc index 22dd1742..08089e5c 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -83,7 +83,12 @@ namespace { } value_t get_amount(xact_t& xact) { - return xact.amount; + if (xact.has_xdata() && + xact.xdata().has_flags(XACT_EXT_COMPOUND)) { + return xact.xdata().value; + } else { + return xact.amount; + } } value_t get_total(xact_t& xact) { |