Showing entries 1 to 3
Displaying posts with tag: point of sale (reset)
banker’s round for mysql

for some reason, nobody has ever exposed the different rounding methods via mysql’s built-in ROUND() function, so if you want something different, you need to add it via a stored function. the function below is based on the T-SQL version here.

CREATE FUNCTION ROUND_TO_EVEN(val DECIMAL(32,16), places INT)
RETURNS DECIMAL(32,16)
BEGIN
  RETURN IF(ABS(val - TRUNCATE(val, places)) * POWER(10, places + 1) = 5 
            AND NOT CONVERT(TRUNCATE(ABS(val) * POWER(10, places), 0),
                            UNSIGNED) % 2 = 1,
            TRUNCATE(val, places), ROUND(val, places));
END;

use at your own risk. there may be edge conditions where this fails. but this matches up with the python and postgres based system i was crunching data from, except in cases where …

[Read more]
MySQL in a small town cafe

Via Ditesh:

Interesting aside: the bus stopped in a ${RANDOM} town in Johor for food, and at the cashier, I spotted the cashier using KC POS which had a prominent “Powered by MySQL” text and the Sakila logo. Very cool!

This was a small town coffee shop, using a cash register, powered by the mighty Sakila. Similar to the chain of restaurants, Old Town White Coffee.

The whole blog post from Ditesh itself is interesting, but knowing you can find MySQL just about anywhere, showing the ubiquity of the database, just makes you proud to know, you work at/on/with MySQL.

Point of Sale systems, and their back-ends

Old Town White Coffee is a place we’ve been hanging out a lot at. Its got wifi, power sockets, couches, good food and drink, great eye candy (bonus!), and is open till late.

Today, we found out that all their PCs that hold the orders (order{1,2,3,4}) have Samba shares. Open to all, naturally.

They use Crystal Reports. Have a custom front-end, with appropriate touch screen drivers, but the back-end is pretty stock. They use MySQL, Connector/ODBC 3.51.12 and also use SQLyog 5.30. I know the system is designed and deployed by NIT, it looks like their F&B POS.

Their use of MySQL (schema wise), includes using VIEWs, stored procedures and triggers (on UPDATE and DELETE).

I wonder how many point of sales systems are powered by open source software. This one runs Windows, but at least within the …

[Read more]
Showing entries 1 to 3