Added the missing process loan JS function