fixed bug on total_due_amount