Now, add building blocks that may not be obvious from the first sight: Accounts and Expenses accumulation registers. 

Questions "What is a register? What is its purpose?" immediately arise.

Below you will find a simple explanation.

According to project requirements, the application must not only store lists of accounts and categories, but also should be capable of keeping records of financial transactions. At least, it should keep records of cash flow and provide simple financial reports.

Registration of various events related to money income and expense will be implemented by using configuration objects named Documents. Later you will add a couple of documents to the configuration.

Together with registering money incomes and expenses, it is required to create some reports that show the flow of money. At least, you need to know balances of our accounts and turnovers by categories.

These reports can be created using data that is contained in user-created documents. These documents reflect actual receipts and expenditures of money. However, imagine that in a month (or a year), for example, you decide to supplement your financial records with new documents or functionally expand existing ones. Or there will be so many documents that it would waste a lot of time to get required data.

Making configuration changes, as you have already seen, is a simple task. Algorithms of calculating are changed easily. But the number of the tasks would snowball through time. You will have to take into account all those changes redoing the algorithms again and again. The chance of making errors would also increase.

To avoid this work, 1C:Enterprise uses the following development methodology.

To store data regarding activity of accounting subjects (for example, finances), configuration objects named Registers are used. Documents, which reflect business activities, record data to these registers. Required data is retrieved from the registers.

As a result, you have a separated structure. On the one hand, once there is a complete set of registers, it is easy to create required reports that will show data contained in these registers. On the other hand, when a new type of document appears in the applied solution, you only need to write the correct algorithm to store data to registers. This methodology guarantees that previously created reports will not require any alterations and will display correct data. 

Figure 4-1. Documents-Registers-Reports diagram

So, for meeting project requirements it is enough to create two accumulation registers, name them Accounts and Expenses.

Point of Accounts is to store balance of accounts, so that you could quickly find out how much money is available now.

Expenses would help you analyze turnovers by categories. In other words, the register shows expenditure level per category, for example, you can use this information to find the biggest expense category. 

Accumulation registers are located in the Accumulation registers branch of the configuration objects tree. Add a new accumulation register. 

Figure 4-2. Adding an accumulation register

Name our new register Accounts. Set the register type to Balances. Then, proceed to the Data tab. 

Figure 4-3. Accounts accumulation register 

Now add dimensions, resources, and attributes of our register. 

Figure 4-4. Accumulation register data

Dimensions refer to slices of information that is required to be obtained from the register. It is unlikely that you will be interested only in an overall balance. That is why you need the Account dimension.

Resources are the data that you are going to obtain from the register. In our case, you want to know the amount on our accounts. Hence, only one resource of Number type named Amount is required.

Attributes keep additional information that accompanies each entry in the register. In our case, you will keep here category of income or expense that made a record. You will add the Category attribute.

Let us add the dimension, resources, and attributes. To add them, use the context menu of the Dimensions, Resources, and Attributes groups of the register.

Add a dimension.

Figure 4-5. Adding a dimension

In the Properties window, define that a new dimension name is Account, and it has CatalogRef.Accounts type. 

Figure 4-6. Account dimension properties 

Now add the Amount resource. Accept the default Type and Length, and adjust only Precision, increase it from 0 to 2. 

Figure 4-7. Amount resource properties

In the end, add the Category attribute and specify its type: CatalogRef.Categories

Figure 4-8. Category attribute properties  

As a result, the Accounts accumulation register will look as follows: 

Figure 4-9. Accounts register 

Similarly, add the Expenses register to the configuration. Unlike the Accounts register of the Balances type, new register will have the Turnovers type.

Figure 4-10. Expenses accumulation register 

The register is intended for keeping information that is used to analyze turnovers by categories, so add Category to the dimensions. Resource is identical to the Amount resource of the Accounts register. Dimension must contain Account. Proceed to the Data tab. 

Add a dimension. In the property palette, type the name: Category, and set the CatalogRef.Categories type. 

Figure 4-11. Category dimension properties 

Now add the Amount resource. Leave default Type and Length. Increase Precision to 2.

Figure 4-12. Amount resource properties 

One thing left to do, add the Account attribute. In the property palette set the type: CatalogRef.Accounts

Figure 4-13. Accounts attribute properties 

As a result, the Accounts accumulation register will looks as shown in the figure 4-14. 

Figure 4-14. Accounts register  

Next page: Documents

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.