Document posting guidelines
Scope: managed applications, mobile applications, and ordinary applications.
1. Documents are metadata objects that store original entries and serve as the data source for the application's calculated metrics. For example, for retail apps, documents mostly store business transaction records; for ERP solutions, documents store manufacturing activity records.
2.1. Posting of a document is the process of registration of its transactions—that is, their transfer to the register. Most documents are supposed to be posted (the property Posting is set to Enable).
In terms of the application logic, a posted document is distinct from an unposted document in that the latter is considered a "draft," which is not registered in accounting books. Users can save draft documents even if otherwise required fields have no entries. They are not subject to checking, validating, and other business logic restrictions. Draft documents are not present in accounting, do not provide data for reports, and so on.
In contrast, a posted document is a finalized accounting entry that provides the data for the accounting books and registers.
2.2. If a document's life cycle includes a number of stages, you can provide the document with statuses that will define its current stage. For example, the document Sales order could have the following statuses: Open, Submitted, Paid, Overdue, and Canceled.
In such case, the first posting creates an initial accounting record, while the document statuses affect the record details.
When a user changes the status of a posted document, the application might prompt them to enter specific data based on checks and business logic restrictions for each stage. 1C:Enterprise does not track status changes for unposted draft documents.
Example of status-specific document behavior:
- For a posted Sales order document:
- In the Open status, only the main order parameters are checked.
- In the Submitted status, the Shipment date field is required.
2.3. There are exceptions to the rule that most documents are supposed to be posted:
- Documents that do not generate accounting records. These documents only record time-based events, such as incoming emails, calls, and meetings.
- Documents whose posting procedures significantly differ from the standard 1C:Enterprise procedures. However, these documents are still displayed to the user as if they are posted. For example, the Period-end closing operation document for month-end closing with manual record adjustments.
Such documents are never posted.
2.4. When a user needs to record an event and generate the corresponding accounting records in a single operation, they have to create a document and save it in the posting mode.
Do not use other methods to accomplish this task, especially by disabling document posting.
3. To add an event to accounting records, you might need to generate secondary time-based or object-related data. Such data should be stored in registers. The register records are generated during posting, automatically or manually.
For automatic generation of register records, users enter the event data to the document and the register records are generated during document posting. For example, bookkeeping transactions generate register records automatically.
For manual generation of register records, users can enter data directly into registers using documents referred to as manual operations. These documents can be used to enter opening balances or record business activities that cannot be described by standard business activity documents available in the configuration.
4. Sometimes, you can use a separate document to generate register records. This makes sense in scenarios where multiple document types require similar processing, bulk document processing is involved, or different user responsibilities are required for different parts of a complex business process. In such scenarios, a series of events can be implemented as a document chain, one document based on another, rather than a single document that changes statuses. In this chain, only certain documents generate register records.
For example, a sales order is created in the Sales department and it cannot be changed during posting. In this scenario, the Sales order is created by a salesperson and never posted, while a logistics specialist checks that the requested quantity of goods is available and creates the Shipment document, which generates register records and is based on the "Sales order" document.
5. Unposted documents and documents marked for deletion must not have active records.
6. Even if a document does not generate any register records, its posting should still be enabled. This is necessary to visually distinguish between draft and approved documents.
7.1.1. If no data affecting the posting is changed in a document (for example, only the Comment attribute value is changed), the reposting of that document must not result in any changes to its records.
There can be exceptions in cases where register records are partially or fully generated by external algorithms (see item 4).
7.1.2. When developing record generation algorithms, avoid solutions where the generation outcome depends on the state of accounting registers, such as the balance. In this case, posting results will depend on the document input sequence.
Certain reasonable exceptions may apply to this rule, for example, batch accounting algorithms designed to analyze the sequence.
7.2. To implement the logic described in item 7.1, make sure that documents generate records based on the data stored in them. Any data not saved to the document must be locked for editing. To do this, take the following steps.
7.2.1. If users have permission to modify external data (for example, master data attributes) that affects record generation, the attribute values must be saved to the document.
Otherwise, the data must be locked for editing. In configurations based on Standard Subsystems Library, we recommend that you use the Object attribute lock features.
Exceptions to this rule are outlined in 7.1.2.
7.2.2. Minimize the impact of application settings, such as functional option values, on record generation. This will allow users to easily modify these settings.
Here are some techniques to achieve this:
- Specify a start date for when a setting applies and consider this date in record generation algorithms.
- Populate disabled required fields with default values to allow users to enable the setting. Only disabling the setting will be restricted.
- Generate records without considering the setting and implement additional measures in objects displaying information from accounting registers. For example, if a dimension of an accumulation register is disabled, it will be hidden in the register reports.
7.2.3 If all measures to prevent record generation from depending on application settings have been exhausted, choose one of the following options:
- A data processor started automatically in the background after a user changes the setting. Users must be notified accordingly before they change the setting.
- A data processor started manually by the user. Users must be notified accordingly before they change the setting. Interfaces that handle data to be processed (for example, reports) must also prompt users to start the data processor.
- If the data processor cannot be used, users are to be advised not to change the setting after the accounting start.
However, the application behavior can vary when enabling or disabling the setting. For example, enabling the setting triggers no warning, but disabling is not recommended.
7.3. To comply with item 7.1 when modifying the record generation logic, provide infobase update handlers or ensure support for previous record generation algorithms.
8. In most scenarios, accounting data recording can be undone. Use the undo posting feature provided by 1C:Enterprise.
See also: