cost of sales formula south africa