How I integrated POS-terminal and FR IKKM-Touch in 1C: enterprise

image

A step-by-step instruction will answer most of the questions on connecting a 2in1 device to a 1C platform (even if it doesn’t answer all, we will gladly analyze the rest in the comments), show possible connection options and modes, drivers and the necessary software under the cut.

The original article in my performance on this subject is already on the Internet, and this option was rewritten and finalized specially for Habr’s readers in compliance with the rules (I hope I didn’t break anything). So…

Interaction of cash equipment with 1C platform


Before proceeding directly to the connection, we will analyze the possible options for operating modes, there are only two of them: offline data exchange and online exchange.

When OFFLINE exchange


An intermittent, periodic exchange occurs. The base of stock and prices from 1C is unloaded into the device.

image

The courier, for example, takes the machine and goes to the field on orders, handing out fiscal checks to customers and accepting cash and bank cards for payment. After the end of the working day, the employee returns to submit the report and money, the device connects to the local network of the enterprise and uploads the results of the work shift (retail sales report, see the figure below).

image

Classics of the genre-ONLINE exchange


This is a permanent link of the cash register equipment to the accounting system, the device is always installed at the cash register, while there is no need to upload the entire range of items and prices to it, all data is taken from 1C over the network. This mode of operation of cash register equipment can be found in any of the modern supermarkets.

And a couple more things before starting integration


Since the device is both a cash register and at the same time an acquiring terminal, in the case of ONLINE exchange to the 1C platform, it clings to two different drivers (like two separate devices).

We will integrate using:
fiscal registrar driver version 1.9 for 1C platform 8.3
acquiring terminal driver version 1.9 for the same platform
OFFLINE IKKM Exchange 1.6 data exchange software

Integrate with OFFLINE exchange


Unpack the iKKMExchange.rar archive at the link above to a convenient place.

image

Run the createINI.bat script , and the Settings.ini settings file is created. We ’ll

image

dwell on the settings by opening Settings.ini in any text editor:

image

“Log”: “off” - application operation log is disabled by default.

RecNumLim: 2500 max. number of Stock Keeping Unit (SKU) in the stock base. 2500 is the default digit.

"IPPort": port 8082 on which exchange will be made with 1C.

"Cash": 0, "Bank": 1, "Tara": 2, "Credit": 3 - these are the parameters that should be identical on the 1C side of the platform.

Cash-sign indicates cash withdrawal.

Bank - indicates acceptance of payment by bank card.

Tara - indicates the reception of containers. The sign is used as discount accounting, in the current loyalty system, etc.

Credit - credit designation.

In order for the exchange to proceed correctly, it is necessary to verify and correct the signs by their names and identifying numbers on the 1C side.

We make changes at our discretion, save the file.

After the settings, you can run iKKMExchange.exe. After a successful start, the icon of the same name will appear in the taskbar of the desktop.

image

We proceed to the configuration on the side of the integrated IKKM device


To do this, go to the “Device Settings” item in the device , then to “Import” , in the window that opens, perform the procedures shown in the video below:



As you can see in the video tutorial, in the “Connection Setup” window , you need to pay special attention to filling in two lines: “HTTP Product Directory” and “HTTP Document Log” .

Both links begin with the IP address of the PC, where we will integrate, then the connection port (which we specified in Settings.ini earlier ) is registered , after the slash the command remains unchanged.

Thus, the reference link string will look like this:
192.168.0.11:8082/GetPriceList taking into account the default connection port.
And the line of the document journal is:
192.168.0.11:8082/SalesReport

To make changes to the lines, you need to call the virtual keyboard on the device’s screen by pressing the physical button on the device with the “up arrow” icon, it is located in the lower left corner of the device.

It may happen that during the setup process you find inactive drop-down lists on the “Import Setup” tab , which makes it impossible to carry out further integration. This indicates an outdated firmware of the device, updating the firmware to the latest version will correct the situation.

image

Now back to the folder with the IKKMExchange application .

If the settings on the side of the device are made correctly, then the first interaction with the PC via the network will create an internal subfolder, the name of which will be the registration number of the connected IKKM device. All exchange data for a specific device will take place in this folder.

image

Data exchange occurs through the REST API . A successful exchange in the folder will look like this:

image

OFFLINE setting on the 1C side


We are setting up a new exchange rule with connected equipment.

image

In the window “Settings of the connected equipment” you need to set the corresponding checkbox, then we will go to the link “Rules for the exchange with connected equipment” .

image

We will create a new exchange rule with the name and warehouse for the unloading of commodity items, we will also indicate the parameters by which the goods will be selected for unloading in the "Selection" field .

image

When you click on “Refresh” in the “Price List” tab , we observe the filling of the tabular section below with commodity items according to the selection. Column "SKU"contains the code of each product in the list, with the help of which it will already be possible to easily find the necessary nomenclature on the device. If some products in the list do not contain the SKU code, it is better to create it using the "Generate SKU" key . Save the changes.

image

Now you need to associate the created rule with the equipment, for this we’ll return to the “Configuring connected equipment” window , click the link “Connected equipment” .

image

We select the appropriate type of equipment, click on "Create" , in a new window you need to specify the driver, the exchange rule that we created earlier, the serial number of the device can be specified, but not required.

image

We will carry out additional settings of the connected equipment by clicking
“Configure” in the same window .
“Exchange format version” - 1.6 from the drop-down list.
“ Unload directory ” - the path to the folder with the serial number of the equipment in the iKKMExchange directory.
“Name of the settings file” - prescribe “Settings” .
“Max price list file” - you need to register “PriceList” .
“Download directory” - the path is similar to the upload directory.
“Name of the sales report file” - indicate “SalesReport” .
Save the changes and exit.

image

A few steps earlier, I noted the signs of the teams that we examined in the Settings.ini document , now we have to duplicate them already in the 1C accounting system.

We go to the section, as shown in the figure below:

image

By the "Create" button, a window for adding new cash register equipment to 1C opens.

The first item is the indication of the correct workplace.

Second, you can specify the serial number of KKM, this is an optional condition.

The third paragraph - selects the previously created equipment settings “KKM Offline”

In the “Correspondence of wage types” (fourth paragraph in the figure) we indicate the name and set the identification values ​​from Settings.ini

image

Save the changes and move on to the last configuration step.

We’ll check how the data will be downloaded from 1C to the folder in IKKMExchange corresponding to the device, go to the necessary 1C section:

image

Provided that the previous setup operations are performed correctly and the correct warehouse is selected, as well as the upload rule, our offline equipment is displayed in the window. Click "Unload" .

image

Unloading will occur in the folder with the serial number of your KKM.

image

If you open Settings.xml, you can find the payment codes that we set earlier.

image

Setting OFFLINE sharing is complete.

If you have installed the latest version of the 1C: retail configuration, the automatic exchange function will also be available to you.

image

Configure ONLINE sharing


To prevent the article from turning into a two-volume, a demonstration of the ONLINE exchange settings will be shown on the example of IKKM, as a fiscal registrar. The process of setting up an exchange with the banking part of the device (like an acquiring terminal) looks similar. The example uses the “1C: trade management” configuration, the installation process on other configurations will be slightly different due to the features of the interface, but the principle is preserved.

First, you need to install the driver.

In the window of the item “RMK and equipment” , we find the link “Connected equipment” and click on it.

image

Go to the "Hardware Drivers" tab , then click on the button "Add a new driver from the file . "

image

Download the archive with the driver, laid out in the article above, and open it.

image

image

The first driver download produces an error. To continue the integration, you just need to retry the installation attempt, and the second time the driver will be successfully installed.

image

image

Half the way to configure ONLINE exchange has been completed, go to the tab “Connect and configure equipment” , the type of equipment to be connected is “Fiscal registrars” , click “Create” . From the drop-down list, select iKKM.

image

image

After clicking on “Configure” , the window of the parameters of the equipment we have chosen opens, where you should pay attention to the print parameter of the printer “Number of characters per line”: for the built-in printer in iKKM (paper width 57mm), the standard parameter (twenty-four characters) is suitable, if you connect an external printer (80mm and above), you can use other values ​​(thirty-six, forty-eight characters).

In the “IP address” item , you need to specify ip without adding the port of an iKKM device on the network, after setting it with a static address through a router.

“Where will we store the API key” - a point where we place a directory convenient for you with a text document of a dynamic API key to protect network operations. Each time during a fiscal operation, the key will be replaced with a different value.

The item "WEB API key" should contain the current security key.

image

The current API key can be obtained from the device’s web interface by contacting it after connecting to the network via the browser “device IP address: 8080” .

image

All settings are made, now you can test the device.

image

Hooray, setting up the FR successfully completed!

Finally, another trick


If during the use of the device, you cannot sell one or another product via iKKM (the device does not break it in the check), check the rounding settings in your 1C:

Correct option for 1C: Retail, 1C: Pharmacy

image

For 1C: Restaurant

image

Good for everyone fast and convenient cash registers for you!

All Articles