update V197__updated_loan_running_balance_of_transactions.sql with a stored procedure

Added a stored procedure provided by vishwas to this upgrade.