Let us create the document that directly modifies register records.
- Create a document configuration object named InputOpeningMaterialBalances.
- On the Posting tab, disable the document posting.
You need this because you will develop a custom algorithm for writing register records.
- Specify that the document records are located in the BalanceOfMaterials accumulation register (fig. 21.1)
Fig. 21.1. Disabling document posting
- On the Forms tab, create the default document form.
- In the form editor, on the Attributes tab, expand the main form attribute Object, expand the RegisterRecords collection, locate the BalanceOfMaterials item, and drag it to the form controls pane.
- When prompted to answer the "Add columns to the table?" question, click Yes (fig. 21.2).
Fig. 21.2. Editing the Input opening material balances document form
Note that in the property palette of this table, in the Data property, a link to the data of the Object.RegisterRecords.BalanceOfMaterials register record set is generated.
Let us slightly modify the form appearance.
- In the form controls pane, add a group of the Regular group (no visual presentation) type with Horizontal grouping and drag the Number and Date document properties to this group.
- Swap the positions of the PropertySet and Warehouse table fields (fig. 21.3).
Fig. 21.3. Modified form of the Input opening material balances document
Let us edit the command interface of the document form to add the command that opens the list of BalanceOfMaterials register records related to the document to the navigation panel.
- In the upper left pane of the form editor, click the Command interface tab.
- In the Navigation panel group, in the Go to subgroup, enable visibility for the command that opens the Balance of materials register (fig. 21.4).
Fig. 21.4. Editing form command interface
- In the editor of the InputOpeningMaterialBalances document configuration object, on the Subsystems tab, specify that the object belongs to the Accounting subsystem.
Finally, let us edit the command interface of this subsystem.
- In the configuration tree, right-click the Accounting subsystem and then click Open command interface.
- In the Actions panel.Create group, enable visibility for the Input opening product balances: create command.