mexiwithacan
I think I'm suffering from some kind of designer's block, I think. I'm trying to design what I think is a very simple website, but I keep running into barriers in how to implement the related functionality.
Here's the general idea:
I can't think of a good way to keep track of the daily balances for each account so that the user can look back and see a historical trend of his or her spending.
My current thought on implementation is to have the following tables:
I have a ledger_date field in users that dictates the first date for which each account should have a balance. The trouble I'm having is what to do when the user updates his ledger_date. To succeed, the update must have the following features:
Do I implement the validation and cascaded updates/deletions in JS, PHP or SQL? Sigh... I'm going to play Guilty Gear for a while and come back to this.
Here's the general idea:
- A user creates a user account on the site.
- The user then can create expense accounts to use in tracking personal expenditures.
- The user is able to log personal transactions, itemizing each transaction by assigning a portion or all of the transaction amount to specific expense accounts.
I can't think of a good way to keep track of the daily balances for each account so that the user can look back and see a historical trend of his or her spending.
My current thought on implementation is to have the following tables:
- users
- accounts
- balances
- transactions
- transaction_amounts
I have a ledger_date field in users that dictates the first date for which each account should have a balance. The trouble I'm having is what to do when the user updates his ledger_date. To succeed, the update must have the following features:
- Validate that the new date does not put existing transactions "in the past".
- Delete old balances that don't mean anything anymore.
Do I implement the validation and cascaded updates/deletions in JS, PHP or SQL? Sigh... I'm going to play Guilty Gear for a while and come back to this.
