R27011 DocumentАmount - User Can Change Input

Code R27011
Name UserCanChangeInput
Entity General.DocumentAmounts Entity
Layer Back-End
Attribute UserCanChangeInput
Events Commit
Modify NO
Action If (DocumentAmount.Document.DocumentType.Amounts[DocumentAmountType == DocumentAmount.DocumentAmountType].UserCanChangeInput == False)

InputPercent == InputPercent.DataBaseValue && InputAmount == InputAmount.DataBaseValue

* The validation does not throw an error for the first entry of the current record.
Description In the document types definition, there is a panel "Document Types Form Amount" which contains the Document Amounts that are loaded by default when creating a new document. If for the particular document amount type the field "User Can Change Input" is not check-marked then the Input Percent and the Input Amount for this document amount cannot be edited after the initial saving.
Message The value of Input Percent or/and the Input Amount of the document amount with amount type '{DocumentAmountType}' is edited but this is not allowed. These values can be edited only for document amount types for which the field 'User Can Change Input' in the document type's definition is check-marked.
Introduced In Version 2018.2
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.