The price calculation code for the pos