-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(proposal) Server utility for finding beginning balance for an account. #1636
Labels
Comments
jniles
added a commit
to jniles/bhima
that referenced
this issue
May 11, 2017
This commit builds a new feature for accounts that can discern their opening balance (from the General Ledger) given a date and account id. The major changes have been added in an "AccountExtra" file that should be merged into accounts/index.js as soon as the major refactoring is finished. This PR consists of two parts: the updated account report that now contains an opening balance and the utility to find the opening balance give a particular date and account_id. Closes Third-Culture-Software#1611. Closes Third-Culture-Software#1636.
4 tasks
jniles
added a commit
to jniles/bhima
that referenced
this issue
May 19, 2017
This commit builds a new feature for accounts that can discern their opening balance (from the General Ledger) given a date and account id. The major changes have been added in an "AccountExtra" file that should be merged into accounts/index.js as soon as the major refactoring is finished. This PR consists of two parts: the updated account report that now contains an opening balance and the utility to find the opening balance give a particular date and account_id. Closes Third-Culture-Software#1611. Closes Third-Culture-Software#1636.
jniles
added a commit
to jniles/bhima
that referenced
this issue
May 22, 2017
This commit builds a new feature for accounts that can discern their opening balance (from the General Ledger) given a date and account id. The major changes have been added in an "AccountExtra" file that should be merged into accounts/index.js as soon as the major refactoring is finished. This PR consists of two parts: the updated account report that now contains an opening balance and the utility to find the opening balance give a particular date and account_id. Closes Third-Culture-Software#1611. Closes Third-Culture-Software#1636.
jniles
added a commit
to jniles/bhima
that referenced
this issue
May 23, 2017
This commit builds a new feature for accounts that can discern their opening balance (from the General Ledger) given a date and account id. The major changes have been added in an "AccountExtra" file that should be merged into accounts/index.js as soon as the major refactoring is finished. This PR consists of two parts: the updated account report that now contains an opening balance and the utility to find the opening balance give a particular date and account_id. Closes Third-Culture-Software#1611. Closes Third-Culture-Software#1636.
sfount
pushed a commit
that referenced
this issue
May 23, 2017
This commit builds a new feature for accounts that can discern their opening balance (from the General Ledger) given a date and account id. The major changes have been added in an "AccountExtra" file that should be merged into accounts/index.js as soon as the major refactoring is finished. This PR consists of two parts: the updated account report that now contains an opening balance and the utility to find the opening balance give a particular date and account_id. Closes #1611. Closes #1636.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To completed the work on #1635, we need to have a way to get the beginning balance for any give date.
Proposal
I propose we write a server utility that can be tested as a standalone. It will be in
server/controllers/finance/accounts.js
calledgetOpeningBalanceForDate(accountId, date)
. It should return a number - the balance of the account. The usage pseudocode would be like this:Implementation Algorithm
Internally, this function must do two things:
period_total
table. First, look up the fiscal year:Then, find all the period totals for this fiscal year and account.
Then we can find the balance for this period up to today:
Finally, we return the result of 1) + 2) as the final result!
@IMA-WorldHealth/bhima-core what do you think?
The text was updated successfully, but these errors were encountered: