htmfilho / minimily

Use Minimily to organize your minimalist life.
https://www.hildeberto.com/minimily/
GNU General Public License v3.0
8 stars 0 forks source link

Calculate the Total income in a Period of Time #22

Open htmfilho opened 5 years ago

htmfilho commented 5 years ago

The Total Income is the sum of all credit transactions in all accounts of the user, or the family, during a period of time.

To calculate the total income, the function requires the family and the period of time. For each member of the family, get the list of accounts. For each account, get the list of credit transactions that are not originated from a transfer. return the sum of the amounts.

keniasousa commented 5 years ago

I read it, I agree. Not a transfer so it does not count the kids savings as income.

htmfilho commented 5 years ago

Yes. When we move money from an account to another, there is a debit transaction in the first account and a credit transaction in the second account. Those credit transactions indicate just the movement of money from an account to another. All other credit transactions are different types of income from different sources.