R29644 SalesOrder - Set Pos Attributes (DEPRECATED)
Code | R29644 |
Entity | Crm.Sales.SalesOrders Entity |
Name | SetPosAttributes |
Attribute | PosLocation, PosOperator, PosTerminal, PosFiscalPrinter |
Layer | Back-End |
Events | Commit |
Priority | Early |
Modify | YES |
Applicable Legislations | ALL // no condition needed |
Action | The rule sets values in PosLocation, PosOperator, PosTerminal and PosFiscalPrinter, according to
the following conditions:
// The order of execution of the actions must be retained! 1) If ((PosLocation == NULL) && (EnterpriseCompanyLocation != NULL) && (PosLocations[(EnterpriseCompanyLocation = SalesOrder.EnterpriseCompanyLocation) && (Active = True)].Count() == 1)) , set value: PosLocation = PosLocations[(EnterpriseCompanyLocation = SalesOrder.EnterpriseCompanyLocation) && (Active = True)] (2) If ((PosOperator == NULL) && (PosLocation != NULL) && (PosOperators[(User = CurrentUser*) && (PosLocation = SalesOrder. PosLocation) && (Active = True) && (StartingDate >= CurrentDate) && ((CurrentDate <= TerminationDate) || (TerminationDate == NULL))].Count() == 1)) , set value: PosOperator = PosOperator [(User = CurrentUser*) && (PosLocation = SalesOrder. PosLocation) && (Active = True) && (StartingDate >= CurrentDate) && ((CurrentDate <= TerminationDate) || (TerminationDate == NULL))] * CurrentUser - the user that is currently logged into the system. (3) If ((PosTerminal == NULL) && (PosLocation != NULL) && (PosOperator != NULL)) , set value: PosTerminal = PosOperator.DefaultPosTerminal (4) If ((PosFiscalPrinter == NULL) && (PosTerminal != NULL) && (PosDevices[(PosTerminal = SalesOrder.PosTerminal) && (Active = True) && (DeviceType = FiscalPrinter)].Count() = =1 ) , set value: PosFiscalPrinter = PosDevice[(PosTerminal = SalesOrder.PosTerminal) && (Active = True) && (DeviceType = FiscalPrinter) |
Description* |
The rule successively sets values in the POS Location, POS Operator, POS Terminal and POS
FiscalPrinter fields of the Sales Order if the following conditions are met:
(1) POS Location - if the field is not yet filled in, the field Enterprise Company Location has a value and there is exactly one active POS Location with the same Enterprise Company Location as the Sales Order's Enterprise Company Location. (2) POS Operator - if the field is not yet filled in, the field POS Location has a value and for the user that is currently logged into the system there is only one Active (and according to the Starting and Termination dates and the Active check-mark) POS Operator with the Sales Order's POS Location. (3) POS Terminal - with the value of the POS Operator's Default Pos Terminal - if the field is not yet filled in, and the fields POS Location and POS Operator have values. (4) POS Fiscal Printer - if the field is not yet filled in, the Sales Order's POS Terminal has a value and for this POS Terminal there is only one Active POS Device with Fiscal Printer type. |
Message | - |
Version | Introduced: 2019.1
Deprecated: 2019.1 SP7 |
Revocable | YES |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.