M-Zuber / MyHome

Home finance management
MIT License
24 stars 19 forks source link

Why are there two types of transactions and two types of categories? #63

Closed Jared314 closed 9 years ago

Jared314 commented 9 years ago

There are two types of transactions (Income and Expense) and two categories of transactions (Income Categories and Expense Categories). I would have expected one type of transaction and one type of category.

Why did you choose to model it that way?

M-Zuber commented 9 years ago

The general answer is that this project was originally written by me and a few friends during our course. Since then I uploaded the code here and started to work on it.

M-Zuber commented 9 years ago

As far as changing the db or the code, I'll respond more in depth here after I finish work

M-Zuber commented 9 years ago

Changes to the Database:

I would leave the code alone for the most part - the main thing that would have to change is in the DAL. There would have to be a base class of Transaction -which is expanded by Expense and Income respectively.

What do you think?

M-Zuber commented 9 years ago

As for categories here is a sample of the data, that hopefully shows the differences between the two:

Income Categories:
--------------------------
Wifes Salary
Gift
Husband's Salary
Tutoring
General
Store Credit
Expense Categories:
----------------------------
Transportation
Food
Medicine
Clothes
Rent
School
General
Appliances
Books
House Ware
On the Way
Hygiene
Relaxation
Water & Electricity
Restaurant
Cosmetics
Telephones
Electronics
Jared314 commented 9 years ago

My point was that financial transactions are better modeled as a graph of entities (counterparties) and accounts that transfer money (and other assets) to other entities and accounts, inside transactions. You can then group / categorize the entities, accounts, methods, and payments in different ways (i.e. Rent, Food, Books) for reporting. An expense or income label is implicit in the source entity of a transaction, and is relative to which entity you are focused on.

That being said, what you have works.

M-Zuber commented 9 years ago

Thank you very much for the input. I would like to get back to this and consider it in depth, once some more of the other issues are taken care of.