1C:Enterprise 8.3. Practical Developer’s Guide. Lesson 25 (0:30). Functional options. Accounting and Payroll options

Accounting and Payroll options

Suppose that for some reason the makeup studio does not have accounting and payroll calculation. To disable these features, let us create functional options named Accounting and Payroll, assign these options to appropriate configuration objects, and disable them in 1C:Enterprise mode.

So, while the makeup studio has exactly the same configuration as Jack of All Trades, their applied solution does not display any accounting or payroll options, as if they do not exist at all.

In Designer mode

Let us create the functional options.

  1. Add constants named Accounting and Payroll of the Boolean type (fig. 25.1).

    This is where you will store functional option values.

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In Designer mode
    Fig. 25.1. Creating a constant

    If a constant value is True, the functional option is enabled. If the value is False, the functional option is disabled.
  2. In the configuration tree, expand the Common branch, click the Functional options branch, and create functional options named Accounting and Payroll with their respective constants specified in the Data path property (fig. 25.2).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In Designer mode
    Fig. 25.2. Creating a functional option

    Then let us associate configuration objects with functional options.

    The following configuration objects are related to accounting:
    • ExtraDimensions catalog
    • InputOpeningMaterialBalances document
    • TrialBalance report
    • ExtraDimensionTypes chart of characteristic types
    • Main chart of accounts
    • Primary accounting register
  3. In the Payroll functional option configuration object editor, on the Content tab, select these objects (fig. 25.3).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In Designer mode
    Fig. 25.3. Accounting functional option content

    The following configuration objects are related to payroll:
    • WorkScheduleTypes catalog
    • EmployeeAccruals document
    • EmployeeAccruals report
    • Recalculation report
    • AccrualsChart report
    • MainAccruals chart of calculation types
    • WorkSchedules information register
    • Accruals calculation register
  4. In the Accounting functional option configuration object editor, on the Content tab, select these objects.

    Now if you open the configuration object editor for the ExtraDimension catalog or for any other configuration object that belongs to the Accounting functional option, you can see that the functional option is selected on the Functional options tab (fig. 25.4).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In Designer mode
    Fig. 25.4. Functional option value for an accounting object

    So configuration objects are displayed in the applied solution interface if their respective functional options are enabled (the appropriate constants are True).

    And for objects related to payroll you can see that the Payroll functional option is selected on the Functional options tab of the object editors.

    The rest of the configuration objects do not have any items selected on the Functional options tab. If a functional option is disabled for an object, this object does not depend on the value of this functional option and is always displayed (fig. 25.5).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In Designer mode
    Fig. 25.5. Functional option settings for independent objects

    Note. If you include a subsystem into a functional option, you will not see the respective section in 1C:Enterprise mode at all when this functional option is disabled.
  5. Expand the Common forms branch and open the common constants form.

    It is the GeneralSettings form that you created in the previous lesson. Currently it contains the NumberingPrefix constant.

    Now you need to add the new constants to this form to be able to change the functional option values at run time.
  6. In the GeneralSettings form, on the Attributes tab, expand the main ConstantsSet attribute and drag the Accounting and Payroll constants to the form controls pane (fig. 25.6).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In Designer mode
    Fig. 25.6. Editing common constants form

In 1C:Enterprise mode

Let us test the functional options.

  1. Start 1C:Enterprise in the debug mode.
  2. In the Quick menu section, click General settings.

    This opens the constants form and you can see that both constants are False (fig. 25.7).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In 1C:Enterprise mode
    Fig. 25.7. Constants form

    It means that the respective functional options are disabled.

    True, you can see that the commands related to accounting and payroll are missing from the Accounting and Payroll sections (fig. 25.8).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In 1C:Enterprise mode
    Fig. 25.8. Payroll section interface

    So if after a while the management of the makeup studio decides to start using payroll, their administrator will simply enable the Payroll option (fig. 25.9).

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In 1C:Enterprise mode
    Fig. 25.9. Changing the value of the Payroll functional option
  3. In the General settings form, enable the Payroll accounting option, and then restart 1C:Enterprise.

    The restart is required to display the new applied solution interface.

    After the restart the Payroll section should look as shown in fig. 25.10.

    Lesson 25 (0:30). Functional options / Accounting and Payroll options / In 1C:Enterprise mode
    Fig. 25.10. Payroll section interface

    And if you enable the Accounting functional option as well, this restores the applied solution interface initially developed for Jack of All Trades.

    This is how an applied solution can be quickly and easily customized in compliance with customer requirements.

Leave a Reply

Your email address will not be published.

 

1C:Enterprise Developer's Community