Skip to content

Commit a7613a1

Browse files
author
Jani Giannoudis
committed
moved method add-payrun-result from collector/wage-type runtime to payrun runtime
payroll runtime: added method has-lookup updated version to 0.9.0-beta.11
1 parent bedd840 commit a7613a1

File tree

7 files changed

+38
-26
lines changed

7 files changed

+38
-26
lines changed

Client.Services/PayrollEngine.Client.Services.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.9" />
18-
<PackageReference Include="PayrollEngine.Client.Scripting" Version="0.9.0-beta.10" />
19-
<PackageReference Include="PayrollEngine.Client.Test" Version="0.9.0-beta.10" />
18+
<PackageReference Include="PayrollEngine.Client.Scripting" Version="0.9.0-beta.11" />
19+
<PackageReference Include="PayrollEngine.Client.Test" Version="0.9.0-beta.11" />
2020
</ItemGroup>
2121

2222
<!-- include xml documention files and json schemas to the nuget package -->

Client.Services/PayrollEngine.Client.Services.xml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Client.Services/Scripting.Runtime.Api/CollectorRuntimeBase.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void Reset()
125125
// implementation
126126
}
127127

128-
#region Results
128+
#region Result Attributes
129129

130130
/// <inheritdoc />
131131
public object GetResultAttribute(string name)
@@ -140,13 +140,9 @@ public void SetResultAttribute(string name, object value)
140140
// implementation
141141
}
142142

143-
/// <inheritdoc />
144-
public void AddPayrunResult(string source, string name, string value, int valueType,
145-
DateTime startDate, DateTime endDate, string slot, List<string> tags,
146-
Dictionary<string, object> attributes, string culture)
147-
{
148-
// implementation
149-
}
143+
#endregion
144+
145+
#region Custom Results
150146

151147
/// <inheritdoc />
152148
public void AddCustomResult(string source, decimal value, DateTime startDate, DateTime endDate,
@@ -157,7 +153,7 @@ public void AddCustomResult(string source, decimal value, DateTime startDate, Da
157153

158154
#endregion
159155

160-
#region Retro
156+
#region Retro Payrun
161157

162158
/// <inheritdoc />
163159
public void ScheduleRetroPayrun(DateTime scheduleDate, List<string> resultTags)

Client.Services/Scripting.Runtime.Api/PayrollRuntime.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,18 @@ public virtual List<string> GetCaseValueTags(string caseFieldName, DateTime valu
480480

481481
#region Regulation Lookup
482482

483+
/// <inheritdoc />
484+
public bool HasLookup(string lookupName)
485+
{
486+
if (string.IsNullOrEmpty(lookupName))
487+
{
488+
return false;
489+
}
490+
var lookups = PayrollService.GetLookupsAsync<Lookup>(new(TenantId, PayrollId),
491+
lookupNames: [lookupName]).Result;
492+
return lookups.Count == 1;
493+
}
494+
483495
/// <inheritdoc />
484496
public virtual string GetLookup(string lookupName, string lookupKey, string culture = null)
485497
{

Client.Services/Scripting.Runtime.Api/PayrunRuntimeBase.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ public void SetEmployeeRuntimeValue(string key, string value)
129129

130130
#endregion
131131

132+
#region Payrun Results
133+
134+
/// <inheritdoc />
135+
public void AddPayrunResult(string source, string name, string value, int valueType,
136+
DateTime startDate, DateTime endDate, string slot, List<string> tags,
137+
Dictionary<string, object> attributes, string culture)
138+
{
139+
// implementation
140+
}
141+
142+
#endregion
143+
132144
#region Wage Type Results
133145

134146
/// <inheritdoc />

Client.Services/Scripting.Runtime.Api/WageTypeRuntimeBase.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@ public void SetResultAttribute(string name, object value)
110110
// implementation
111111
}
112112

113-
/// <inheritdoc />
114-
public void AddPayrunResult(string source, string name, string value, int valueType,
115-
DateTime startDate, DateTime endDate, string slot, List<string> tags,
116-
Dictionary<string, object> attributes, string culture)
117-
{
118-
// implementation
119-
}
120-
121113
/// <inheritdoc />
122114
public void AddCustomResult(string source, decimal value, DateTime startDate,
123115
DateTime endDate, List<string> tags, Dictionary<string, object> attributes,

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>0.9.0-beta.10</Version>
5+
<Version>0.9.0-beta.11</Version>
66
<FileVersion>0.9.0</FileVersion>
77
<InformationalVersion></InformationalVersion>
88
<Authors>Jani Giannoudis</Authors>

0 commit comments

Comments
 (0)