R29698 PosOperator - Only One Active Pos Operator
Code | R29698 |
Entity | Crm.Pos.Operators Entity |
Name | OnlyOneActivePosOperator |
Attribute | IsActive, User, PosLocation, PosRole, StartingDate, TerminationDate |
Layer | Back-End |
Events | Commit |
Priority | Normal |
Modify | NO
|
Applicable Legislations | ALL // no condition needed |
Action | Validate that:
If (IsActive = True) then PosOperators[(IsActive = True) && (User = PosOperator.User) && (PosLocation = PosOperator.PosLocation) && (PosRole = PosOperator.PosRole) && (if(PosOperator.TerminationDate = NULL), (TerminationDate = NULL || TerminationDate >= PosOperator.StartingDate)) && (if(PosOperator.TerminationDate != NULL), ((TerminationDate = NULL && StartingDate <= PosOperator.TerminationDate) && ((TerminationDate != NULL) && (TerminationDate >= PosOperator.StartingDate && StartingDate <= PosOperator.TerminationDate)))].Count() <= 1 |
Description | There can be only one active POS Operator with the same combination of User, POS Location, POS Role and for periods that overlap. |
Message | It is not allowed to be committed more than one active POS Operator with the same User, POS Location, POS Role and for periods that overlap. |
Introduced In Version | 2019.1 |
Revocable | NO |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.