Skip to content

Commit d3248c5

Browse files
author
Jani Giannoudis
committed
parun job invocation: added option to force saving of empty employee results (default: do not save)
payroll service get case time value: fixed missing case type parameter updated version to 0.9.0-beta.6
1 parent 6efb813 commit d3248c5

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

Client.Core/Model/IPayrunJobInvocation.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public interface IPayrunJobInvocation : IEquatable<IPayrunJobInvocation>
5656

5757
/// <summary>The execution reason (immutable)</summary>
5858
string Reason { get; set; }
59+
60+
/// <summary>Store empty employee results (default: false)</summary>
61+
bool StoreEmptyResults { get; set; }
5962

6063
/// <summary>The function log level, default is information</summary>
6164
LogLevel LogLevel { get; set; }

Client.Core/Model/PayrunJobInvocation.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public class PayrunJobInvocation : IPayrunJobInvocation
6363
[Required]
6464
public string Reason { get; set; }
6565

66+
/// <inheritdoc/>
67+
public bool StoreEmptyResults { get; set; }
68+
6669
/// <inheritdoc/>
6770
public LogLevel LogLevel { get; set; } = LogLevel.Information;
6871

Client.Core/PayrollEngine.Client.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</None>
9090
</ItemGroup>
9191
<ItemGroup>
92-
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.5" />
92+
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.6" />
9393
</ItemGroup>
9494

9595
<!-- build json schema -->

Client.Core/PayrollEngine.Client.Core.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5493,6 +5493,9 @@
54935493
<member name="P:PayrollEngine.Client.Model.IPayrunJobInvocation.Reason">
54945494
<summary>The execution reason (immutable)</summary>
54955495
</member>
5496+
<member name="P:PayrollEngine.Client.Model.IPayrunJobInvocation.StoreEmptyResults">
5497+
<summary>Store empty employee results (default: false)</summary>
5498+
</member>
54965499
<member name="P:PayrollEngine.Client.Model.IPayrunJobInvocation.LogLevel">
54975500
<summary>The function log level, default is information</summary>
54985501
</member>
@@ -6995,6 +6998,9 @@
69956998
<member name="P:PayrollEngine.Client.Model.PayrunJobInvocation.Reason">
69966999
<inheritdoc/>
69977000
</member>
7001+
<member name="P:PayrollEngine.Client.Model.PayrunJobInvocation.StoreEmptyResults">
7002+
<inheritdoc/>
7003+
</member>
69987004
<member name="P:PayrollEngine.Client.Model.PayrunJobInvocation.LogLevel">
69997005
<inheritdoc/>
70007006
</member>
@@ -10569,7 +10575,7 @@
1056910575
<member name="M:PayrollEngine.Client.Service.Api.PayrollService.GetCaseValuesAsync(PayrollEngine.Client.Service.PayrollServiceContext,System.DateTime,System.DateTime,System.Collections.Generic.IEnumerable{System.String},System.Nullable{System.Int32},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.String)">
1057010576
<inheritdoc/>
1057110577
</member>
10572-
<member name="M:PayrollEngine.Client.Service.Api.PayrollService.GetCaseTimeValuesAsync(PayrollEngine.Client.Service.PayrollServiceContext,System.Nullable{System.Int32},System.Collections.Generic.IEnumerable{System.String},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime})">
10578+
<member name="M:PayrollEngine.Client.Service.Api.PayrollService.GetCaseTimeValuesAsync(PayrollEngine.Client.Service.PayrollServiceContext,PayrollEngine.CaseType,System.Nullable{System.Int32},System.Collections.Generic.IEnumerable{System.String},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime})">
1057310579
<inheritdoc/>
1057410580
</member>
1057510581
<member name="M:PayrollEngine.Client.Service.Api.PayrollService.GetAvailableCaseFieldValuesAsync(PayrollEngine.Client.Service.PayrollServiceContext,System.Int32,System.Collections.Generic.IEnumerable{System.String},System.DateTime,System.DateTime,System.Nullable{System.Int32},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.String)">
@@ -11913,9 +11919,10 @@
1191311919
<param name="caseSlot">The case slot</param>
1191411920
<returns>The case value periods</returns>
1191511921
</member>
11916-
<member name="M:PayrollEngine.Client.Service.IPayrollService.GetCaseTimeValuesAsync(PayrollEngine.Client.Service.PayrollServiceContext,System.Nullable{System.Int32},System.Collections.Generic.IEnumerable{System.String},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime})">
11922+
<member name="M:PayrollEngine.Client.Service.IPayrollService.GetCaseTimeValuesAsync(PayrollEngine.Client.Service.PayrollServiceContext,PayrollEngine.CaseType,System.Nullable{System.Int32},System.Collections.Generic.IEnumerable{System.String},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime})">
1191711923
<summary>Get payroll case values from a specific time moment</summary>
1191811924
<param name="context">The service context</param>
11925+
<param name="caseType">The case type</param>
1191911926
<param name="employeeId">The employee id</param>
1192011927
<param name="caseFieldNames">The case field names</param>
1192111928
<param name="valueDate">The moment of the value (default: UTC now)</param>

Client.Core/Service.Api/PayrollService.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public virtual async Task<List<CaseFieldValue>> GetCaseValuesAsync(PayrollServic
249249

250250
/// <inheritdoc/>
251251
public virtual async Task<List<CaseValue>> GetCaseTimeValuesAsync(PayrollServiceContext context,
252-
int? employeeId = null, IEnumerable<string> caseFieldNames = null,
252+
CaseType caseType, int? employeeId = null, IEnumerable<string> caseFieldNames = null,
253253
DateTime? valueDate = null, DateTime? regulationDate = null, DateTime? evaluationDate = null)
254254
{
255255
if (context == null)
@@ -258,6 +258,7 @@ public virtual async Task<List<CaseValue>> GetCaseTimeValuesAsync(PayrollService
258258
}
259259

260260
var url = PayrollApiEndpoints.PayrollCaseValuesTimeUrl(context.TenantId, context.PayrollId)
261+
.AddQueryString(nameof(caseType), caseType)
261262
.AddQueryString(nameof(employeeId), employeeId)
262263
.AddCollectionQueryString(nameof(caseFieldNames), caseFieldNames)
263264
.AddQueryString(nameof(valueDate), valueDate)
@@ -482,6 +483,7 @@ public virtual async Task<LookupValueData> GetLookupValueDataAsync(PayrollServic
482483

483484
var uri = PayrollApiEndpoints.PayrollLookupValuesDataUrl(context.TenantId, context.PayrollId)
484485
.AddQueryString(nameof(lookupName), lookupName)
486+
.AddQueryString(nameof(lookupKey), lookupKey)
485487
.AddQueryString(nameof(rangeValue), rangeValue)
486488
.AddQueryString(nameof(regulationDate), regulationDate)
487489
.AddQueryString(nameof(evaluationDate), evaluationDate)
@@ -490,8 +492,8 @@ public virtual async Task<LookupValueData> GetLookupValueDataAsync(PayrollServic
490492
}
491493

492494
/// <inheritdoc/>
493-
public virtual async Task<List<TReportSet>> GetReportsAsync<TReportSet>(PayrollServiceContext context, IEnumerable<string> reportNames = null,
494-
OverrideType? overrideType = null, UserType? userType = null,
495+
public virtual async Task<List<TReportSet>> GetReportsAsync<TReportSet>(PayrollServiceContext context,
496+
IEnumerable<string> reportNames = null, OverrideType? overrideType = null, UserType? userType = null,
495497
DateTime? regulationDate = null, DateTime? evaluationDate = null) where TReportSet : class, IReportSet
496498
{
497499
if (context == null)

Client.Core/Service/IPayrollService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@ Task<List<CaseFieldValue>> GetCaseValuesAsync(PayrollServiceContext context, Dat
8787

8888
/// <summary>Get payroll case values from a specific time moment</summary>
8989
/// <param name="context">The service context</param>
90+
/// <param name="caseType">The case type</param>
9091
/// <param name="employeeId">The employee id</param>
9192
/// <param name="caseFieldNames">The case field names</param>
9293
/// <param name="valueDate">The moment of the value (default: UTC now)</param>
9394
/// <param name="regulationDate">The regulation date (default: value date)</param>
9495
/// <param name="evaluationDate">The evaluation date (default: value date)</param>
9596
/// <returns>The payroll case value of the case field</returns>
96-
Task<List<CaseValue>> GetCaseTimeValuesAsync(PayrollServiceContext context, int? employeeId = null,
97-
IEnumerable<string> caseFieldNames = null, DateTime? valueDate = null,
97+
Task<List<CaseValue>> GetCaseTimeValuesAsync(PayrollServiceContext context, CaseType caseType,
98+
int? employeeId = null, IEnumerable<string> caseFieldNames = null, DateTime? valueDate = null,
9899
DateTime? regulationDate = null, DateTime? evaluationDate = null);
99100

100101
/// <summary>Get available case period values</summary>

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.5</Version>
5+
<Version>0.9.0-beta.6</Version>
66
<FileVersion>0.9.0</FileVersion>
77
<InformationalVersion></InformationalVersion>
88
<Authors>Jani Giannoudis</Authors>

0 commit comments

Comments
 (0)