TimePunch Summary Service
This service contains methods in order to access the time accounts of the TimePunch profiles.
GetSummaryLocks
This method returns all information about the month-end closings that are found for the employees through the search object.
List<SummaryLockDto> GetSummaryLocks(
out TpFault fault,
TpAuthentication authentication,
UserSearchDto userFilter = null);
Needed Permission | monthend@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userFilter | Search object containing the user filter. The coverage will be applied to the filter. | |
Return value | List that contains all summary locks for the found staff members. |
LoadAllYearlySummaries
This method returns all yearly account data for the authorized employee.
List<YearlySummaryDto> LoadAllYearlySummaries(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return value | List containing all yearly sumamries for the given user. |
LoadDailySummaries
Using this method a summary for each working day in the given period can be loaded.
List<DailySummaryDto> LoadDailySummaries(
out TpFault fault,
TpAuthentication authentication,
DateTime startDate,
DateTime endDate);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
startDate | First date to retrieve the daily summary | |
endDate | Last date to retrieve the daily summary | |
Return value | List that contains all daily summaries from start through end date |
LoadAllMonthlySummaries
This method can be used to load all monthly summaries of working time for a user.
List<MonthlySummaryDto> LoadAllMonthlySummaries(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication |
LoadMonthlySummary
This method will load the monthly summary of the working time for the specified user at the given reference date.
MonthlySummaryDto LoadMonthlySummary(
out TpFault fault,
TpAuthentication authentication,
DateTime? referenceDate = null);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
referenceDate | Date for that the monthly Summary shall be loaded, or null if the monthly summary for the current date shall be returned. | |
Return value | The monthly summary for the given reference date. |
LoadMonthlySummaries
This method loads all monthly summaries with the given ID's.
List<MonthlySummaryDto> LoadMonthlySummaries(
out TpFault fault,
TpAuthentication authentication,
List<Guid> summaryIds);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
summaryIds | Ids of the monthly summaries to load. | |
Return value | The monthly summary for the given reference date. |
LoadTimeAccounts
This method loads the current time accounts of the TimePunch profiles. Depending on whether only the time account of the authorized user or all time accounts may accessed, different permissions will be needed.
List<TimeAccountDto> LoadTimeAccounts(
out TpFault fault,
TpAuthentication authentication,
UserSearchDto userSearch,
DateTime? referenceDate = null);
Needed Permission | timeAccounts@access / timeAccounts@report | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userSearch | Information that are used to search the TimePunch profiles | |
referenceDate | The date of which the time accounts shall be loaded. By default this is always the day before today | |
Return value | List of Time account information entities |
LoadYearlySummary
This method loads the annual vacations for the authorized user for the given reference date.
YearlySummaryDto LoadYearlySummary(
out TpFault fault,
TpAuthentication authentication,
DateTime? referenceDate = null);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
referenceDate | The date of which the yearly summary shall be loaded, or null if the current date is used. | |
Return value | The yearly summary for the given user and reference date. |
LoadYearlySummaryByYear
This method loads the annual vacations for the authorised user for a defined year.
YearlySummaryDto LoadYearlySummaryByYear(
out TpFault fault,
TpAuthentication authentication,
int year);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
year | The year of the yearly summary to load. | |
Return value | The yearly summary for the given user and reference date. |
ReCalculateAllSummaries
This method forces the recalculation of all monthly data of the employees specified in the user filter starting from the reference date.
void ReCalculateAllSummaries(
out TpFault fault,
TpAuthentication authentication,
UserSearchDto userFilter,
DateTime? referenceDate = null)
Needed Permission | summary@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userFilter | Filter that is used to search the TimePunch profiles. | |
referenceDate | Defines the date since when the monthly summaries shall be re-calculated. If NULL, all monthly summaries of a user will be re-calculated. | |
Return value | The calculated monthly summary, after the calculation date has been applied. |
SaveMonthlySummary
This method saves the basic data that are used to calculate the monthly working and flexi time.
MonthlySummaryDto SaveMonthlySummary(
out TpFault fault,
TpAuthentication authentication,
MonthlySummarySaveDto summary);
Needed Permission | summary@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
summary | Contains the data that can be used to calculate the monthly working time data. | |
Return value | The calculated monthly summary, after the calculation date has been applied. |
SaveYearlySummary
This method save the basic data that are used to calculate the annual vacation.
YearlySummaryDto SaveYearlySummary(
out TpFault fault,
TpAuthentication authentication,
YearlySummarySaveDto summary);
Needed Permission | summary@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
summary | Contains the data that can be used to calculate the annual leave. | |
Return value | The calculated annual leave, after the calculation date has been applied. |
SearchMonthlySummaries
This method returns all monthly summaries based on the passed search parameters.
List<MonthlySummaryDto> SearchMonthlySummaries(
out TpFault fault,
TpAuthentication authentication,
MonthlySummarySearchDto searchDto);
Needed Permission | summary@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
searchDto | Search object to specify the summaries that will be returned. | |
Return value | The found monthly summaries |
SetSummaryLocks
Using this method, one can perform the month-end closing. The conclusion is either performed for the currently authenticated- employee (if the UserIDs are NULL), or for all given employee ids.
void SetSummaryLocks(
out TpFault fault,
TpAuthentication authentication,
DateTime? lockedUpTo,
List<Guid> userIds = null);
Needed Permission | CAN_MANAGE_MONTHEND, if lockedUpTo is filled CAN_RESET_MONTHEND, if lockedUpTo is NULL | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
lockedUpTo | Date up to that the month ends gets locked. If the lockedUpTo is NULL all months will be unlocked. | |
userIds | A list that contains the user ids for that the month end closing will be executed. If the list is NULL or empty, the current identity user will be used. |