ProjExpPolicies::findRulesByType Method
Searches the ProjectPolicies table and returns a record based on the order of precedence.
Syntax
client server public static ProjExpPolicies findRulesByType(
TrvDateStd _dTransDate,
CurrencyCode _sCurrency,
TrvCostTypeEDT _sCostType,
ProjWorkerRecId _workerRecId,
AddressCity _sCity,
CustAccount _sClient,
ProjInvoiceProjId _sContract,
ProjId _sProjId,
ProjExpPolicyPerUnit _ePerUnit,
ProjExpPolicyType _ePolicyType)
Run On
Called
Parameters
- _dTransDate
Type: TrvDateStd Extended Data Type
The transaction date.
- _sCurrency
Type: CurrencyCode Extended Data Type
The currency code.
- _sCostType
Type: TrvCostTypeEDT Extended Data Type
The expense category.
- _workerRecId
Type: ProjWorkerRecId Extended Data Type
The worker ID
- _sCity
Type: AddressCity Extended Data Type
The city.
- _sClient
Type: CustAccount Extended Data Type
The client.
- _sContract
Type: ProjInvoiceProjId Extended Data Type
The contract number.
- _sProjId
Type: ProjId Extended Data Type
The project ID.
- _ePerUnit
Type: ProjExpPolicyPerUnit Enumeration
The per day, per expense report or per expense line.
- _ePolicyType
Type: ProjExpPolicyType Enumeration
The company or client.
Return Value
Type: ProjExpPolicies Table
A ProjExpPolicies record.
Remarks
When there are multiple matching rules, we take the best match according to the order of precedence.
For Client policies: Customer, Invoice, Project, Employee, Employee group, City For Company policies: Employee, Employee group, City.
For eg 1. For client policy, we found a rule set on Customer and Invoice; and another rule set on Customer and Employee The rule set on Customer and Invoice will be returned.