34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
using BeWo.Service.Plugins;
|
|
using BS.Shared.DataContracts;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WendepunktVelbert.Service
|
|
{
|
|
public class CustomVacationService : VacationService
|
|
{
|
|
public override List<UrlaubskontoDarstellungDC> CreateSonderurlaubItems(EmployeeDC emp, ContractDC contract, Dictionary<string, decimal> sonderurlaubDict, List<UrlaubskontoDarstellungDC> darstellungDCs)
|
|
{
|
|
var sonderurlaubsItems = base.CreateSonderurlaubItems(emp, contract, sonderurlaubDict, darstellungDCs);
|
|
|
|
if (emp.Notice2 != null && emp.Notice2.Contains("SD") && darstellungDCs != null && !darstellungDCs.Any(dc => dc.Erlaeuterung.Contains("Regenerationstage")))
|
|
{
|
|
sonderurlaubsItems.Add(new UrlaubskontoDarstellungDC()
|
|
{
|
|
AnzahlTage = string.Format("{0:0.00}", 2), // 2 Regenerationstage
|
|
Herkunft = string.Format("EmpOid:{0} ContractOid:{1}", emp.EmployeeOid, contract.ContractOid),
|
|
Tooltip = "Regenerationstage",
|
|
IsDeletable = false,
|
|
DatumZurSortierung = null,
|
|
Erlaeuterung = "Regenerationstage"
|
|
});
|
|
}
|
|
|
|
return sonderurlaubsItems;
|
|
}
|
|
}
|
|
}
|