R28718 LogisticsDocument - Required Document Type Amounts

Code R28718
Entity LogisticsDocument
Name RequiredDocumentTypeAmounts
Attribute -
Layer Back-End
Events Planning +
Priority Normal
Modify -
Action For every LogisticsDocument.DocumentType.DocumentTypeAmount validate that:

If ((RequiredFromDate == NULL || RequiredFromDate <= LogisticsDocument.DocumentDate) && (RequiredThruDate == NULL || RequiredThruDate >= LogisticsDocument.DocumentDate))

, then LogisticsDocument.DocumentAmounts[DocumentAmountType == LogisticsDocument.DocumentType.DocumentTypeAmount.DocumentAmountType].Count() > 0
Description In the document type's definition there is a "Document TypesFormAmounts" panel where the consultant can set Document Amount Types (such as VAT) which are required. When a Document Amount Type is required there must be at least one record with this Document Amount Type in the Additional Document Amounts panel of the documents with this document type.

The period for which the Document Amount Types are required can be adjusted through the fields "RequiredFromDate" and "RequiredThruDate". If the fields don't have a value then the Document Amount Type is required for any period. If any of them have value it specifies the date, after/ up to which the amount becomes/is required for the current document type. The date is compared against the document date.
Message For document '{DocumentText}' the document amount types '{String.Join(",", DocumentType DocumentTypeAmount.DocumentAmountType)}' are required. The required document amount types for document '{DocumentText}' are specified in the definition of document type '{DocumentType}'.
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.