changed document.getElementById('total_amount').value;

changed document.getElementById('total_amount').innerHTML; into changed
document.getElementById('total_amount').value;