To calculate the edited price of the item

Hello,

I am stuck in the problem in which I am showing a row of item inside a Repeating Group. There is a Total price of all the items below the RG. Which is not giving me the correct value when user is editing the price.

I have added a functionality, by which user can edit the price of the item and put his/her negotiate price and check the total. In this way, the total price should change as per the updated price value added by the user.

I am not able to calculate the total amount of edited products value.
Check the picture below, the total amount is not right.

Could you provide a little more info about your DB, how it’s structured, what is happening when the user edits the price etc.