Line input in list form 1c. Overriding the input event by line. Programmatic generation of a selection list

This article continues the series of articles “First steps in 1C development.” The material assumes that you have already read our previous articles on the interface. In the same article, we will continue our acquaintance with the new features of the Taxi interface and consider what interesting innovations managed forms have received in this interface.

Applicability

The article discusses the “Taxi” interface of the configuration developed on the 1C 8.3.5.1098 platform. Additions to the current platform releases (8.3.11) are given in the conclusion. Therefore, all information provided is relevant.

New in managed forms in 1C:Enterprise 8.3

The developers of the 1C:Enterprise 8.3 platform have once again thoroughly worked on the convenience of users working with controlled forms.

Line input

Previously, in the input fields, when entering initial characters from the keyboard, the system searched for suitable elements.

However, often users need to search not only by the first characters of the name, but also in an arbitrary place in the name.

In the configurator for reference metadata objects, to configure input by line, a separate “Input Field” tab was created:

It presents the following options for generating a selection list when entering a line:

  • use of full text search;
  • search by occurrence of a substring or by the beginning of a string;
  • performing a search directly or in background.

In the “String search method when entering by substring” property, you can choose whether to search only by the first characters of the string or in any part of it.

IN user mode searching for any part of a string looks like this: the user sequentially enters characters from the keyboard, and the system carries out the search.

And not only from the first letters of the name, but also from the occurrence of the typed line:

Naturally, using search on any part of a string can lead to deterioration in system performance, especially when large volume data.

In file mode, while the user is typing a line, the search is performed in the background only if no other background or routine task.

If the appropriate setting is set, full-text search can be used when entering data into the input field.

During a full-text search, both whole words and strings in which the typed characters are part of whole words will be found (the * full-text search operator is used).

For example, the user enters the following parts of words into the input field, the system displays the options found using the full-text search mechanism in a pop-up window:

The results of a full-text search corresponding to the entered search string are shown in the figure:

Let's remember that in platform 8.3 it became possible to redefine the representation of a reference data type using the ViewGettingProcessing and ViewGettingFieldsProcessing procedures in the object manager module.

At sharing This functionality and line input has the following feature.

The above handlers do not affect the presentation of values ​​in the selection list—the list reflects the underlying representation of the object.

However, once selected, the field displays the expected overridden representation of the object.

To enlarge, click on the image.

The developers believe that there are no errors in this behavior of the platform, and that it is more valuable to show why a particular result was found (highlighting, for example, the substring by which the object was found) than to display a representation of the corresponding value separated from the search result.

The row input properties discussed above were set at the level of the entire metadata object.

The developer can override these properties at a specific location in the configuration.

For example, using the AutoSelect and EndTextInput event handlers for a specific input field or using the SelectionDataProcessingSelectionProcessing event handler in the object manager module.

For this purpose, in these procedures there is a parameter named Structure type Parameters, the properties of which contain the method of searching for a string, the mode for obtaining selection data, and setting the use of selection data.

To enlarge, click on the image.

Dropdown list for input field

In platform 8.3, the drop-down list for the input field received additional functionality to improve the usability of the system.

This list can now display the history of previously selected values. A list with history is shown on the screen when you place the cursor in a field, when you press the Select from list button, or the Down Arrow button on the keyboard.

You can enable the display of history for input fields associated with data such as directory, document, business process, task, plan of characteristics types, plan of calculation types, chart of accounts and exchange plan. The configurator provides a property for this purpose, located on the “Input Field” tab:

To enlarge, click on the image.

The use of history can be overridden for a specific object attribute or form element.

In addition, if the user does not find the element of interest in the list of the input field, he can click the “Show all” button to open the list form to select an element from the entire directory.

Also in the list of the input field there is a command “Create a new object”. This will open the new element form.

In this form, the user fills in the required fields. After recording and closing the form, a link to the newly created element will be inserted into the input field.

A typical template for using the “Create” command new element" as follows. The user enters the name of the desired element in the input field.

If the system does not find such an element in the database, a message about this will be displayed. After clicking the button in the list, a new element form with a filled-in name will open on the screen.

The considered innovations make it possible to increase the speed of entering information into the system.

Saving dynamic list settings

In platform 8.3 settings dynamic list can be saved automatically. To do this, in the configurator, for the required form details, you need to set the “Automatic saving” property custom settings" By default, this setting is enabled when creating a list.

The root configuration element now has a new property – Storage of user settings for dynamic lists.

This property is selected from the list of settings stores defined in the configuration.

To enlarge, click on the image.

Setting up lists in user mode is called up using the corresponding menu item:

The appearance of the form is similar to setting up reports.

To enlarge, click on the image.

The conditions by which the list was selected are automatically displayed at the bottom of the settings. These settings will be included in the list form.

In the configurator mode, to do this, you need to fill in the table property of the User settings group form.

In it you need to specify a separate group of the form, inside which elements will be added to display the selection.

With this setting, the form will have fields in the form of “quick selections”.

To enlarge, click on the image.

If the user has customized the list, the settings will be automatically saved and the list will have the same appearance when opened again.

The dynamic list viewing mode (list, tree, hierarchical list) is saved along with the settings of the form elements.

For one list, the user can save several different settings.

If the configuration compatibility mode is set to “Do not use”, then for a dynamic list in which the document journal table is specified as the main table, the “Create” button is automatically generated in the form of a submenu with a list of documents included in the journal.

To enlarge, click on the image.

This simplified the creation of new documents by the user from the journal form. It has also become possible to quickly create separate buttons on the form’s command panel to create a new document of a certain type.

For this purpose, the standard CreateByParameter command was created. If this command is assigned to a button on the form, then the Parameter property becomes available, in which you can select the type document being created when you click this button.

To enlarge, click on the image.

In custom mode, this button will look like this:

To enlarge, click on the image.

Because The material in the article is described for platform 8.3.5, then we will update it.

  • Prior to version 8.3.7, string input was not fast enough, so in this release the data structure of the full-text search index was changed, which led to increased speed when running the system in places where this mechanism is used. Note that the new full-text search format is used when the compatibility mode is set to "Do not use". In compatibility mode with version 8.3.6, the behavior has not changed. Also note that in the next release of the 1C platform (8.3.8), the mechanism for entering by line and when using the dynamic list search line was also improved, and now it provides search for data that has not yet been included in the full-text search. This behavior has not been observed before.
  • The managed form input field dropdown list has also received some improvements. In version 8.3.8, it began to automatically adjust its width to the width of the data displayed in it, plus the keys Home And End began to be processed directly in the input field. These improvements make it easier to use the drop-down input field.
  • The mechanism for saving dynamic list settings has also been improved, and in version 8.3.6, the form table extension properties for the dynamic list Period and Display are now stored in the same sections as other dynamic list settings, which greatly simplifies the developer’s work with them. They are now available in the managed form handler WhenLoadingUserSettingsOnServer(), which was not the case before.

This is where we will complete our acquaintance with managed forms in the Taxi interface, but in the next article we will get acquainted with the new features introduced by the 1C:Enterprise platform version 8.3.

Print (Ctrl+P)

For application objects (directories, documents, plans of characteristic types, charts of accounts, plans of calculation types, registers, business processes and tasks, as well as exchange plans), in the Input by line property you can specify the details by which the search is performed. If line input is allowed (the appropriate details are specified), then it is permissible in the input field of the corresponding type not to select from the object form, but to enter the information contained in the specified object details.
For example, in the Nomenclature directory, line entry is allowed for the name attribute. The directory has several titles, which contains several products starting with the word Be. Then, by entering in the input field
item substring Be, we will get a list of products that begin with this word Enter by line

The details that will be used to perform the search may include:
● For directories, plans of types of characteristics, plans of accounts, plans of calculation types, exchange plans - Code and Name.
● For documents – Number.
● For business processes and tasks – Number and Name.
● Attributes of the Number or String type, for which the Index property is set to Index or Index with additional ordering. An example of the latter is the field for entering an article, barcode, or tax identification number.

Setting up line input

To generate a list of details, you need to click the selection button and in the dialog that opens, transfer to the left list those fields that can be used for line-by-line input.


Setting up line input

If there are several fields, then set the order in which they appear. When searching by string, the search is performed in the fields in the order in which they are given in this dialog. For example, for a directory element Nomenclature, input can be carried out both by code and by article. If the code value of one element matches the value of the article of another, then the found values ​​will be included in the list in the order in which they were specified during setup.
ATTENTION! When performing a data search (while entering a line), data access restrictions apply.
In addition to specifying which fields will be used to search, the system allows you to further configure some search parameters. The String search method property is intended to specify the string search method:
● Only at the beginning of the field selected for line entry (Start value). In this case search string is not broken into words, and the entered text is searched in its entirety. For example, if the search is performed in the following data: Ivanov Maxim and Maksimov, then when you enter the word Maxim in the input field, the data Maximov will be found, and when you enter Ivan Max in the input field, nothing will be found.
● In any part of the field (value Any part). If the search string consists of several words and the search is performed in any part, then a query similar to the following is used to search (for two fields and two words):

(Field1 LIKE “%Word1%” OR Field2 LIKE “%Word1%”) AND (Field1 LIKE “%Word2%” OR Field2 LIKE “%Word2%”)
Property Full text search allows you to use full-text search when organizing input by line. Full text search cannot be used on external data source tables. Using full-text search has several features:
1. Full-text search is always performed at the beginning of words.
2. Full-text search is used for the initial selection of objects in which further search will be performed (the number of objects in which the search will be performed is reduced).
3. All non-indexed links from the table on which the row entry was performed will be added to the results of the full-text search.
4. The list of selected objects will be searched for fields that are selected for use in the string input mechanism in the manner specified by the property String search method.
5. For each word from search query the symbol “*” is added at the end.
These features may lead to:
● Full-text search may overly narrow the search data set if any part search is used in conjunction with full-text search. As a result, the data will not be found. In this case, disabling full-text search will result in finding the necessary data. This will happen because full-text search only looks at the beginning of a word. If the searched text is not at the beginning of the word, entering along the line will not find such data.
● An out-of-date full-text search index can negatively impact search results.
● If the full-text search ends with an error, then the normal search will be applied, in accordance with the String Search Method property. This can lead to a situation where a found object becomes unfound (for the search method by any part of a word). For example: the character “a” is entered into the input field, which is not only at the beginning, but also in the middle of the array of words in which the search is performed. For a large data set, a full-text search will fail (the search result is too large) and a regular search will find data that contains the letter “a” within it. Then the user will enter another letter (for example, “ts”) and the search string will become “ats”. In this case, the full-text search will select only those data that begin with “ac” and will ignore those data that contain “ac” inside it.
If the drop-down list is generated by the system (and not using program code application solution), then representations of the found objects are formed using a special algorithm. The found object view consists of two parts: an attribute view containing the search string (required part) and an additional view (optional part).
The actual representation is formed as follows:
● A field containing the search string is defined:
● If you use a full-text search or a regular search for several words, this field will be the first field from the fields specified in the Input by line property in which the first word from the search string is found.
● When using a regular search for one word, this field will be the attribute in which the search was performed.
● The representation of the value located in a specific field will be a required part of the representation of the found object for the drop-down list.
● Determines whether it is necessary or not to generate an additional representation. To do this, determine the composition of the fields that will be used to form an additional view:
● If the found object has only one field used to form the representation, and the search string is found in this attribute, the fields of the alternative representation are used.
● Otherwise, the fields of the main view are used. The list of primary and alternate view fields is given below.
● If the list of fields for generating an additional view is empty, the additional view is not generated. Otherwise, the additional representation is generated as follows:
● The text representation of all fields that are selected to form an additional representation is enclosed in parentheses, through “, “;
● The generated additional representation is added to the right, separated by a space, to the required part of the representation of the found object.
● The following fields are used to form the main and alternative views:
● Directory, business process, plan of characteristics types, chart of accounts, plan of calculation types:
● Main view: Name, Code.
● Alternate View: Depending on which primary view is selected, the remaining field is used for the alternate view.
● Document:
● Basic view: Number, Date.

● Task:
● Basic view: Name, Number, Date.
● Alternate representation: none.
● External data source:
● Main view: the field specified in the View Field property of the table of the external data source.
● Alternate representation: none.
The Selection Data Retrieval Mode property controls how the platform retrieves data as it is entered along a line. If the property is set to Background, then the background job, and the drop-down list displays an animated picture similar to the background execution of the report (see here). A background job is used if the required data has not been received for display to the user within 200 ms. For file version information base It is possible to receive data in the background if another background or routine task is not running at the time of receiving data. While background selection results are being retrieved, the user can continue to edit the input field. Specifying Directly as the property value causes the search to be performed without the use of background jobs.
When setting up line input, it is recommended to follow these guidelines:
● It is recommended to set the value Background for the Selection Data Retrieval Mode property for objects in which a large amount of data is planned.
● It is recommended to enable full text search for objects where a large amount of data is expected.
● It is recommended to enable row search anywhere in conjunction with background search, or in tables where a large amount of data is not expected. It is also advisable, if there is a large amount of data, if you enable search anywhere, then enable full-text search (so that most of the searches are performed through full-text search).

Features of the behavior of the input field

When entering data into an input field, you should take into account some features of working with a selection list. If, as a result of typing, several objects are found that begin with the entered text, then the list of these objects will be located in the drop-down list. While typing, the user can use the Up Arrow and Down Arrow buttons to move through the list while continuing to type in the field itself. In this case, to make a selection, you need to select the required element and confirm the selection by pressing the Enter or Tab button. To create a list
When selecting an input field, the following algorithm is used:
1. Data is obtained by searching in the first field (from the list of selected fields) by the beginning of the string and by substring. The number of records obtained as a result of a search at the beginning of a string will be called RS, and the number of records obtained as a result of a search by substring will be called RP.
2. If RS+RP<=10, то в выпадающий список попадут все результаты каждого поиска.
3. If RP and RS are greater than 5 (each), then the selection list will contain 5 entries from each list.
4. If any of the RP or RS values ​​is less than 5, then the drop-down list will include all entries from the smaller list and as many entries from the larger list as to complete the drop-down list to 10.
5. If the total number of entries in the drop-down list is less than 10, then we perform the algorithm from step 1 for the next field from the list of selected fields, using the difference between 10 and the number of results obtained as the number of data required to obtain in the next step.

Programmatic generation of a selection list

If the developer is not happy with the way the select list is generated, he can override it himself.
You can do this in two ways:
● Directly in the form - in this case, the special formation of the selection list will work only for this single field. To do this, you need to define event handlers for the StartSelection, AutoSelection and EndInputText.
● In the manager module of the corresponding object - in this case, a special selection list will be generated for all input fields in which the values ​​of the object being used are entered.
If a field is associated with data that has the type of reference to an application object (for example, DirectoryReference, EnumerationReference, etc.), then the selection list can be generated either in the manager module of the corresponding object, or using form module handlers. In other cases, the selection list can only be generated using form module handlers.
Let's take a closer look at the second method.
To programmatically generate a selection list, you need to override the event handler for ProcessingReceivingDataManagerSelection
object. The handler receives a set of parameters that determine the conditions for generating the selection list. The set of parameters is
structure that contains:
● Search string – a text string containing the text that the user entered into the input field. This property is always present (property
Search line).
● Selection – a structure that describes selection as it is described by the Selection form parameter for extending the form for a dynamic list.
This property is always present.
The selection specified in this property will be converted (if possible) into a full-text search query, refining this query for
increasing search speed.
● A property that specifies the mode for selecting groups and elements (passed only for hierarchical lists) – the SelectionGroupsAndElements property.
● A property that determines how to search for a string: by the beginning of the word or by any part (StringSearchMethod property).
● The need to use full-text search (Full-TextSearch property).
● Mode for receiving selection data (SelectionDataReceivingMode property).
● In addition, the structure contains elements that are specified in the properties of the form element – ​​Associations of selection parameters (see here) and Parameters
choice (see here).
In addition, a variable is passed to the handler, into which the generated selection list should be returned, and the StandardProcessing parameter.
which defines the behavior of the system after the handler exits.
If the developer sets the StandardProcessing parameter to False, then he needs to completely generate the selection list himself.
If you set the standard processing flag to True, you can allow the system to generate a selection list, but if
In this case, you can modify the selection parameters (add additional selection values, change the selection mode of groups and elements, etc.).
Note 1. If the system itself generates a selection list, data access restrictions are taken into account when generating the list.
Note 2: The examples below are not complete. They are intended to demonstrate various mechanisms for obtaining pick lists.
So, the following code, in the case of any text entered by the user, will provide a choice of three products, with codes 00000002, 00000003 and 00000004.
Example:

Procedure ProcessingReceiveSelectionData(Selection Data, Parameters, StandardProcessing)
SelectionData = NewValueList ;
(“00000002”));
Selection Data.Add(Directories.Products.FindByCode(“00000003”));
Selection Data.Add(Directories.Products.FindByCode(“00000004”));

StandardProcessing= False;
End of Procedure

In the following example, the selection that the input field generated will be expanded by setting an additional selection so that no services are included in the selection list. In this case, the system takes care of all the formation of the selection list.
Example:

Procedure
Options.Selection.Insert("View", Transfers.Types of Products.Product);
End of Procedure

As a final example, consider a simplified case of implementing selection entirely using the built-in language. In this example, we will consider selecting products whose names begin with the string entered by the user in the input field.
Example:

Procedure ProcessingReceivingSelectionData(SelectionData, Parameters, StandardProcessing)
Request = New Request ;
Query.Text = “SELECT ALLOWED
| Products.Link as Product
|FROM
| Directory.Products AS Products
|WHERE
| Products.Name SIMILAR &Name”;
Request.SetParameter("Name", Parameters.Search String + “%”);
Result = Query.Execute();
ResultTable = Result.Upload();
Array of Products = Table of Results. Unload Column("Product");
SelectionData = New ValueList;
SelectionData.LoadValues(ProductArray);
StandardProcessing= False;
End of Procedure

You should also pay attention to another way to form a selection list: passing as the value of an element of the list of values ​​not a reference to the object being searched (as in the examples above), but a structure of special content.
This structure consists of the following elements:
● Value – the actual value of the selected element. A structure element with this name must be present.
● MarkDeletion – an indication that the selected value is marked for deletion in the infobase. A structure element with this name is optional.
● Warning – a line with the text of the warning that 1C:Enterprise will display when you select such an element from the list of values.
A structure element with this name is optional.
If in the structure the Deletion Flag property is equal to True and the Warning property is not specified, then the system will automatically generate a warning text. If the Warning property is specified, then this is what is displayed. It should be remembered that the Warning text ends with the question Continue? and is displayed as a question with answer options Yes and No.
Next, we will show a modification of the previous example, in which a warning This warehouse should not be used will be generated for warehouses with the Do Not Use attribute set to True.
You can also combine both Structure type values ​​and simple values ​​in one selection list.
Example:

Procedure ProcessingReceivingSelectionData(SelectionData, Parameters, StandardProcessing)
StandardProcessing= False;
SelectionData = NewValueList;
// Create a list with warnings
Request = New Request ;
Query.Text = “SELECT
| Warehouses.Link,
| Warehouses.Name,
| Warehouses.Do Not Use
|FROM
| Directory.Warehouses AS Warehouses”;
Result = Query.Run();
SelectionDetailRecords = Result.Select b();
Bye SelectDetailRecords.Next() Cycle
Structure = New Structure (“Value”,

Have you switched to 1C 8.3 Accounting and don’t know how to enter opening balances? Then you need to read this article. Entering initial balances in 1C 8.3 manually is done in cases where it is not possible to transfer them using software. 1C 8.3 has a convenient assistant for manually generating balances. Read on to learn how to use it.

Entering initial balances in 1C 8.3 is done in a special window - “Balance Entry Assistant”. First, it indicates the name of the organization and the date the balances were entered. Next, enter account balances. The “assistant” window lists all the main accounting accounts that are used in accounting. Each account has its own characteristics, the “assistant” takes them into account when manually generating balances. For example, when entering a balance for fixed assets, you must enter information about the amount of depreciation and useful life. Read in this article how to enter initial balances in 1C 8.3 Accounting in 5 steps for accounts 01,10,41,60.

Step 1. Go to 1C 8.3 “Balance Entry Assistant”

Go to the “Main” section (1) and click on the “Balance Entry Assistant” link (2). The “assistant” window will open.

In the window that opens, indicate your organization (3) and the date of formation of the opening balance (4). If you start accounting in the new program on January 1, then set the date to December 31.

Step 2. Enter the initial balances for fixed assets in 1C 8.3

In the “assistant” window, left-click on account 01.01 “Fixed assets ...” (1) and click the “Enter account balances” button (2). A window will open for entering the balance for fixed assets.

In the balance entry window, indicate the division (3) in which the fixed asset is installed and click the “Add” button (4). The Fixed Assets: New Row window opens.

In the window that opens, fill in the fields:

  • “Primary means” (5). Select the desired OS from the directory;
  • “Original cost (BC)”, “Original cost (OC)” (6). Indicate the initial cost in accounting and tax accounting;
  • “Cost (BU)”, “Cost (NU)” (7). Specify the cost of the OS;
  • “Depreciation (wear) (BU)”, “Depreciation (wear) (NU)” (8). Indicate the accounting and tax depreciation accrued on the date the balance was entered;
  • “The way of reflection...” (9). Select the desired method from the directory, for example “Depreciation (account 20.01)”.

In the “Accounting” tab, fill in the fields:

  • “Method of admission” (11). Select the receipt method, for example “Purchase for a fee”;
  • “Accounting procedure” (12). Select the desired value from the directory, in our example it is “Depreciation”;
  • “Financially responsible person” (13). Specify the employee responsible for the fixed asset;
  • “Method of calculating depreciation” (14). Select the desired value, for example “Linear method”;
  • “Useful life…” (15). Indicate the useful life of the fixed asset.

In the “Tax Accounting” tab, fill in the fields:

  • “The order of inclusion ...” (16). Select the desired value from the directory, for example, “Depreciation calculation”;
  • “Useful life (in months)” (17). Indicate the useful life of the fixed asset in tax accounting.

In the “Events” tab fill in the fields:

  • "Date" (19). Indicate the date of acceptance of fixed assets for accounting;
  • "Event" (20). Select the desired value, for example “Acceptance for accounting with commissioning”;
  • “Document title” (21). Enter the name of the document according to which the fixed asset was accepted for accounting, for example, “Commissioning Certificate”;
  • “Document number” (22). Indicate the document number according to which the fixed asset was accepted for accounting.

The formation of the balance for the fixed asset is completed. To save the data, click the “Save and close” button (23).

In the “Enter balances (Fixed assets)” window, click the “Post and close” button (24). Now there are entries in accounting for entering balances. Next, a window will open in which the operation to create the balance for fixed assets will be visible.

In the “Enter balances” window we see the operation for the entered balance (25). You can add other fixed assets to this operation and make various edits. To do this, double-click on it with the left mouse button. To view the transactions generated for the operation, click the “DtKt” button (26). The “Document Movement: Entering Balances...” window will open.

In the window that opens, we see entries for the formation of balances on accounts 01.01 “Fixed assets ...” (27) and 02.01 “Depreciation of fixed assets ...” (28), generated by the “assistant”. These accounts correspond to the technical account “000” (29).

Step 3. Enter initial balances for materials in 1C 8.3

In the “assistant” window, left-click on account 10.01 “Raw materials and supplies” (1) and click the “Enter account balances” button (2). A window for entering the balance for materials will open.

In the window for entering balances, indicate the department (3) in which the materials are located and click the “Add” button (4). On a new line enter:

  • Materials account (5);
  • Name of material (6);
  • Warehouse where the material is located (7);
  • Its quantity is (8);
  • The total cost of materials in accounting and tax accounting (9).

If you need to enter balances for workwear and materials sent for recycling, then use the “Workwear...” tabs. (10) and “Materials transferred ...” (11).

To complete the operation, click the “Perform and close” button (12). The operation to enter the balance for materials is completed.

Step 4. Enter in 1C 8.3 the initial balances for goods in warehouses

In the “assistant” window, left-click on account 41.01 “Goods in warehouses” (1) and click the “Enter account balances” button (2). A window will open for entering the balance for goods.

  • Goods account (4);
  • Product name (5);
  • Warehouse where the goods are located (6);
  • Its quantity is (7);
  • The total cost of goods in accounting and tax accounting (8).

To complete the operation, click the “Post and Close” button (9). The operation to enter the balance for goods is completed.

Step 5. Enter in 1C 8.3 the initial balances for settlements with suppliers and contractors

In the “assistant” window, left-click on account 60.01 “Settlements with suppliers and contractors” (1) and click the “Enter account balances” button (2). A window will open for entering the balance for account 60.01.


In the window for entering balances, click the “Add” button (3). On a new line enter:

  • Account for settlements with suppliers (4);
  • Supplier name (5);
  • Contract with supplier (6);
  • The settlement document for which a balance arose with the supplier (7);
  • The amount of debt to the supplier (8).

To complete the operation, click the “Post and Close” button (9). The operation to enter the balance for accounts payable is completed.

By analogy with entering balances for suppliers, an operation is performed to enter balances in account 62 “Settlements with customers”.

We remind you that after entering the balances for all accounts, you need to check the balance sheet between the incoming debit and credit balances in the consolidated balance sheet. In this case, according to the auxiliary account “000” the opening balance should be equal to zero. Create a balance sheet to check the balance sheet and make sure that there is no balance on account “000”.

To use line input in documents, you need to specify at the directory level the fields for which line input will be used. By default, these are the predefined details “Name” and “Code”.

To override the line input event in the document manager module (in which we will actually create a mess), we create an event
ProcessingReceivingSelectionData(SelectionData, Parameters, StandardProcessing)

In this module you can define a new array for the selection data

"Options" - Contains selection options.
They can be further configured in the event handler.
A structure that must contain the following keys:

  • SearchString - a string used when searching for data, Undefined - a quick selection is made;
  • Filter – selection used when searching for data;
  • ChoiceFoldersAndItems—specifies the use of groups and items (for hierarchical data only); typeUseGroupsAndElements ;
  • StringSearchMode—specifies the search method when entering by string; type Method of Searching for a String When Entering a String
  • FullTextSearch - indicates the need to use full-text search when entering along a line; type - Full-TextSearchWhenEnteringLine; the parameter may be missing;
  • ChoiceDataGettingMode—indicates the search launch mode. TypeModeReceivingSelectionDataWhenInputByLine; the parameter may be missing.

Example of duplication of typical behavior:

Listing of the procedure for ProcessingSelectionDataRetrieval:

ProcedureProcessingReceivingSelectionData(SelectionData, Parameters, StandardProcessing)

Request = New Request("SELECT
| Nomenclature.Link
|FROM
| Directory.Nomenclature AS Nomenclature
|WHERE
| Nomenclature.Name SIMILAR &Name");
Query.SetParameter("Name", "%" + Parameters.SearchString + "%");
// The construction “%” + Parameters.SearchString + “%” shows what is at the beginning and end of the line
//can be an indefinite number of characters

Table = Query.Run().Unload();

//Upload the table into an array to then load it into the selection data
Array = Table.UnloadColumn("Link");

SelectionData = NewValueList; // Redefine the selection data because By
//by default they have the type “undefined”

SelectionData.LoadValues(Array);

StandardProcessing = False; //key expression disables standard execution
//and allows the new algorithm to work

End of Procedure