Charts of characteristic types were introduced as a logical development of catalogs for particular tasks that require some properties you cannot define for catalog elements, and some new ways of handling configuration objects.
Charts of characteristic types are generally used for storing descriptions of characteristics (or object properties) created by users:
The system limits the value types that you can use for characteristics. You can see it in Designer when you set up charts of characteristic types.
You have possibly noted that some types (for example, types available for object attributes) are now missing from the list. And there is another limitation: you cannot set unlimited length for a string type. This is due to the main purpose of the chart of characteristic types stated above.
In addition to the limitations that you see in Designer, developers of applied solutions can set their own limitations.
You can only see the types available for use in the list. Use the check boxes, including the composite type check box, to define the types that are required for describing the characteristics according to the business logic of your solution.
The limitations come into effect in Designer once you try to create a predefined element of the characteristic type.
Only the data types you have selected before will be available in this case.
You can also meet this type of limitation when you set up a characteristic in 1C:Enterprise mode:
In addition, a user may face the problem when data types provided by the system are simply not enough for them. In this case, they can use an auxiliary catalog created by the developer beforehand and specified by the developer in the Additional characteristic values property of the chart of characteristic types:
As you can see, there is only one catalog shown in the list. So where are the rest?
The only reason why the ValuesVariants catalog is displayed is that it is subordinate to your chart of characteristic types (this is required to enable its selection as a source for additional characteristic values):
Also, remember to include the catalog in the Characteristics value type list (otherwise it would be impossible to select the catalog when you create a characteristic).
If you forget to add the catalog specified in the Additional characteristic values list to the Characteristics value type list,
the system will remind you of this by displaying an error message when you try to update the database configuration:
In a chart of characteristic types, characteristics can be stored hierarchically, but only folder hierarchy is available:
Hierarchies help to divide the characteristics of a chart of characteristic types based on their purpose, for example, by using a number of predefined groups:
If there are characteristics to be defined at the development stage (for example, you want to be able to deal with them programmatically), you have to create them in the corresponding groups.
Other characteristics can be defined at run time.
Or, if you select the reference value type,
you can fine-tune it in the Values Variants catalog:
You will have to specify a characteristic type for each new value variant while adding new value variants to the catalog:
As you may have already noticed, your Object Properties chart of characteristic types only stores characteristic types for the following accounting objects:
and their settings:
But where are the values of your properties if you only see their descriptions here? Nowhere yet!
You have to use a data storage mechanism you are already familiar with to create property value storage. In this case, a value is related to a pair of conditions at the same time. This relationship can be described as: Object — Property — Value
Of course you have to use an information register to store your values. Give it a name CharacteristicsOfItems and specify Characteristics as a synonym.
A combination of conditions to be stored is defined by dimensions.
The Item dimension will be used as an object.
For your Property dimension, select the values from the Object Properties chart of characteristic types (but only those from the predefined group PropertiesOfItems).
Then proceed to the resource Value.
However, you may ask, "What type should I specify when I set data type for my resource?"
Please remember where you were setting available types for your chart of characteristic types.
In the data type of your Value resource, you have to access the Characteristics value type setting of the chart of characteristic types. This can be done using a special type called Characteristic.
Now there are only two more little things to take into account.
To illustrate the first one, consider the following situation. The Term of Warranty property type is set explicitly, but while you are selecting a value, all types are available within the chart of characteristic types.
You have to limit the set of types available during property selection. To do this, link the Value and Property fields by type:
As a result, the system will not prompt you to select the type, but it will define the value type automatically, and you will only have to enter the correct value:
Second, consider scenarios with properties where Values Variants is specified as a value type.
In 1C:Enterprise mode, create two new characteristics with the Values Variants type: Color and Type Of Pencil.
Set the following options for the type of pencil:
Then define color options:
Then, define a characteristic for the Pencils item:
Select the characteristic value:
You can see some extra lines from your global catalog Values Variants in your selection form. You only need those, though, that are related to the selected property (in this case, the Type Of Pencil property). In Designer, set a filter by the value of the Property field for the selection form.
Now, let us check if everything works right. Create a new characteristic for Pencil.
Now the system automatically selects valid values for the Type Of Pencil property from the Values Variants catalog.
Creating and using charts of characteristic types
Create a feature to store characteristic values for Clients and Suppliers. This should be done in separate information registers with a single chart of characteristic types.
Add the following data:
Objects of Document type help to store information about the commercial transactions or other events in the enterprise.
1C:Enterprise 8.2 uses the standard document attributes Number and Date and supports customization of their presentation:
These attributes are important document characteristics, which make it different from others objects. In 1C:Enterprise 8 values of Date type also include time. The maximum length of a number is increased to 50 characters (for a string data type):
The system supports automatic numbering of the documents, i.e., it can generate numbers for newly created documents.
By default, numbers are generated when you write the document into the system. This operation is connected with a special event. If autonumbering is enabled, the OnSetNewNumber event is activated.
In addition, the system controls the uniqueness of document numbers and does not allow you to create documents with identical numbers:
You can use platform tools (without programming) to set the general rules for the uniqueness control and autonumbering features.
Since the documents are always connected to some point in time by the Date attribute, the system should "know" the time interval in which it should check the numbers for uniqueness and when to restart the numbering. If the value is set to Non-periodic, the number uniqueness is checked for all documents of the specified type stored in the database, and autonumbering is never reset.
To describe the rules of continuous document numbering, use a metadata object of Document numerator type.
To use a single numerator in your documents, select the numerator in the Numerator box on the Numbering tab.
After that, individual numbering customization for configuration objects will be disabled as the numbers will be taken from the numerator.
However, in addition to using a single numerator for different types of documents, you may need the opposite functionality. For instance, you may need to have separate numbering of documents belonging to the same time, taking into consideration both the document’s position in the timeline and some data from it, i.e., to implement separate order numbering for individual customers.
1C:Enterprise 8 also supports this feature, but now you have to do some programming:
1. Open the object module of your document.
2. Click Procedures and functions.
3. Type the procedure to be used as a handler for "set new number" events:
Note. Set the Prefix attribute of the Clients catalog before performing this step.
4. Open the configuration in 1C:Enterprise mode and add several documents of Customer Order type. Note that a number is automatically assigned to each new document.
Each document can have several attributes and tabular sections with different structure.
There are no other common document attributes. The support of common attributes used to slow down system performance during intensive document input, and the rest of the common attributes were removed from version 8. However, this functionality can be implemented using another feature – information registers with charts of characteristic types.
Posting support is one of the most important characteristics of a document.
The Post property of configuration objects is used to turn this feature on.
In 1C:Enterprise mode, a tool for bulk document posting or re-posting is available.
In the Document Posting dialog box
you can specify the following:
• period (a time interval for searching for documents);
• posting mode;
• types of documents to be posted.
There are two posting types:
• real-time posting (this can be disabled);
• regular posting.
When a document is posted, it can change the state of some data records.
If a document is not postable, this means it represents an event that is not relevant to accounting in this particular applied solution.
A list of available registers and a list of registers used for posting specific document types are available on the Register records tab of the configuration object editing window.
Only information registers with the following setting are displayed in the list of available registers on the Register records tab:
If the list of registers used for posting a specific document type is empty (the list is filled automatically when you select check boxes in the list of available registers), it is impossible to form records related to this type of document in the register. The system will display an error if you try to implement an algorithm to form records in the register.
The algorithm that introduces some changes to the state of accounting data when posting documents is described by the script at the development stage.
The system includes a wizard that helps developers to create document posting algorithms. You can call the wizard only from the shortcut menu of the metadata tree:
Another option is pressing the
Register records tab in the configuration object editing window.
If no type of register is selected, you cannot run the Wizard:
The Register Records Wizard only works with registers that use the selected document type as a recorder:
• either the document types are selected on the Recorders tab in the register settings,
• or the registers are selected on the Register records tab in the document settings.
If two or more types of registers are selected, at the first start of the wizard the system will prompt you to select the register to be used to create the algorithm:
When the register is selected, the system opens the Wizard:
Fill in the record creation rules in the Expression column with mappings between register fields and document attributes, or with arbitrary expressions.
Then you can proceed to establishing the next algorithm creation rule (if registers where the document can create records are still available):
Fill the Expression column:
You can switch to the previous rule if you need.
When you have defined all rules, click OK to generate the algorithm and view the output of the Register Records Wizard.
If you run the Wizard again, the system will give you a warning:
If you have not made any manual edits to the algorithm, it will be loaded to the Register Records Wizard for further adjustment when you click Yes.
Use the Register records tab in the configuration object editing window to define a rule that will delete register records for the document:
This property is only available when the value of the Posting property is set to Enable. This option defines that all records entered during posting are automatically deleted when the document is reposted or unposted. Automatic deletion is performed by the system when a previously posted document is reposted (before writing new records), or when a document is deleted, or when document posting is canceled.
We will discuss the system behavior during document posting later, when customizing the behavior model of your applied solution.
Create a new document and name it Payment from Customer. Use the numbering system from the numerator PaymentForServices.
Tabular section attributes (tabular section name is ServiceAcceptanceActs)
Journals are used to group documents of different types that are implicitly connected, for instance:
To create a new document journal, right-click a branch of the metadata tree named Document journals, and then click Add.
On the Main tab, specify a name and a synonym for the document journal, for example, HRDocuments:
Each document type can be shown in multiple journals.
You can include documents of certain type when customizing a document journal and view the ones already included on the Data tab:
A document journal includes a set of standard attributes.
You can also view additional information from the documents by customizing the appropriate columns. A single attribute from each document can be taken to customize the journal columns.
Define the documents to be registered in the journal on the Data tab, and specify any additional journal columns in the Graphs list.
Create a document journal named Global Journal. Create a journal column named Author.
Objects of Sequence type are used for checking whether the changes made to the accounting data by the documents are correct.
In addition, you can use sequences to recover the change history (in 1C:Enterprise mode).
You can think of the sequence recovery process as of selective reposting of documents of a certain type.
The document posting algorithm usually records information contained in a document for accounting purposes. However, in some cases, the document posting algorithm also analyzes the current totals and uses these results in posting.
For example, if a document is used to write off goods or materials at average cost, the posting algorithm analyzes the balance of the goods at the moment of write-off both as the quantity and the totals in order to calculate the amount to be written off.
For example, 10 items of merchandise at a price of 26 USD are entered into an invoice. The remainder of the merchandise at the enterprise from the point of view of the totals is 260 USD. The merchandise was then sent to the customer. When this invoice was posted, the remainder of the merchandise was analyzed and the average cost of an item of this merchandise was calculated to be equal to 26 USD. Therefore, the remainder of the merchandise at the enterprise is equal to zero from the point of view of both the quantity and the totals.
A few days later, a mistake was discovered in the invoice: the cost of a merchandise item is not 26 USD, but 20 USD. The required changes were made to the invoice, and it was posted again. The data in the accounting system turned out to be wrong, since all the subsequent documents introduced changes based on the old cost of goods, therefore they were not "aware" of the cost change.
To avoid this, you can unite these two documents in a single sequence. In this case, the system will automatically detect that the document sequence has changed and will be able to re-post all the subsequent documents that can depend on the posting results of the invoice in case an invoice changes. In other words, the invoice will be posted again, and a new cost (20 USD) will be obtained as a result of the remainder analysis to be used later in the merchandise write-off.
Let us assume that a StockAccountingSequence with ReceiptOfMaterials and ReceiptForServicesRendered documents has been created in the configuration.
The Move the boundary when posting property value has been set to Move. This means that when you post a document registered in this sequence, it will try to move the boundary of the sequenced documents. If the Do not move value is selected, the document posting will not move the boundary of the sequenced documents.
The Register records affecting the sequence property specifies register records that will influence the reposting of documents in the sequence, i.e., which accounting records or totals are used when the sequenced documents are posted. For example, register records might be used.
Sequences may have subordinate objects called dimensions. You can create them on the Data tab of the sequence editing window.
Create a new dimension named Subdivision to match the Subdivision attribute of the documents in the sequence.
In the 1C:Enterprise mode the platform automatically maintains a sequence boundary for each document sequence in the configuration. The document position acts as the sequence boundary. When documents are posted one by one, the sequence boundary is placed on each newly posted document. However, if you post a document that relates to this sequence but is placed later than another posted document that relates to the same sequence, the sequence boundary will not be moved forward, since this violates the document posting sequence.
When documents are posted post factum, or when document posting is canceled, or when documents are deleted, or if register records that influence a sequence are deleted or recorded, the sequence boundary is moved to the time of the modified document.
There is a special feature for restoring the document posting sequence in the document reposting mode (All functions — Standard — Post Documents). When this feature is used, the system automatically reposts all documents related to this sequence (the posting mode is regular) from the sequence boundary up to the specified location.