Loans and Intrest rate calculations

Loans and Intrest rate calculations

  
I am having to set up my appliction to be able to handle a loan and have a balance. How I have it set it up now, the user would put in the Amout in Pawn Amount and the same amount into Balance when they created the record. Then I would like it to be able to imidetly caculate it and take that Balance and add in the intrest rate of 25%. I then need it to add the intrest rate of 25% again after 30 days. My question is how I could do this. I have attempted to do this by creating an action and then having that action in the Prepration of the list page. I is still giving me issues on this. As well, I don't know how I would set it up to repeate every 30 days. I will attach the .oml file I am working with.
My suggestion is you create an action to update every balance. This action should check the initial date of every loan and, if diffdays(loandate,current date) / 30 is an integer it updates your balance. Then you can make a daily timer to run this action.
To be safe, you probably should add some control variables to ensure that action can't be run several times in the same day.
Should I have the balance value stored in an entity or should I just have an expresion. I bevice I would need it in an entity as I have onther so if they pay an amount, it would subtract that amout from the balance.
I tried to make an action but I am unable to get it all linked together as it should be. I also though that it might not work as I need it to run every 30 days, and that date might be diffrent for each diffrent record. As well, I need it to be able to calcualte the balance (PawnAmount + 25% interest) automaticly. Then after 30 days it to add back to the balance 25% intrest, while having another entitly being able to subtract from that balance. So I would need to be able to have the next time the intrest would be calcutlated, it would get the amount by the remaning balance.