add javascript tag
add total value of payments and new totalpayments method