Calculation of tax and total cost