DarkNormal / Airgead

0 stars 0 forks source link

Setting account balance takes transactions into consideration #4

Closed DarkNormal closed 7 years ago

DarkNormal commented 7 years ago

Commit https://github.com/DarkNormal/Airgead/commit/a5819eb450e15b147cf494212be26b5d9e339f55 - issue where updating the current account balance in SetupAccountActivity.java is not inserting to the Database. This is due to the NOT NULL entry missing from the ContentValues object.

DarkNormal commented 7 years ago

no longer an issue, but the usage of this Set Balance feature needs a review.

Account Balance should be set initially - with no other income / expenses to affect it.

If this balance is set after there are other expenses / income, then the balance should be set and the other transactions not applied to this new balance - i.e if I set the balance to 5k, it should be 5k, not 5k minus a previous transaction

DarkNormal commented 7 years ago

Commit f2bc772 addresses this issue, but makes another issue! All transactions are assumed to be income, so updating the balance on the DB always adds the amount to the balance. Small issue to be fixed

DarkNormal commented 7 years ago

Expense amounts are now deducted from the balance figure rather than adding them as income