📜 ⬆️ ⬇️

Additional reports and processing, use of extensions in 1C Fresh

Today we want to tell you about the use of additional reports and processing, and especially configuration extensions in the service model. Technologies do not stand still, maintenance of 1C bases in the cloud is becoming an increasingly attractive service. What you need to know, so that the necessary for your company functionality was implemented in a rented base, and how this process looks from the service provider side - you can learn about it under the cut.
image

What are external reports and processing


Processing 1C are different, but in any case, they expand the functionality of the configuration and allow you to get quick access to the information stored in the database, without changing the configuration and without removing from support. They can be embedded directly into the configuration, added as a configuration extension, or be external files.

By processing functionality, they are divided into those that can change data and those that simply analyze information and output the result in a user-friendly form (reports). In order not to change the standard layouts for printing documents, external printing forms are being developed. Also, external processing can be performed according to a predetermined schedule on the 1C application server - these are routine tasks.

The button has developed dozens of treatments that allow our accountants to use “practical magic“. For example, to analyze the correctness of accounting in the Button, the external report “Auto Audit of Bases” is used. Analysis of 120 criteria of balances and turnover on accounts, compliance of data from tax returns and accounting information, analysis of fixed assets and so on is displayed in easy-to-understand tables.
')
image

image

image

An example of an external printed form "loan agreement" in the form developed by our lawyers. There are cases when the entrepreneur takes an interest-free loan from his company as an individual, or vice versa, transfers his own funds to the company, then there is an opportunity to immediately print the contract.

image

A form opens to fill in the required details:

image

And the printed form of the contract is displayed:



Scheduled treatments (routine tasks) are used, for example, to correct the statement. The buttons are configured to integrate with the main banks and special robots download the statement directly to 1C. Thanks to machine learning technology, the percentage of errors during discharge was reduced to 3%. But as always there are exceptions, for example, customers who use an agent-based scheme for the sale of goods, in this case, the rules for conducting a bank statement are individual. In order not to reprogram the robot for a particular case, before the appearance of configuration extensions, a routine task was used to correct the statement after the robot every 10 minutes.

What are configuration extensions


An extension is a mini-configuration that inherits objects from the main database configuration and contains code with additions or corrections to objects and modules. In this case, the basic configuration remains supported, it is not necessary to include the possibility of editing, which greatly facilitates the update process.

The mechanism involves three types of use, which, in fact, are indicated in the “Assignment” field when creating an extension:

  1. A fix is an extension to correct minor inaccuracies and errors in configuration objects;
  2. Adaptation - The default value when creating a new extension. Use to change the typical objects to your requirements;
  3. Addition - adds a completely new functionality to the standard solution.

Administration of additional reports, processing and extensions


Today Button provides accounting outsourcing services to more than 1000 entrepreneurs. We have implemented and have been using 1C Fresh for more than two years - the technology of publishing application solutions on the 1C: Enterprise platform, which is used in the cloud service 1cfresh.com. This is the best solution for servicing such a large number of 1C bases today. One information base with the help of separators is divided into independent areas, more details can be found in our article “ How to independently maintain 2500 accounting bases ”.

The central component of the technology is the Service Manager , it stores all the information about subscribers, users, applications, information databases and the relationships between them, and with its help, external processing and expansion of configurations are managed.



All files with treatments are uploaded to a special directory of the service manager. But before you upload a file to the directory, in other words, “publish it in a service,” you need to prepare it in a special way.

Preparation of external reports and treatments for publication in the service model


Additional report or processing is created in the “1C: Enterprise 8” configurator as standard external reports and processing and saved to a file with the extension - .epf (for additional processing) or .erf (for additional reports).

The object module must have procedures and functions for defining registration parameters.





Please note that the important parameter is “Version“. If you made changes to the processing that has already been previously uploaded to the service manager directory, be sure to change the version number, otherwise the service manager will refuse to download this file. When developing a report or processing it is necessary to take into account that users work in the service model through a web client (a good article in the 1C blog ). If the processing contains forms, then they should work in the web client under all web browsers that are supported by the 1C: Enterprise 8 technology platform.

According to the standards of the 1cfresh.com service, the additional report or processing must be fully operational when performed in safe mode, that is, to work without recourse to objects external to the configuration.

Additional report or processing should be prepared for download to the service in the form of a package. The bundle is an archive (zip file) containing:


Preparation is performed in the locally deployed information base of the configuration for which the additional report or processing is intended. We use a special assistant to create a set of delivery, external processing Preparation of Additional Reports and Processing of Publications In Model Service.epf. More information can be found in the documentation on the Technology of publication solutions 1C Fresh.



Installation of additional reports and treatments in the service model


A distinctive feature of 1C Fresh technology is that the external report or processing cannot be loaded directly into the data area. Adding occurs only by the service administrator through the service manager. After the zip-archive with the processing file is prepared, it must be downloaded to the service manager directory and set for the specific service subscriber.

Subscriber service - a group of users, united by any principle. Accordingly, the information databases available for a certain group of users are called subscriber applications.

Applications can have various 1C configurations (Enterprise accounting, Salary and personnel management, Management of our company, etc.), which can be used in the service model. Additional report or processing can be installed only in the applications of the subscriber, which is specified when downloading the file.

Here is the form of the properties of the additional report with versions. On the hyperlink “Install / Uninstall“, we get into the list of applications and select the necessary databases.



After processing is loaded and the application is selected, the service manager contacts the application address and gives the command to install it into the information base.

We start processing on schedule


When working with a large number of accounting bases, some processing needs to be performed periodically. For example, once a month or every few minutes. It is also important to automate manual and typical user operations. For this we actively use routine tasks.

Treatments that will be performed on a schedule do not have a form. All logic is written in the object module and looks as follows.




When preparing the package, we set the schedule. Now our processing will be done every hour.



More on configuration extensions


In parallel with external reports and treatments that need to be prepared and administered “in the old-fashioned way”, we began to actively use the mechanism of configuration extensions. Starting with the platform of 1C of Enterprise 8.3.10, this mechanism has made our lives easier enough and allowed us to simplify the adaptation of configurations to the features of the Button.

For example, we wrote above about routine operations for correcting documents for robots that were launched every 10 minutes. Now you can use the extension to override the work of the modules. Thus, we can immediately perform the necessary actions when recording or holding a document. This is much more optimal, because the task queue in the database is not clogged up with performing actions every 10 minutes, and more quickly, since changes are made immediately.

A new extension is easy to prepare. Let's look at the process of creating extensions with specific examples.
By experience, the leader in requests for adjustments is the printed form TORG-12. For example, we need to make an extension to be able to print a waybill in a currency (by default, it can only be formed in rubles).
Open Menu → Configuration → Configuration Extensions.
Create a new extension with the appointment “Adaptation“.



The extension looks like a familiar configuration tree, but so far without objects. First of all, we will add a new layout of Torg-12, into which we inserted columns with currency amounts.



Since the invoice is printed from the document “Sales of goods of services”, we will add this document to our extension from the basic configuration and make the necessary changes to the manager’s module. To do this, in the context menu of the implementation, select “add to extension”.



Now you can modify the implementation manager module. We need to add a new form to the list of printed forms and fill in amounts in currency.



To change typical procedures, we use the & After annotation, we also need a couple of our functions and a procedure.

Let's take a closer look at annotations. In extensions you can use: & Before, & After, & Instead (very carefully). The principle of operation is simple: we want our algorithms from the extension to be executed first, set the annotation & Before and in brackets we indicate the name of the procedure from the typical configuration. If we first work out a typical module, and then ours, use & After.

Annotations & Before and & After can not be used for functions. Therefore, if we need to change the algorithm of the function from the main configuration, we use the annotation & Instead.

Annotation & Instead, it is necessary to apply as little as possible, since it completely replaces the execution of the procedure and functions from the main configuration to the extension procedure / function. With this method of interception, the procedure / function from the main configuration will generally cease to be executed while the extension is installed, even updating versions will not help.

Conclusion


There are many different opinions about the use of extensions and external reports / treatments. Based on our experience, we have two hands “for” expansion. This is a modern and more adaptive technology, it has many more features, and their publication is much simpler. Only the necessary part of the code is placed in the extension; there is also no need to additionally prescribe the procedures and functions for determining registration parameters, monitor the versions and create the delivery set.

You can use multiple extensions for the same data region.
For the specifics of the work of 1C Fresh in the data sharing mode (one configuration, many independent areas), the extension method is an excellent way out.

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


All Articles