diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-09 01:28:20 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-09 01:28:20 -0600 |
commit | c9f7195936090ecbe2d5b4ec88c196660ae24f81 (patch) | |
tree | 7bfbe9d00de44c0c79c460169ad324b6a17c6379 /src/py_commodity.cc | |
parent | 9f81c798ee0854cab038714670123bff6676a5d5 (diff) | |
download | fork-ledger-c9f7195936090ecbe2d5b4ec88c196660ae24f81.tar.gz fork-ledger-c9f7195936090ecbe2d5b4ec88c196660ae24f81.tar.bz2 fork-ledger-c9f7195936090ecbe2d5b4ec88c196660ae24f81.zip |
Added the notion of "virtual costs"
Diffstat (limited to 'src/py_commodity.cc')
-rw-r--r-- | src/py_commodity.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/py_commodity.cc b/src/py_commodity.cc index 25e5b918..c75b5e64 100644 --- a/src/py_commodity.cc +++ b/src/py_commodity.cc @@ -96,14 +96,15 @@ namespace { pool.exchange(commodity, per_unit_cost, moment); } - cost_breakdown_t py_exchange_5(commodity_pool_t& pool, + cost_breakdown_t py_exchange_7(commodity_pool_t& pool, const amount_t& amount, const amount_t& cost, const bool is_per_unit, + const bool add_prices, const boost::optional<datetime_t>& moment, const boost::optional<string>& tag) { - return pool.exchange(amount, cost, is_per_unit, moment, tag); + return pool.exchange(amount, cost, is_per_unit, add_prices, moment, tag); } commodity_t * py_pool_getitem(commodity_pool_t& pool, const string& symbol) @@ -280,7 +281,7 @@ void export_commodity() .def("exchange", py_exchange_2, with_custodian_and_ward<1, 2>()) .def("exchange", py_exchange_3, with_custodian_and_ward<1, 2>()) - .def("exchange", py_exchange_5) + .def("exchange", py_exchange_7) .def("parse_price_directive", &commodity_pool_t::parse_price_directive) .def("parse_price_expression", &commodity_pool_t::parse_price_expression, |