javascript – I can not bring up the value of purchase in the field indicated

I need to create a script that divides the total value of the purchase and the split value appears in the Total Value field. I can not identify what's missing in my code

Value of purchase

plots

Total amount