Point of sale application that can work online and offline