Commit Graph

1 Commits

Author SHA1 Message Date
Christopher Lam
73822f97a9 [1/2][Scrubbudget.c] use heuristics to scrub budget signs
If book has budgets, and GNC_FEATURE_BUDGET_UNREVERSED isn't set,
check and fix budget amount signs. Previously budgets were created
with assumption that sign reversal was set to credit amounts. A
heuristic approach is used:

- if budgeted expense is negative, conclude sign reversal is
"Income and Expense"

- if budgeted liability is positive, conclude sign reversal is
"None"

- otherwise conclude sign reversal is "Credit Accounts"

The above is calibrated to (hopefully) prefer sign reversal of Credit
Accounts.
2021-12-03 17:40:21 +08:00