Transfer of funds between user Accounts

1
Hi.. I have this application I am developing. Which has several user accounts. And each user has financial funds. For example I have one user role named "Supervisor" and another user role named "Director". Now I have done and got to work the Funds Issue system based on the user roles, by using an association to the system. Accounts To the funds entity. The Funds entity stores the funds as a decimal value to each associated username. And a microflow is used to deduct the expenses which is also stored in an entity called "Expenses" that each user name does and the ending balance is stored in another entity called "TotalBalance"   But what I now need is to transfer an amount from one username to the other username. What I need is to have a form which has a reference selector which a Username can be selected to select transfer funds from. And another reference selector which selects the transfer funds to.  And a textbox to type the transfer amount. From what I understand, I should use a separate entity called "transfers".  and use a microflow to deduct the saved transfer amount of the entity called "Transfers", from the funds giver. And I should use the same saved transfer amount to Add funds to the receiver??? Any help? I would appreciate a model share or screen shot if it is possible..   Thanks
asked
1 answers
3

The transfer object is fine.

  1. Transfer should have to associations Transfer_ToAccount, Transfer_FromAccount
  2. Add a status to it: planned/done. (Default 'planned')
  3. Create button transfer money on fund or account.
  4. Add a microflow to the button: Create transfer, and set Transfer_FromAccount to current account
  5. Open a page with Reference set to (Transfer_ToAccount), Amount and button 'Transfer money'
  6. Add a microflow 'TransferMoney' to button,
    1. Add validations (account selected, money filled in, fund enough), quit if error.
    2. Retrieve fund fromAccount and toAccount, change both funds
    3. Set status to done
    4. Close page.
    5. Add log line to both funds to see changes or associae transfers to funds

 

See this for a demo project

answered