fix bugs calculate total sale