I am in the process of developing salon software and about to implement a point of sale feature.
What is the best way to organize and structure my tables?
My initial thought is to have a Sales table which has an id, date, subtotal, tax, tip, and total amounts. Then have a relational table with foreign keys to the Sale Id and Product / Service Id. The other option that’s crossed my mind is to have a Products column which contains a comma delimited list of the products for the sale.
Is there something I’m missing or better implementation? Any advice would be greatly appreciated.
Have you looked in to any of the open source shopping cart / pos of sale systems, their your best reference point for looking at how to develop such a system, looking at things such as:
These are just some of the factors that will affect your table design, my best advice having done a few of these carts in the past is look at how existing open-source system are storing their mysql data and building their apps as generally they’ve adjusted their application layouts accordingly.
In terms of your actual question your definantly on the right track, some resources definently worth looking at is magento – massive shopping cart / POS system when coupled with extensions, and maybe even take a look at gocart (a codeigniter opensource shopping cart) which looks quite promising and will definently be useful to see how the tables are structured (lot more simpler than magento).
Also worth taking a look at is a web based POS system that allowed offline mode access etc, but can’t remember its name for the life of me, will post when i remember.