Created extension method for calculating the grand total.