This is basically part of the software that I made for Fiscalpro in my Thesys when college.
It was built on the top of the database which it also has a set of stored procedures and functions that perform must of the data processing. There were two clients; an admin client built in Visual C++ and an e-cart module in PHP.
I honestly must say I only prefer to show the database because the two clients were not that well built, at least that is what my experience says.
Most of the code, I mean names, comments and more, is in spanish. I hope you can understand anyway. Additionally, the code is old and it currently have some errors that I hope to solve when I can.