skip to Main Content

PHP Cash RegisterA friend of ours asked if we could program a “Point of Sales” or “POS machine” for their grocery located in Valenzuela.

It was a while since we programmed using those archaic RDBMS’s that used the “.dbf” database formats.  We were adept in using dBase III Plus but we had no working copy anymore.  And we looked to studying Visual FoxBase or Visual FoxPro but it would take a longer time.   We only had two weeks to finish the project so we decided to create the whole “POS machine” using PHP/MySQL..

Setting up for this project we downloaded XAMPP to install the server on their computer. The installer is a total package,  in effect, it installed Apache (the server itself) and MySQL (the database).

Coding the project took us about two weeks.  The hardest thing we encountered was making the cash register open and the printer for printing the receipts. The bar code scanner was plug and play.  We had to find a way to connect the server to the hardware. We found a PHP Function specific for this but only operational on the local computer these components were connected to.  On a wider real-world application, this functionality will not function due to security loopholes.  Anyway, this function, worked well with DOS ESC Code Sequences, in the olden days, these were what we toyed around with to increase the font size, compress font, etc.

Most products found in the market today had their very own bar code.  We scanned each and every product to create a database of all the products.  We used an open-source program for creating bar codes for items that had none.

When we turned over the program and hardware. The sequence that follows after receiving payment was 1) print out of receipt and 2) automatic opening of the cash drawer.

This project was made somewhere around 2005 and up to this day, they are still using the system.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top