Javascript calculator for total cost of items after sale.