Financial Transaction History / Available Balance Calc
Hi all
I'm trying to figure out the best way to model a financial transaction history on a per-customer basis. Right now I have a user table and a transactions table. All transactions for all customers are currently in the transactions table.
I want to have a running available balance calculated for each customer as each transactions posts. What's the best way to achieve this? A single column in the user table called 'available balance' that is updated as each transaction is added to the transactions table?
Thanks.
Answers
-
Actually no I don't think that will won't work as I want to keep track of the available balance as each transaction posts so I can show that to the customer in the front-end, sort of like the right-hand column below.
Based on some reading, I might need to add an available balance column to my transactions table AND a current available balance column to my user table. As each transaction posts the available balance as-of that transaction is calculated and stored with the transaction in the transactions table AND the current available balance is updated for the user. Would this work?
-
Anyone have any input please?
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback