Double entry system accounting

Dear Gliders,

I am new to glide and automatic my business needed. I am creating a app to manage cash in cash at different business locations. I want to create this system according to double entry system of accounts. If we debit one account the other one is automatically credit. I want to relate it like if we edit one account, the other one is automatically edited.

I was able to create it using 2 tables and use add row custom action but this is not auto updating when modifying. Also, we would need to create as many table as there are accounts. 1 table of each account which is not practical.

Also we need to make a account wise statement showing debit and credit entry and finally balance column showing remaining net balance.
I want to make it like this so that in future i can connect my orders and sales app to get balance pending from each customer and send them payment reminders. That all is a story of another development that I will work in future.

Current requirement is to find a solution to this accounting app.

I think you could have one transaction log table with a column for each party. A Sender ID and a Receiver ID. Then use Relation columns to link the user table to the transaction log table and Rollup columns to get the amount sent or received.