In this publication M.A. Vlasova, a teacher-consultant at the Center for Certified Training of the company "1C: Automation", examines in detail the mechanism implemented in "1C: Complex Automation 8" for carrying out the final operations of the month, which is intended for the formation of transactions required by law, the closure of a number of accounts and the determination of the financial result of activities. The article is given particular relevance and practical value by the author’s recommendations on organizing control over the correctness of routine operations, as well as consideration of year-end closing operations.

Month closing procedure

The procedure for closing a month consists of a number of routine operations: depreciation calculation, repayment of the cost of workwear and special equipment, determination of the cost of movement of inventories for the month, revaluation of foreign currency, writing off future expenses as current costs, determining the actual cost of manufactured products and services, identifying deviations in income estimates and expenses in accounting and tax accounting, calculation of income tax, calculation of VAT obligations, etc. All these operations are carried out by separate regulatory documents created and carried out in a certain sequence.

To facilitate the user’s work in carrying out routine operations in the “1C: Integrated Automation 8” configuration, the “Month Closing” functionality has been created. It allows you to configure and control the month-end closing procedure and helps coordinate the interaction of responsible persons performing individual regulatory operations.

Setting up a month-end closing procedure

First, the pre-settings are performed (menu - Regulatory operations - Setting up month end). All month closing settings are elements of the directory of the same name. Each setting is created independently of the organizations that make up the enterprise and can be used for any of them.

The setting form specifies the period from which it can be applied, as well as signs of reflection in accounting, tax and management accounting. You should also choose the option of a taxation system - general or simplified (with different types of tax base), since the composition of transactions differs for different tax regimes.

On the bookmark Summary settings those operations that must be carried out are noted. By default, the month closing setting includes all operations that can be performed, with the exception of those that do not correspond to the accounting settings (menu AND "Account Manager" interface - Accounting setup - Setting up accounting parameters).

Thus, in accordance with the setting of accounting parameters in the program, batch accounting can be maintained or the mode of advanced cost accounting analytics (RAUZ) can be used. When using RAUZ, resource-intensive routine operations Restore batch accounting sequence And Adjust the cost of writing off inventories are not fulfilled, therefore, in the diagram presented in Fig. 1, they are inactive, and their use cannot be configured.

Rice. 1. List of routine operations that will be performed when closing the month

All other routine operations, except inactive ones, can be included in the month closing setting or excluded from it by checking the appropriate boxes. So, for example, if an organization does not have foreign currency funds and contracts with counterparties concluded in foreign currency, then there is no need to carry out a regulatory operation Revalue currency funds and so on.

Each regulatory operation must be assigned a responsible person. When directly performing the procedure for closing a month, the program will generate a task for it. Those responsible for performing routine operations are assigned on the tab of the same name. This is easy to do by selecting the operation in the left field, and in the right field - the user (or group of users) who should perform it, and then use the arrow (Fig. 2).

Rice. 2. Assigning users responsible for performing routine operations

On the bookmark Cost Allocation You should specify the cost allocation methods that are used by this month end closing setup. By default, all costs of departments of the type "Main production" and "Auxiliary production" are distributed according to the volume of output, and the costs of departments with the type "Other" are distributed according to the planned cost of production.

If necessary, the cost distribution setting can be changed by choosing your own distribution method, for example, for each cost item of each department (when calculating the cost depending on the type of production - material-intensive, labor-intensive, etc. - or other features of the enterprise, as well as in accordance with the approved organization regulatory documentation).

In addition, you need to keep in mind that in order for the distribution of costs to be carried out by the program correctly, it is necessary that the correspondence between the divisions of the enterprise and the divisions of organizations be configured in the database (menu Interface "Full" - Directories - Company - Divisions).

Also, in the month-end closing setting for each routine operation, it is indicated which documents should be created and posted when it is performed.

As a rule, each regulatory operation corresponds to one or more documents that must be created and carried out. This correspondence is configured in the information register List of Regulatory Operations Documents. It opens filled by default when you click on the command bar button Regulatory operations documents(Fig. 3). As a rule, there is no need to fill it out specifically.

Rice. 3. Documents for performing routine operations

If necessary, the list of matches can be refilled automatically with default settings (command bar button I), before which all previously created entries will be deleted. For some regulatory operations, documents are not installed by default when filling out:

  • or due to the need to perform additional actions (for example, you may need to enter the percentage of activities on UTII when calculating wages and “salary” taxes);
  • or due to the multiplicity of documents being created, the results of filling which depend on the previous ones (operation Calculate salaries and unified social tax);
  • or due to the lack of documents (a routine operation can be performed not only by a document, but also by special processing);
  • or due to the fact that the procedure for performing a routine operation is detailed in a separate diagram.

It is also possible to configure a list of reports that will be available to the user to monitor the results of performing a routine operation from the form Regular operation(by command panel button Reports).

Settings are made in the information register List of Routine Operations Reports(command panel button of the month closing settings form Regulatory Operations Reports). An arbitrary number of reports can be specified for one routine operation. Setting up the composition of reports is optional.

The composition and sequence of operations is reflected in the graphic diagram (document Setting up month end bookmark Scheme). Enabling/disabling the execution of a routine operation and assigning responsible persons can be done directly on the diagram.

Let's consider the procedure for performing the month-end closing procedure.

Starting the month-end closing procedure

A new month closing procedure is created in the menu Interface "Accounting manager" - Regulatory operations - Month closing procedure.

In the shape of Closing the month On the Parameters tab you must specify:

  • closing month;
  • organization;
  • month closing settings;
  • belonging to the types of accounting (managerial, accounting, tax).

Then you should load the settings and start the procedure using the buttons of the same name.

After completing these steps, an information window will appear in which the user will be informed about what routine operations will be performed and to which responsible person they are assigned. If no changes are required, click on the button Launch.

During the month-end closing procedure:

  • tasks are automatically generated for responsible persons to perform routine operations;
  • When performing the next routine operation, a transition to the next operation is automatically carried out - new tasks are generated. Moreover, some operations can be performed in parallel (at the same time).

The month-end closing procedure is considered completed after all regulatory operations have been completed.

Monitoring the progress of the procedure

On the bookmark Scheme procedures Closing the month You can, using graphical images, clearly see the current state of individual regulatory operations (Fig. 4):

  • operations that are not performed (due to program settings) are located on a white background; additionally indicated: “Not executed”;
  • operations disabled by the user are displayed in gray;
  • operations assigned to be performed by the current user (or the user group to which he belongs) are outlined in a bold frame;
  • operations for which tasks have not yet been generated are displayed in light color without any outlines;
  • operations for which tasks have currently been generated (and which are awaiting execution) are circled with a red dotted line;
  • completed operations are shaded;
  • When the month closing procedure is completed, the background of the diagram becomes dark.

Rice. 4. Graphic representation of the month-end closing procedure

The current state of the month-end closing procedure ("started", "completed") is displayed in the header of the form. You can open the routine task form by double-clicking the left mouse button on the corresponding element of the graphic diagram or the routine task in the list of routine operations. Using the routine task form, you can create and post at once all the documents necessary to perform a routine operation, check the results of their posting to registers using the menu buttons, view reports on the implementation of routine operations (references, calculations), and also enter information into the program about that this regulatory operation has been completed.

Performing routine operations

Those responsible for performing routine operations can see the tasks sent to them to perform routine operations in the form of the "Routine Operations" list (menu Interface "Accounting manager" - Regulatory operations - Regulatory operations).

To perform each regulatory operation, the following actions must be performed.

1. Create and carry out relevant (assigned to a regulatory operation) regulatory documents or perform processing. Processing is carried out separately from the business process of closing the month, using the buttons of the main menu of the program. The creation of documents can also be done separately from the business process, but it is reasonable to do this from the form of a regulatory task - using the button of the same name, which allows you to create the necessary documents automatically. The routine task form opens by left-clicking on the graphical representation of the procedure on the month-end closing diagram or by clicking on the corresponding line in the list of routine tasks.

2. Check the result.

3. Mark the routine operation as completed (the "Mark as completed" button). Moreover, if a routine operation was assigned to the Month Closing procedure, but in fact its execution is not required (about which the program displays a corresponding message), then for such a routine operation in its form you can assign the action “Execute without checks”.

Let's consider the operations included in the regulatory ones.

Perform additional document processing

This operation is performed by processing of the same name (menu Interface "Accounting manager" - Postponed - Additional documentation). The procedure is necessary when the deferred document processing mode has been set for the organization (Fig. 5).

Rice. 5. Setting the delayed posting mode

When processing, documents that during the month were posted in accordance with the deferred posting mode only in part of the necessary registers will be posted in all other registers.

After completing the final processing of documents, we mark the routine operation completed. In this case, in the list of routine operations, the program will check the boxes indicating that the operation has been completed, and on the graphical diagram the element corresponding to the completed routine operation will be shaded (Fig. 6).

Rice. 6. Mark on the completion of a routine operation

At the same time, in the list of routine operations, the procedure for closing the month will generate a task to perform the next routine operation, which will appear outlined in a dotted line on the graphical diagram.

Similar actions should be carried out when performing each routine operation.

Restore the sequence of calculations for acquisitions (sales)

These routine operations are performed by the processing Restoring the state of settlements with counterparties (menu Interface "Accounting manager" - Regulatory operations - Restoring the sequence of calculations), which is intended to identify the presence of advances (Fig. 7).

Rice. 7. Restoring the sequence of settlements with counterparties

By restoring sequences, processing generates transactions and movements of specialized registers associated with the repayment of debt and the offset of advance payments for settlements with suppliers and customers.

In addition, for settlements in foreign currency, processing adjusts receipts and sales amounts when offsetting advances at a different rate, and also revaluates balances on all foreign currency accounts and generates entries for exchange rate differences in accounting and tax accounting.

Restore batch accounting sequence

If the company does not use RAUZ, then it is necessary to perform an additional operation performed by the processing Post by batches (menu Interface "Accounting manager" - Cost accounting - Carrying out by batches), which is intended:

  • to restore the correct sequence of accounting for batches of inventories, if the documents of receipt and write-off were carried out retroactively;
  • for the regulated write-off of the cost of batches of inventory in the event that such a write-off was not made at the time of posting documents (that is, in setting up accounting parameters, the Write off batches when posting documents checkbox was not selected).

If the batch accounting sequence is not restored, you should check the accounting of transactions for the receipt and sale (write-off) of batches of inventory and make sure that all documents relating to the movement of inventory are posted in the information base. (you can also make sure before starting processing that there are no negative balances in the inventory accounts (for example, using the report List of goods in warehouses).

To make it easier to find errors, it is also recommended to use the “Settings” button at the top of processing Carrying out by batches, and by selecting the menu item Processing settings, check the box Stop batch processing if there are not enough batches. After processing is completed, all messages about unwritten lots can be obtained from the message window and log.

Adjust the cost of writing off inventories

If RAUZ is not applied, then the organization, when closing the month, must carry out a routine operation to adjust the value of written-off inventories. It is carried out by the document (menu - Documentation - Regulatory operations - Adjusting the cost of writing off goods). Adjustment is necessary for:

  • calculating the weighted average cost of writing off batches when using the “By average” method of assessing inventories (during the month, the cost was taken into account using the moving average, and this operation recalculates it).
  • recalculation of the cost of inventory items including additional expenses for their acquisition, if such expenses were reflected in the accounting records after the write-off of the assets.

Parallel execution of routine operations

Some routine tasks can be performed in parallel (Fig. 8). This can be seen in the list of routine tasks and even more clearly in the graphical diagram (tasks are located on the same level, each surrounded by a dotted line).

Rice. 8. Assigning several routine tasks simultaneously

Selecting an operation Calculate depreciation of fixed assets , which is intended for calculating depreciation and, if necessary, a depreciation bonus in accordance with the settings made when accepting the fixed asset for accounting (putting it into operation). Open the routine operation window by double-clicking the left mouse button on the element shown in the graphic diagram and click on the “Create documents” button. As a result, a document “Depreciation of fixed assets” will be created, dated the last day of the month being closed. From the form of a regulatory transaction, you can post a document by clicking on the appropriate buttons and see the result of the posting in accounting and tax accounting (Fig. 9).

Rice. 9. Posting the created document Depreciation of fixed assets

After this, the depreciation operation must be marked as completed. This is done using a button Mark as completed in the form of a routine operation or using a menu Actions - Completed in the list of routine operations.

The following operations are performed in a similar manner.

Calculate depreciation of intangible assets. This operation will accrue amortization of intangible assets and write off the costs of research and development (R&D) when carrying out the created document Depreciation of intangible assets.

P pay off the cost of special clothing. During this operation, part of the cost of special clothing and special equipment will be written off if it was not fully repaid upon commissioning. This will be done when posting the document Repayment of cost (working clothes, special equipment, inventory).

Write off RBP. During this operation, part of the cost of deferred expenses will be transferred to current expenses by the document .

Revaluate foreign currency. Revaluation is carried out using the document "Revaluation of foreign currency funds", during which the recalculation of currency and debts denominated in foreign currency is carried out in accordance with accounting and tax legislation.

Calculate insurance costs. The document “Expenses for voluntary insurance” created when performing this operation is intended for writing off future expenses for voluntary insurance of employees in accounting (76.01.2 “Payments (contributions) for voluntary insurance of employees”) and tax accounting (97.02 “Deferred expenses for voluntary insurance”) employee insurance").

Documents for the next regulatory operation Calculate salaries and unified social tax are created without passing through its form. Such documents include:

  • Payroll(menu Interface "Calculation of salaries of employees of organizations" - Salary calculation - Payroll);
  • Unified Social Tax calculation(menu Interface "Calculation of salaries of employees of organizations" - Taxes - Unified Social Tax calculation);
  • Reflection of salary in regulatory accounting(menu Interface "Calculation of salaries of employees of organizations" - Salary accounting - Reflection of salaries in regulatory accounting).

Operation Calculate VAT involves the creation of many regulatory documents, and therefore the progress of its implementation can be monitored using a separate graphical diagram (Fig. 10). After completing all the prescribed regulatory operations, the background of the diagram darkens, and the operation Calculate VAT on the main diagram it becomes completed (shaded).

Rice. 10. Graphic diagram of the implementation of regulatory operations for VAT

Distribute expenses by type of activity, standardize expenses

When posting a document Regular tax accounting operations (income tax) those routine operations that are marked in the document dialog form will be performed.

Distribution of expenses by type of activity (UTII/non-UTII). This operation is used if, along with activities subject to UTII payment, activities are carried out that do not fall under the specified special regime. The operation distributes expenses that cannot be directly attributed to any type of activity, in proportion to the share of income from each type of activity in total income.

Rationing advertising costs. Rationing the costs of voluntary insurance and the cost of reimbursing employees for interest payments. Rationing of entertainment expenses. These transactions are used in relation to the specified expenses, taken into account for tax purposes according to the standards established by Chapter 25 of the Tax Code of the Russian Federation.

Calculate the cost (BU, NU). Calculate the cost price (CC)

The documents created during these operations calculate the actual cost of production, performance of work, provision of services in accounting, tax and management accounting.

Operation Cost calculation available only when using RAUZ. It is carried out by the document Calculation of production costs into several actions, the composition of which may be different for different organizations (Fig. 11).

The sequence of actions in the document does not matter, since the program contains an algorithm for automatically performing them in the correct sequence.

Rice. eleven. Calculation of production costs

Generate financial results

This regulatory operation serves to determine the financial result for income and expenses reflected during the month in accounts 90 “Sales” and 91 “Other income and expenses.” The financial result identified by this document is written off to account 99 “Profits and losses”.

The document being created can also write off losses from previous years for tax accounting purposes, in accordance with the requirements of Article 283 of the Tax Code of the Russian Federation. The amount of losses is calculated as follows: if at the time of closing the month there is a debit balance in account 97.11 “Losses of previous years”, the amount of write-off of future expenses is calculated according to the rules specified in the analytics built on the reference book Future expenses. The amounts received are written off to account 99.01 “Profits and losses without income tax.”

Calculate income tax

Document I calculates permanent and deferred tax assets and liabilities in accordance with the norms of PBU 18/02 "Accounting for income tax calculations", determines the amount of conditional income tax expense (or income), and also accrues current income tax in budget (with distribution by budget levels).

Close the year

Document Closing of the year reforms the balance sheet and closes income and expense accounts in tax accounting. Such a document is created at the close of December.

After completing all routine operations provided for by the launched month-end closing procedure, this procedure is considered completed. The background of the graphic diagram displaying routine operations darkens (Fig. 12).

Rice. 12. Graphic diagram of the completed month-end closing procedure

Cancellation of routine operations to close the month

If you need to cancel one of the routine operations to close the month, you should perform the following actions. In the diagram of the running procedure for closing the month (menu Regular operations - Closing the month) you need to right-click on the graphic image of the operation being canceled and select an action Cancel execution of a routine operation.

In this case, the program will cancel the execution of the selected routine operation, and all routine operations following the canceled one in the scheme will be deleted. The processing of documents created as part of these regulatory operations will also be cancelled.

In order to cancel the execution of not just one routine operation, but the entire procedure for closing the month, you need to click on the menu button Actions month closing procedure forms, you need to select the item Cancel procedure start. The program will cancel the execution of all routine operations and documents, and the month-end closing procedure will be transferred to the “not started” state.

Certificates of calculations for final transactions of the month

To create accounting documentation and output it for approval and storage on paper, a set of reports called “References-Calculations” is provided (menu Interface "Accounting and tax accounting" - Regulatory operations - Help and calculations).

They include the following certificates and calculations:

  • Revaluation of foreign currency(revalued accounts are reflected in the context of analytics, exchange rate differences);
  • Write-off of deferred expenses(shows the amount of each RBP allocated to current expenses, the balance of the unwritten off amount);
  • Cost rationing(the report includes bases for rationing entertainment, advertising and other expenses, amounts taken into account when calculating income tax on an accrual basis for the tax period and for the closing month);
  • Permanent and temporary differences(reflects permanent and temporary differences, the procedure for recognizing and writing off permanent and deferred tax assets and liabilities calculated on their basis);
  • Income tax calculation(income and expenses taken into account and not taken into account for the purposes of Chapter 25 of the Tax Code of the Russian Federation are compared, the financial result is identified according to accounting data, adjustments to the accounting financial result are shown, the tax base for the income tax, the tax is calculated);
  • Recalculation of the value of deferred assets and liabilities(used when recalculating ONA and ONO during the legislative reduction in the income tax rate from the beginning of 2009).

Many people remember the problem of slow processing and retransfer of documents in the 1C 7.7 - MS SQL combination.

I encountered the same problem once, after I transferred the trading base of my enterprise from DBF to SQL.

It was then that this technology was implemented. Although the idea itself appeared to me a little earlier.

Given: batch accounting of goods, FIFO, write-off of cost at the time of re-posting the document. Up to 2,500 documents with movements in commodity and cash accounting registers per day, which amounted to about 60,000 per month. On average, 22 lines per Inventory Implementation document. Frequent adjustments in the current month's commodity documents "retrospectively". Sales by TP. Control by the director of cost/markup on-line. The average time for processing documents Implementation of goods and materials (as the most “heavy”) is 2-2.5 seconds.

Need to: quickly, preferably within 4-5 hours, restore the entire sequence before closing the month. Moreover, life has shown that the process can be repeated 2-3 times. At the same time, without making any changes to the structure and coding of the configuration.

Let's look at the movements in the "Batch Availability" register of the document Implementation of Inventory:

We know that when writing off batches of inventory items, the balance is written off from the batch that arrived first. If the quantity of goods being written off is greater than the quantity in the balance of a given batch, a write-off occurs from subsequent batches.

Let's look at the "Batch Statement of Inventory and Materials":

There is a copy of the batch. What conditions can lead to this?

1. “Crawling” of documents from the previous batch;

2. Reducing the quantity/value in the receipt/receipt document;

3. Increase in the quantity in write-off documents;

4. A return may have been removed from this batch;

5. The document may have been moved according to the time of the document log - from the end of the day to the beginning, or moreover - from one day to another.

We no longer care about who, when, what, where and why. Our goal is to remove the “redness”.

If you do this by hand, what is needed for this? That's right, repost documents numbered 3845 and 3846 sequentially. After that, they will “slide” to the next batch. Then we update the report and see if there is any “redness” in the next batch.

At the same time, for all other documents, re-processing will not play any role! All products will remain within their “native” batches.

Well, what’s stopping us from writing an analytical module that will check this correspondence between parties? Nothing.

The analysis showed that such changes in the total mass of movements amount to no more than 10% of the total number of documents per month. But it’s still easier to transfer 6,000 than 60,000.

This means, sequentially, for each document from the processed period, we build a table of the ratio of the number of goods in the document, balances by batches and movements in the batch register of this document:

Discrepancies in balances and batches are highlighted in color.

Actually, the very fact of at least one discrepancy in such a table is already a signal that this document should be revised.

By the way, in a direct SQL query it is possible to implement a variant of a complete analysis of such situations, which we managed to do as a result: the query returned us only rows with a shortage of goods. For this example, these would be product lines No. 3, 6, 8.

We found discrepancies and rechecked them. Then the next one.

The payment analysis was organized by analogy.

This approach made it possible to perform preliminary analysis at a speed of up to 5 documents per second. And given the fact that the analysis itself no longer required blocking the database by switching to exclusive mode and did not interfere with the processes of creating and maintaining current documents, in the future, the restoration of the sequence often occurred not only at night, but also during working hours without any particular interference for employees.

23/10/2015

Parallel batch recovery

Modern accounting tasks of manufacturing enterprises remain quite complex for any systems, especially those operating under high load - large document flow or number of users. And one of the most difficult tasks remains the task of calculating the cost of production.

Typical 1C configurations, for example, “1C: Manufacturing Enterprise Management” (UPM), have long offered many mechanisms to simplify these calculations, for example, the tools of the RAUZ (advanced cost accounting analytics) mechanism. This mechanism really allows, in some cases, to significantly simplify technically, and therefore speed up the cost calculation functions. The only problem is that it is not always possible to use this approach, and enterprises have to use the good old batch accounting, and along with it, use the procedure for restoring batch accounting.

In most cases, with significant document flow, it is the task of “restoring batches” that is the most labor-intensive and time-consuming in the process of closing the month and calculating costs. Let's take a closer look at it from all sides and look at what ways there are to optimize and reduce time.

The first thing you encounter when implementing projects to optimize the performance of the batch recovery procedure is outdated methods of performing this procedure, namely, a complete re-processing of documents. Sometimes these are only certain types of documents participating in “batches”, sometimes everything indiscriminately. It seems to us that this approach comes from those times when there were really no other alternatives, or from those configurations in which this was the only way. However, now for the soft starter configuration we are considering, this is not the case. UPP has more accurate and efficient mechanisms for performing these tasks, namely:

  • The procedure for restoring the sequence of batch accounting (separately for management, accounting, organizations)
  • Procedure for restoring mutual settlements (defining advances)

Each of these points is implemented by separate processing, which, instead of completely re-posting documents, only corrects the movements of a very limited number of registers, due to which the process is completed incomparably faster. The second processing to restore mutual settlements proceeds in approximately the same way. In addition, if you compare the operation of these mechanisms with the usual reprocessing of documents, you may encounter the following problem that distorts accounting data: sorting by date of documents, necessary to arrange documents “in chronological order,” works with an accuracy of seconds, and within one second the system can there are several different documents (for example, receipt and write-off), the sequence of processing of which will determine the generated cost. During normal operations, there is no way to ensure such an order, and such a calculation can give different results from time to time. To solve this problem, the platform provides a special object, “sequence,” which solves this problem and is always guaranteed to arrange documents in the same chronological order, and sequence restoration processing is always based on this order.

Okay, but what if we use exactly these treatments and still the process of restoring batches takes a long time, for example, does not have time to be completed overnight? At the same time, server capacities are most often idle (not even 30% loaded).

In our experience, the processing time of one document does not exceed 0.2 - 0.8 seconds and the code itself for correcting movements is written quite well. To get a significant increase, you need to reduce this time, for example, from 0.2 seconds to 0.05, which seems an almost impossible task, even if we consider the possibility of changing not only the configuration code, but also completely replacing the equipment with the latest generations of processors and storage systems data on Flash/SSD. Is there really no way out?

It turns out that he is! Here our experience in Olympiad programming and an inquisitive mind come to our aid, which whispers a seemingly absurd phrase - let's make the process of restoring the “sequence” “parallel”! It would seem that this is impossible, because we deliberately “arrange” documents strictly one after another and that is how we process them. This explains the slowness of the process - it runs in one thread, limited by the performance of one processor core of servers, which, as a rule, have quite a lot of other cores idle at this time.

In fact, placing documents one after another is a simplification that is intentionally used and guarantees the correctness of accounting, but is not the only possible solution. Each document in the sequence does not depend on all previous documents, but only on some, for example, on those documents that contain the same nomenclature. At the same time, all other documents do not need to be posted “before” our selected document, and they can be posted in parallel!

Frankly speaking, such an idea and approach are certainly not new; for example, in the knowledge base of the 1C company on technological issues there is an article (http://kb.1c.ru/articleView.jsp?id=72) that described similar approaches. You can also find other similar topics on the Internet, including various interpretations of such approaches (for example, the “blocking mechanism” http://www.softpoint.ru/article_id375.htm, etc.). However, the problems with all of these approaches are that they are based on certain assumptions or artificially formed “blocks” of data processing, and do not have a clear processing sequence. We wanted to eliminate these shortcomings using the most “academic” approach, and we believe that we succeeded.

The parallel batch recovery process we implemented consists of two important stages. The first and key stage is the calculation of document dependencies from each other using special algorithms, including taking into account general applied assumptions. For example, you can notice that all receipts form new batches and do not depend on anyone “before”, unlike write-offs. All such dependencies are represented in the form of a graph, the points of which are documents, and the edges are their dependencies. Strictly speaking, this is a directed graph, but the way to traverse it differs from classical techniques and algorithms, so we had to write our own, for which this is not important.

The second stage is direct restoration (correction of movements), only not according to the sequence in which documents are registered by the platform, but according to our graph. At the same time, what is important is that the code itself and the algorithms for generating movements remain completely standard, which means that the configuration retains the possibility of updating. All our modifications are located in a separate subsystem and only use the functions of common modules, which are also used in standard processing. This also guarantees the correctness of the result - it will always coincide with a typical, sequential recovery. Moreover, this is also true for industry solutions (for example, “1C: Poultry Farm Management”), where specific documents may be present in the sequence. The presence of the first stage and further classical depth-first traversal of the graph even make it possible to predict both the processing time and the degree of “parallelism” of the process, which obviously depends on the specific data in the database. With the help of these mechanisms, we can understand the required server resources and also manage them effectively.


The actual processing of a queue of documents using such a graph does not present any difficulties and is quite typical - there is a controlling background job that determines the documents available for processing in the required order and launches the required number of working background jobs, each of which processes a specific document. The entire process occurs asynchronously, which means that the operator does not need to keep the soft starter session open in which the launch was made - everything will work on its own, dynamically displaying the process on a special diagram. Here you can regulate the load - the maximum number of threads (background workers) that will be launched simultaneously. And here you can even pause this process by pausing processing, as well as continue it, without the need to re-calculate and start. Since at the first stage we carry out special calculations in order to be confident in the possibility of parallel processing of documents, deadlocks and lock timeouts are practically eliminated during processing. The process can only be interfered with by parallel users who can only slow it down a little, but this will not break anything and the result will be correct in any case. Yes, you understood correctly - you can restore the sequence quite effectively even with working users, the main thing is to exclude data changes during the recovery period.


So, the problem seemed to be solved, the algorithm was written, verified and tested in the smallest detail, but the launch on a real working base, having started to work in normal mode, began to significantly degrade in performance by the middle of graph processing. The processing time for one document began to exceed 10 seconds (instead of the planned one - no more than a second), and here standard approaches to optimization were already applied - analysis of query plans and their optimization. As a result of this work, we found a standard query in the UPP, which, by slightly rewriting, can eliminate such degradation, while its results remain exactly the same as in the standard form. This “patch” can be used both for sequential restoration of the sequence and for complete re-processing of documents. We can provide it absolutely free of charge, upon request to our email: .

Now we got exactly what we planned: a manifold reduction in sequence restoration time (more than 16 times!), efficient equipment loading, convenient and flexible tools for managing the process. But the most important thing is our satisfied customer, which is always our main goal and highest value.


You will be able to read the review very soon on our website.

And finally, a small checklist for you.

Basic sequencing techniques, from the simplest to the most innovative:

  • Do you re-post documents to restore the sequence only for those documents that are used in the batch accounting sequence and sorted by point in time, and not by date?
  • Instead of re-posting, do you use a specialized mechanism for restoring batches and mutual settlements (in UPP and similar configurations)?
  • Using our proprietary multi-threaded, parallel batch recovery? J

Represents the sequential creation and processing of a certain type of documents and the implementation of special processing.

Depending on the types of business transactions reflected in the system, the composition of documents and processing may change. This article lists the most common ones. Let's look at step-by-step instructions for closing a month in.

Some actions which, in my opinion, need clarification , will be commented.

In addition, the month-end closing process may refer to a systemic business process; it requires preliminary configuration. Based on work experience, I can say that the feasibility of its use is questionable; the procedure for setting it up and using it will not be described.

Procedures step by step

Before starting the month-end closing procedure, it is necessary to carry out some operations to organize the system data. Executing these processing involves significant time expenditure; it is advisable to carry them out when there are no active users in the database (so as not to change a document that has already been processed).

Get 267 video lessons on 1C for free:

Based on the above, it is advisable to conduct them during non-working hours. The indicated processing is carried out before closing the month in the 1C UPP 8.2 database, in the case of using the cost accounting mode -. If RAUZ is used, these processing operations are not expected to be executed.

  • Restore the sequence of settlements for an acquisition – processing (Restore the sequence of settlements).
  • Restore the sequence of calculations for the implementation - processing (Restore the sequence of calculations).
  • Restore the sequence of batch accounting - processing (Post by batch).
  • Adjustment of the cost of writing off goods - document (brings the cost to the moving average).
  • Depreciation of fixed assets - document.
  • Repayment of cost () – document.
  • – document.
  • Revaluation of foreign currency - document.
  • - treatment. Finds advances received (balances on account 62.02), when you click the “Run” button, creates invoices for the advance, if such invoices are already present in the system, overwrites them (does not double them).
  • Confirmation of zero VAT rate – document. To be filled in if there is appropriate accounting in the system.
  • Formation of purchase ledger entries – document.
  • Generating purchase ledger entries (0%) – document. To be filled in if there is appropriate accounting in the system.
  • Formation of sales book entries – document.
  • Generating sales ledger entries (0%) – document. To be filled in if there is appropriate accounting in the system.
  • Cost calculation - document. The most important document closes costly accounts.
  • Determination of financial results - document.
  • Income tax calculations – document.