php / sqlite / js cash register