📜 ⬆️ ⬇️

Development - "Workplace of the cashier" under LINUX. GPL

Latest news


The system operates at 15 cash registers. Subscribed. git here github.com/redeyser/IceCash . my mail here redeyser@gmail.com Video
www.youtube.com/watch?v=69AF7n6sxDY

Prehistory


It so happened that I work as a programmer / admin in a retail network. I have been working for two years, before that I have never come across the maintenance of specialized programs and equipment, but I figured out over time. A feature of my organization is that the bosses are not going to invest in a normal technique categorically. That is, it doesn’t smell anything like modernization, but it’s often necessary to rush to replace something that is again exhausted. In addition, most outlets do not have a license for the installed Windows XP operating system. At retail outlets there is one or two cash desks on the basis of computers dying of old age, the same old fiscal devices Shtrikh-M PRK, various bar code scanners (COM, USB, Keyboard) and METTLER TOLEDO weights. From the software, initially there was only a licensed (with a key) 1C v7.7 Shtrikh-M Kassir.

Implement Linux where possible


In addition to the responsibilities - to monitor the cash registers, there was an office and a remote branch on my shoulders with all 1C servers, hardware (also not new), servers. And something I hardly managed to serve all this at first. Honestly, I am a unicophile, so I hurried with the introduction of linux. Gradually, it was possible to transfer office clients to Linux, and immediately it became easier to breathe, the computers stopped getting overwhelmed with viruses, it remained only to monitor the hardware and select and install the necessary programs. The main work of the clients continued in Windows, but it was already a terminal on the server, it was easier with it. If possible, the server I also transferred to Linux, leaving only one with windows server 2003.
')

Windows at the checkout is an extra job for the admin.


At the cash register, viruses from flash drives often penetrated (music and games were constantly copied) and the operating system had to be changed periodically. Of course, the newly installed operating systems were banned from connecting external media, but it was not possible to reject the administrator user — the Shtrikh-M cashier program refused to work adequately. Local hackers-sellers constantly broke protection and recorded viruses, games, not licensed software on working computers! I do not know, maybe I did not have enough perseverance to eliminate all these troubles, but the idea arose to put linux and at the box office. There was a problem with the drivers for the fiscal registrar, a special program for loading the scales wanted to work exclusively under windows (and no wine!), And there was also no RMK program itself (Cashier's workplace).

DANCY KASSA under LINUX


After fumbling on the Internet, DENSI-KASSA was found. Cashier's workplace under linux. The program costs 1000r, which is quite reasonable. I try to put on ubuntu / debian, it seems to work. The problem with loading the scales was decided through loading via VPN from the server where windows is installed. After half a year of work at DENSI-KASSE, some experience has been gained. It did not suit me that the new keyboard scanners were buggy, and precisely because of the program itself. The program itself also fell out, although perhaps I was wrong about its compatibility with ubuntu. From version to version in the program, concepts changed and had to adapt to updates. The developers have declared free software code, but this code is not all open, and not quite fresh. Making your branch from DANCY-CASHI is just a pointless exercise, because it works with a closed PRK driver.
For me, the GPL means that the project must be completely OPEN, INCLUDING A JOINT DEVELOPMENT. There was a purely commercial project with an unfriendly collaborative design policy.
I don’t want to say that the guys are doing their job badly, but if they didn’t protect their intellectual property that way (as it seems to them as a guarantee of their commercial success), then the development would have gone much more efficiently.

Cash desk under LINUX, based on python driver SHTRICH-M GLP


On the sourceforge there was a gpl driver written in python by a certain Dmitry Shamov project on sourceforge . I signed with the author, he confirmed - the GPL project, do what you want with it. Encouraged, I figured such a scheme for a new client:
The fiscal registrar and database will be managed by a daemon with which you can communicate via a socket (even a simple telnet) using a simple API. This is in order to have direct access from the network to the most problematic equipment, as well as to be able to develop any kinds of customers and link them to this API. Thus, I’m not imposing my client’s interface, the method of registering sales and my other personal views on the process of registering sales. In addition, it is immediately possible to work with a single fiscalist of several clients, this is not necessary for me, but maybe someone will be useful. The database I chose mysql, with it easier. For tests, you can use the socket client directing requests from STDIN. All this should be written on a python, it is easier to refine and understand it, besides it is a lot of platform. I decided to make the client myself on WEB, that is, with the help of html + javascript + php. Of course, this will require a web server (apache2 is simpler again). This structure, in my opinion is simple for refinement, branches in the project and allows you to access the administration of the cash register in the form of a web page, without resorting to rdp, vnc, ssh (although this will not be superfluous)

What happened


Now the testing phase is already true, there’s a lot of work and I don’t manage to test everything properly. Actually, what happened, I liked it. It works quickly, I wrote the fiscal software in the driver for check sections, technological resetting, opening a cash drawer. The daemon frank does unload transactions, download the price list and discount cards in the HATCH-M file format. Visual selection of goods, discount cards, works in registration mode both from visual buttons and from the keyboard. The OS took debian 6, without the gnome, just installed IceWM, did an autorun of the X session, added a minimum of programs, except mandatory (mysql, apache, php, ...) installed ssh, openvpn, x11vnc, samba, pidgin (on your jabber-server ), a simple browser. I unrolled this whole thing on a flash drive and test it directly on it, since I suppose not to use a hard disk - they are expensive now, and the old ones are not reliable. The system itself occupies 1.4GB, so even a 2GB flash drive will enter. The exchange with back office I had already been implemented through a socket client, which only corrected a bit. Features of interaction with back office: communication via a modem or dedicated line through a VPN. The scales are connected via the network via the second network card, the port for loading the scales is sent by the firewall at the checkout. Soon going to install on retail outlets. I will post my project on sourceforge as soon as I test everything. the project will be called IceCash. In general, I saw other drivers on sourceforge, to other fiscal registrars, but for me it was enough to implement the functionality of the BAR-M PRK.

I wrote this article in the hope that there will be people interested in such a project, ready to refine the project for their tasks, because my ideological goal is to create a cashier’s workplace with really open code, with the possibility of joint development. Any opinions of Habrakhabrovtsev on this issue will also be interesting.
Thanks for attention.

Source: https://habr.com/ru/post/146170/


All Articles