Add totals calculations for contracts