Bug 797390 - xaccAccountRecomputeBalance also tallies no-closing balances

Add a few API, enough for fixing bug 797326 easily.
This commit is contained in:
Christopher Lam
2019-09-04 21:11:10 +08:00
parent d881130a19
commit 198570d8c8
6 changed files with 156 additions and 4 deletions

View File

@@ -595,12 +595,19 @@ gnc_numeric xaccAccountGetProjectedMinimumBalanceInCurrency (
const Account *account, const gnc_commodity *report_commodity,
gboolean include_children);
/* This function gets the balance as of the given date, ignoring
closing entries, in the desired commodity. */
gnc_numeric xaccAccountGetNoclosingBalanceAsOfDateInCurrency(
Account *acc, time64 date, gnc_commodity *report_commodity,
gboolean include_children);
/* This function gets the balance as of the given date in the desired
commodity. */
gnc_numeric xaccAccountGetBalanceAsOfDateInCurrency(
Account *account, time64 date, gnc_commodity *report_commodity,
gboolean include_children);
gnc_numeric xaccAccountGetNoclosingBalanceChangeForPeriod (
Account *acc, time64 date1, time64 date2, gboolean recurse);
gnc_numeric xaccAccountGetBalanceChangeForPeriod (
Account *acc, time64 date1, time64 date2, gboolean recurse);
@@ -1504,6 +1511,7 @@ const char * dxaccAccountGetQuoteTZ (const Account *account);
#define ACCOUNT_SORT_REVERSED_ "sort-reversed"
#define ACCOUNT_NOTES_ "notes"
#define ACCOUNT_BALANCE_ "balance"
#define ACCOUNT_NOCLOSING_ "noclosing"
#define ACCOUNT_CLEARED_ "cleared"
#define ACCOUNT_RECONCILED_ "reconciled"
#define ACCOUNT_PRESENT_ "present"