I have an expense management system for monthly expenses. Expenses are of two types: one-time monthly expenses, and daily expenses for each day of month. I have created the following tables:
setupExpenses (ExpenseID, Title, IsDaily)
ExpenseMaster (ExpenseMasterID, Month, EmployeeID)
ExpenseDetails (ExpDetID, ExpenseMasterID, ExpenseID, Date, Amount)
ExpenseDetailsDaily(ID, ExpDetID, Date, Amount)
if isdaily
is true
in setupExpenses
then an entry is made in the 3rd table otherwise I have entries in the other two transaction tables. Any better suggesstion is appreciated. This design doesn't feel right to me.
ExpenseDetails
? It seems odd to have an expense detail with a date that is effectively a master for daily details with their own dates. Is there also a category or account that might be helpful in indicating which details only occur once per month? When you populate a new month fromsetupExpenses
do you generate rows for all of the days in the month (forIsDaily
expenses) with theAmount
set to zero?