Renamed two methods, for consistency's sake
This commit is contained in:
parent
ab433d28e0
commit
07cca71893
4 changed files with 10 additions and 10 deletions
|
|
@ -179,11 +179,11 @@ namespace {
|
|||
}
|
||||
|
||||
value_t get_amount(account_t& account) {
|
||||
return VALUE_OR_ZERO(account.self_total());
|
||||
return VALUE_OR_ZERO(account.amount());
|
||||
}
|
||||
|
||||
value_t get_total(account_t& account) {
|
||||
return VALUE_OR_ZERO(account.family_total());
|
||||
return VALUE_OR_ZERO(account.total());
|
||||
}
|
||||
|
||||
value_t get_subcount(account_t& account) {
|
||||
|
|
@ -377,7 +377,7 @@ account_t::xdata_t::details_t::operator+=(const details_t& other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
value_t account_t::self_total(const optional<expr_t&>& expr) const
|
||||
value_t account_t::amount(const optional<expr_t&>& expr) const
|
||||
{
|
||||
if (xdata_ && xdata_->has_flags(ACCOUNT_EXT_VISITED)) {
|
||||
posts_list::const_iterator i;
|
||||
|
|
@ -402,19 +402,19 @@ value_t account_t::self_total(const optional<expr_t&>& expr) const
|
|||
}
|
||||
}
|
||||
|
||||
value_t account_t::family_total(const optional<expr_t&>& expr) const
|
||||
value_t account_t::total(const optional<expr_t&>& expr) const
|
||||
{
|
||||
if (! (xdata_ && xdata_->family_details.calculated)) {
|
||||
const_cast<account_t&>(*this).xdata().family_details.calculated = true;
|
||||
|
||||
value_t temp;
|
||||
foreach (const accounts_map::value_type& pair, accounts) {
|
||||
temp = pair.second->family_total(expr);
|
||||
temp = pair.second->total(expr);
|
||||
if (! temp.is_null())
|
||||
add_or_set_value(xdata_->family_details.total, temp);
|
||||
}
|
||||
|
||||
temp = self_total(expr);
|
||||
temp = amount(expr);
|
||||
if (! temp.is_null())
|
||||
add_or_set_value(xdata_->family_details.total, temp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,8 +222,8 @@ public:
|
|||
return *xdata_;
|
||||
}
|
||||
|
||||
value_t self_total(const optional<expr_t&>& expr = none) const;
|
||||
value_t family_total(const optional<expr_t&>& expr = none) const;
|
||||
value_t amount(const optional<expr_t&>& expr = none) const;
|
||||
value_t total(const optional<expr_t&>& expr = none) const;
|
||||
|
||||
const xdata_t::details_t& self_details(bool gather_all = true) const;
|
||||
const xdata_t::details_t& family_details(bool gather_all = true) const;
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ namespace {
|
|||
|
||||
DEBUG("post.account_amount", "Found account: " << account->fullname());
|
||||
|
||||
value_t total = account->self_total();
|
||||
value_t total = account->amount();
|
||||
if (total.is_null())
|
||||
return 0L;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -981,7 +981,7 @@ post_t * instance_t::parse_post(char * line,
|
|||
<< "POST assign: parsed amt = " << *post->assigned_amount);
|
||||
|
||||
amount_t& amt(*post->assigned_amount);
|
||||
value_t account_total(post->account->self_total(false)
|
||||
value_t account_total(post->account->amount(false)
|
||||
.strip_annotations(keep_details_t()));
|
||||
|
||||
DEBUG("post.assign",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue