Class PayrunRuntimeBase
Runtime for the payrun function
Inheritance
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Runtime.Api
Assembly: PayrollEngine.Client.Services.dll
Syntax
public abstract class PayrunRuntimeBase : PayrollRuntime, IPayrunRuntime, IPayrollRuntime, IRuntime
Constructors
View SourcePayrunRuntimeBase(PayrollHttpClient, ScriptContext, int, int, int, int?)
Initializes a new instance of the PayrunRuntimeBase class
Declaration
protected PayrunRuntimeBase(PayrollHttpClient httpClient, ScriptContext scriptContext, int tenantId, int userId, int payrollId, int? employeeId = null)
Parameters
| Type | Name | Description |
|---|---|---|
| PayrollHttpClient | httpClient | The Payroll http client |
| ScriptContext | scriptContext | The script context |
| int | tenantId | The tenant id |
| int | userId | The user id |
| int | payrollId | The payroll id |
| int? | employeeId | The employee id |
Properties
View SourceCycleName
The cycle name
Declaration
public string CycleName { get; }
Property Value
| Type | Description |
|---|---|
| string |
ExecutionPhase
The payrun execution phase: 0=setup, 1=reevaluation
Declaration
public int ExecutionPhase { get; }
Property Value
| Type | Description |
|---|---|
| int |
Forecast
True for a forecast payrun
Declaration
public string Forecast { get; }
Property Value
| Type | Description |
|---|---|
| string |
LogOwner
The log owner type
Declaration
protected override string LogOwner { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
View SourcePayrunId
The payrun id
Declaration
public int PayrunId { get; }
Property Value
| Type | Description |
|---|---|
| int |
PayrunName
The payrun name
Declaration
public string PayrunName { get; }
Property Value
| Type | Description |
|---|---|
| string |
PeriodName
The period name
Declaration
public string PeriodName { get; }
Property Value
| Type | Description |
|---|---|
| string |
PreviewJob
Test for preview payrun job
Declaration
public bool PreviewJob { get; }
Property Value
| Type | Description |
|---|---|
| bool |
RetroPeriod
The retro payrun period
Declaration
public Tuple<DateTime, DateTime> RetroPeriod { get; }
Property Value
| Type | Description |
|---|---|
| Tuple<DateTime, DateTime> |
Methods
View SourceGetCollectorCustomResults(IList<string>, DateTime, DateTime, string, int?, IList<string>)
Gets the collector results from a time range
Declaration
public IList<Tuple<string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetCollectorCustomResults(IList<string> collectorNames, DateTime start, DateTime end, string forecast = null, int? jobStatus = null, IList<string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<string> | collectorNames | Name of the collectors |
| DateTime | start | The range period start |
| DateTime | end | The range period end |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
Returns
| Type | Description |
|---|---|
| IList<Tuple<string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The consolidated collector custom results |
GetCollectorResults(IList<string>, DateTime, DateTime, string, int?, IList<string>)
Gets the collector range results
Declaration
public IList<Tuple<string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetCollectorResults(IList<string> collectorNames, DateTime start, DateTime end, string forecast = null, int? jobStatus = null, IList<string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<string> | collectorNames | Name of the collectors |
| DateTime | start | The range period start |
| DateTime | end | The range period end |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
Returns
| Type | Description |
|---|---|
| IList<Tuple<string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The collector date range results |
GetConsolidatedCollectorCustomResults(IList<string>, DateTime, string, int?, IList<string>, bool)
Gets the consolidated collector results, from the period moment until the current period
Declaration
public IList<Tuple<string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetConsolidatedCollectorCustomResults(IList<string> collectorNames, DateTime periodMoment, string forecast = null, int? jobStatus = null, IList<string> tags = null, bool noRetro = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<string> | collectorNames | Name of the collectors |
| DateTime | periodMoment | The period moment |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
| bool | noRetro | Exclude retro jobs: only original main-job payslip values per period |
Returns
| Type | Description |
|---|---|
| IList<Tuple<string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The consolidated collector custom results |
GetConsolidatedCollectorResults(IList<string>, DateTime, string, int?, IList<string>, bool)
Gets the consolidated collector results, from the period moment until the current period
Declaration
public IList<Tuple<string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetConsolidatedCollectorResults(IList<string> collectorNames, DateTime periodMoment, string forecast = null, int? jobStatus = null, IList<string> tags = null, bool noRetro = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<string> | collectorNames | Name of the collectors |
| DateTime | periodMoment | The period moment |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
| bool | noRetro | Exclude retro jobs: only original main-job payslip values per period |
Returns
| Type | Description |
|---|---|
| IList<Tuple<string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The consolidated collector results |
GetConsolidatedWageTypeCustomResults(IList<decimal>, DateTime, string, int?, IList<string>, bool)
Gets the consolidated wage type custom results, from the period moment until the current period
Declaration
public IList<Tuple<decimal, string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetConsolidatedWageTypeCustomResults(IList<decimal> wageTypeNumbers, DateTime periodMoment, string forecast = null, int? jobStatus = null, IList<string> tags = null, bool noRetro = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<decimal> | wageTypeNumbers | The wage type numbers |
| DateTime | periodMoment | The period moment |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
| bool | noRetro | Exclude retro jobs: only original main-job payslip values per period |
Returns
| Type | Description |
|---|---|
| IList<Tuple<decimal, string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The consolidate wage type custom results |
GetConsolidatedWageTypeResults(IList<decimal>, DateTime, string, int?, IList<string>, bool)
Gets the consolidated wage type results, from the period moment until the current period
Declaration
public IList<Tuple<decimal, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetConsolidatedWageTypeResults(IList<decimal> wageTypeNumbers, DateTime periodMoment, string forecast = null, int? jobStatus = null, IList<string> tags = null, bool noRetro = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<decimal> | wageTypeNumbers | The wage type numbers |
| DateTime | periodMoment | The period moment |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
| bool | noRetro | Exclude retro jobs: only original main-job payslip values per period |
Returns
| Type | Description |
|---|---|
| IList<Tuple<decimal, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The consolidate wage type results |
GetEmployeeRuntimeValue(string)
Get employee runtime value
Declaration
public string GetEmployeeRuntimeValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The value key |
Returns
| Type | Description |
|---|---|
| string | The employee runtime value |
GetPayrunJobAttribute(string)
Get payrun job attribute value
Declaration
public object GetPayrunJobAttribute(string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName | Name of the attribute |
Returns
| Type | Description |
|---|---|
| object | The payrun job attribute value |
GetPayrunResult(string, string)
Get payrun result value
Declaration
public object GetPayrunResult(string source, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | source | The result source |
| string | name | The result name |
Returns
| Type | Description |
|---|---|
| object |
GetPayrunRuntimeValue(string)
Get payrun runtime value
Declaration
public string GetPayrunRuntimeValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The value key |
Returns
| Type | Description |
|---|---|
| string | The payrun runtime value |
GetRetroWageTypeResults(decimal, string, int?, IList<string>)
Gets the retro wage type results
Declaration
public IList<decimal> GetRetroWageTypeResults(decimal wageTypeNumber, string forecast = null, int? jobStatus = null, IList<string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal | wageTypeNumber | The wage type number |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
Returns
| Type | Description |
|---|---|
| IList<decimal> | The wage type cycle results |
GetWageTypeCustomResults(IList<decimal>, DateTime, DateTime, string, int?, IList<string>)
Gets the wage type custom results from a time range
Declaration
public IList<Tuple<decimal, string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetWageTypeCustomResults(IList<decimal> wageTypeNumbers, DateTime start, DateTime end, string forecast = null, int? jobStatus = null, IList<string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<decimal> | wageTypeNumbers | The wage type numbers |
| DateTime | start | The range period start |
| DateTime | end | The range period end |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
Returns
| Type | Description |
|---|---|
| IList<Tuple<decimal, string, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The consolidate wage type custom results |
GetWageTypeName(decimal)
Get wage type name by number
Declaration
public string GetWageTypeName(decimal wageTypeNumber)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal | wageTypeNumber | The wage type number |
Returns
| Type | Description |
|---|---|
| string |
GetWageTypeNumber(string)
Get wage type number by name
Declaration
public decimal GetWageTypeNumber(string wageTypeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | wageTypeName | The wage type name |
Returns
| Type | Description |
|---|---|
| decimal |
GetWageTypeResults(IList<decimal>, DateTime, DateTime, string, int?, IList<string>)
Gets the wage type range results
Declaration
public IList<Tuple<decimal, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> GetWageTypeResults(IList<decimal> wageTypeNumbers, DateTime start, DateTime end, string forecast = null, int? jobStatus = null, IList<string> tags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<decimal> | wageTypeNumbers | The wage type numbers |
| DateTime | start | The range period start |
| DateTime | end | The range period end |
| string | forecast | The forecast |
| int? | jobStatus | The job status |
| IList<string> | tags | The result tags |
Returns
| Type | Description |
|---|---|
| IList<Tuple<decimal, string, Tuple<DateTime, DateTime>, decimal, List<string>, Dictionary<string, object>>> | The wage type date range results |
HasEmployeeRuntimeValue(string)
Test for existing employee runtime value
Declaration
public bool HasEmployeeRuntimeValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The value key |
Returns
| Type | Description |
|---|---|
| bool | True if the runtime value exists |
HasPayrunRuntimeValue(string)
Test for existing payrun runtime value
Declaration
public bool HasPayrunRuntimeValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The value key |
Returns
| Type | Description |
|---|---|
| bool | True if the runtime value exists |
RemovePayrunJobAttribute(string)
Remove payrun job attribute
Declaration
public bool RemovePayrunJobAttribute(string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName | Name of the attribute |
Returns
| Type | Description |
|---|---|
| bool |
SetEmployeeRuntimeValue(string, string)
Set employee runtime value
Declaration
public void SetEmployeeRuntimeValue(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The value key |
| string | value | The employee runtime value, use null to remove the runtime value |
SetPayrunJobAttribute(string, object)
Set payrun job attribute value
Declaration
public void SetPayrunJobAttribute(string attributeName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName | Name of the attribute |
| object | value | The attribute value |
SetPayrunResult(string, string, object, int, DateTime, DateTime, string, List<string>, Dictionary<string, object>, string)
Set payrun result
Declaration
public void SetPayrunResult(string source, string name, object value, int valueType, DateTime startDate, DateTime endDate, string slot, List<string> tags, Dictionary<string, object> attributes, string culture)
Parameters
| Type | Name | Description |
|---|---|---|
| string | source | The result source |
| string | name | The result name |
| object | value | The result value |
| int | valueType | The result value type |
| DateTime | startDate | The start date |
| DateTime | endDate | The end date |
| string | slot | The result slot |
| List<string> | tags | The result tags |
| Dictionary<string, object> | attributes | The wage type custom result attributes |
| string | culture | The result culture |
SetPayrunRuntimeValue(string, string)
Set payrun runtime value
Declaration
public void SetPayrunRuntimeValue(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The value key |
| string | value | The payrun runtime value, use null to remove the runtime value |