Calculate total amount and remaining amount
Merge pull request #3 from HenrykChiu/calculate_total_amount_and_remaining_amount

Calculate total amount and remaining amount