This article describes the features of the interaction of back-office application ShopDesk system TCU. 
As an independent application, Shopdesk works directly with the database shopping complex (about installing and configuring the application has previously been described  here и  here). With this system has access to information relevant to the current moment. It should be noted that when working Shopdesk used read-only data. It does not make the database information about sales. To do this, as an intermediary used commercial server, which is a standard TCU running in a special mode. In this mode, the user interface available that allows you to work with documents, reports, etc. TCU in the mode of trading server is intended solely for the processing of checks files generated ShopDesk. 


While working as a commercial server TCU does not require licensing as it applies only when 
used with ShopDesk. As a rule, to set the merchant server is recommended to allocate a separate 
computer, the most powerful. When you automate a small store can be combined workstation and 
server, but this practice is not the best solution. To ensure correct operation of the trading 
system as a whole it is desirable to minimize the chance of accidental disconnection trading 
server and its interference with the work of the user. 
Consider the scheme of joint work ShopDesk, the trading server and TCU. 

The cashier makes goods in check. In approving the check ShopDesk creates and saves it to 
file with the GRR. It contains in himself and in his name all the information needed to convert 
a check to the Invoice in the main accounting system. More familiar with crukturoy GRR-files, 
please contact the by reference. 
GRR-files are placed in a special directory that can be local or network.

In the setting of the trade server in the "References and path" parameter in "The Path to 
import cash checks" must specify the path to that directory. It should match the "Catalog file 
upload GRR» in ShopDesk:


It is recommended to create a directory for the exchange of GRR-files on the same computer 
on which the trading server.
Trading server TCU in the process periodically, every 10 seconds (configurable option) reads 
the file checks and verifies their correctness. If while processing the file the error occurred 
(for example, damaged file structure, etc.), he moved to the folder GRR \ ERR. It should be 
noted that TCU in the mode of trading server can not display an error message on the screen. 
All messages are placed in the trading server message log for further analysis tcu2_server.log 
system administrator.
If the file is correct, then in the main accounting system creates Sales Invoice with 
details and list items from the check. After that, the created document is approved. If prices 
in check were changed as a result of discounts provided to the client, also formed an act of 
revaluation on these goods.
If successful, the approval of expenditure in the bill creates a counter-document - credit 
cash warrant in the amount of the check, which is also adopted. Thus, the TCU is created Sales 
Invoice and payment received by it in automatic mode. It was after this point, the sale of 
goods through the accounting system can be considered valid 

If the system is in automatic mode failed to approve a document, it means that in the 
approval process occurred criticisms that require user intervention. For example, a cashier for 
the account has insufficient permissions to carry out operations with the documents or they are 
limited. Recall that for a cashier in the main accounting system (card user) should be defined 
the following rights:
- Allowed to create, edit and approve sales invoices .
 
- Allowed to create, edit and approve credit cash order.
 
- Allowed revaluation of the goods.
 
- Allowed the shipment of goods "in the red".
 
- The maximum permissible discount must be at least the maximum discount on the discount 
card.
 
- Date of approval of the check should fall in the range of available dates set for the 
cashier.
 
- Retail prices are not lower than purchasing.
 
In the event that some documents had not been approved by the trading server, do the 
following:
1. Open Journal tcu2_server.log and use it to determine the reasons for not approved this 
document. 
2. Resolve the cause.
3. Approve the TCU document itself. If it was a Sales Invoice, you must also make a payment 
on her hand.
Generation of reports for which verification is carried out daily with the X-and Z-reporting 
cashier's workplace is allowed to conduct after the list of invoices and receipt of expenditure 
cash orders are not held not bude documents. That is, all documents created by the trading 
server TCU should be approved. 
For more information on creating reports, and conduct cross-checks will be discussed in our 
next article.