[FIX] point_of_sale: rounding error in discount computing + removing duplicated code