I'm using Python/Django, but this is more about the "data model" and how I interact with the information - I really just want to know if I'm crazy here.
I'm working on a small app at my company (~55 employees) that will keep track of available Vacation/Sick time. Part of the purpose is to integrate "self-service" into our intranet, so that employees can submit "Time Off Requests" electronically, instead of filling out and handing in paper to HR.
Obviously, this app needs to keep a running balance per employee, and will be validating that the employee has enough Vacation remaining for whatever they're requesting.
Like with financial/accounting software, I know that I shouldn't necessarily be storing float values, or just keeping a single running balance.
My idea is to use a database table structure like the following to store time "credits" and "debits":
Employee | Year | Credit/Debit | Amount | Timestamp
'Year' would be the year to which the credit/debit belong, because Vacation and Sick time are handled on a yearly basis, not on a running balance per employee.
To determine the employees available Vacation/Sick time, I would get the 'transactions' for the employee for the given year, and find the balance.
I know I'm leaving out lots of information, but I was wondering: Does this seem like a reasonable way to go about this, being as that it needs to be very accurate, or am I completely over-complicating this?