Examples of displacement and dependency by base period
Recalculation report
Dependency by base period
Displacement by action period
In Designer mode
Let us create the report.
- Create a Report configuration object named Recalculation.
- Run the Data composition schema wizard.
- Add Data set – query and run the Query builder.
- In the Database list, expand Recalculations and select all the fields from the Accruals.Recalculation virtual table (fig. 18.9):
- RecalculationObject
- CalculationType
- Employee
Fig. 18.9. Query fields and tables - Click OK.
This completes the query creation. - On the Settings tab, add the <Detailed records> grouping.
- On the Selected fields tab, select the following fields:
- RecalculationObject
- CalculationType
- Employee
- Close the data composition schema wizard by clicking OK.
- In the editor of the Recalculation report configuration object, on the Subsystems tab, specify that the document is displayed in the Payroll subsystem.
In 1C:Enterprise mode
If you generate the report in 1C:Enterprise mode, you will see that no recalculations have been performed yet. You need another Employee accrual document to test recalculations.
- Start 1C:Enterprise in the debug mode.
- Create the Employee accrual #2 document with September bonuses for Jonnson and Walkman (fig. 18.10).
Fig. 18.10. Employee accrual #2 document
This document records the fact that bonuses are due to employees named Johnson and Walkman based on their work in September. Since you do not know the bonus amount (it will be calculated based on a certain algorithm), leave the Accrual field empty. - Click Post and close.
- Open the Employee accrual # 1 document and change Johnson’s salary from 10 000 to 7 000.
- Click Post and close.
- Generate the Recalculation report (fig. 18.11).
Fig. 18.11. Recalculation report
As you see, it now has some data.
This is because the Bonus calculation type depends on the Salary calculation type by base period. Once you modify the existing records of Salary type, the platform generates a set of recalculation records (because their base is changed).
You may be wondering why the Walkman's record is present in the report, since you only changed Johnson’s salary. The reason is that the platform does not track the specific changes to document records. The only thing it tracks is the fact that posting (reposting) a document changes a calculation register record set.
Therefore the recalculation record set includes ALL register records whose values MIGHT change after reposting a document that creates base records in the register. - Repost the Employee accrual # 2 document (the one that accrues bonuses), and generate the Recalculation report.
The report is empty again, as the platform has noted the fact that you recalculated the dependent records and therefore cleared the recalculation table.
In this example you have studied calculation register dependency by base period.
In 1C:Enterprise mode
Let us check how displacement by action period works.
You need a third Employee accrual document for this.
- Create the Employee accrual #3 document as shown in fig. 18.12.
Fig. 18.12. Employee accrual #3 document
This document records the fact that Johnson was not at work from the 1st through the 10th of September.
Obviously, in this case you need to recalculate his salary and also his bonus that depends on the salary. - Click Post and close and generate the Recalculation report (fig. 18.13).
Fig. 18.13. Recalculation report
As you can see, Johnson's salary accrual record is included in the recalculation. This is the result of displacement by action period, since the Absence calculation type displaces the Salary calculation type.
Note that Johnson's bonus accrual record is also included in the recalculation. This is because during the creation of predefined calculation types you specified that the Bonus calculation type result depends on changes of the Absence calculation type result. This dependency is indirect, but since you have explicitly specified this dependency, the platform tracks it. - Repost the Employee accrual #1 and Employee accrual #2 documents and ensure that the recalculation table is cleared.