Calculation of total purchases and sales tax