46 lines
1.6 KiB
C#
46 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Service.DCEntityMapper;
|
|
using BeWo.Service.Plugins;
|
|
|
|
namespace AssistenzaReports
|
|
{
|
|
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
|
|
{
|
|
public override void CreateEmployeeDetails(MitarbeiterstundenkontoRO ro)
|
|
{
|
|
base.CreateEmployeeDetails(ro);
|
|
// Unteres mittlerweile Standard
|
|
//var vs = new VacationService();
|
|
|
|
//foreach (var emp in ro.EmployeeDetailList)
|
|
//{
|
|
// var konto = vs.BerechneUrlaubskontoZurDarstellung(MapperFactory.EmployeeDC_Employee.MapToNewDC(emp.Employee), ro.ReportStartDate.Year, null);
|
|
// if (konto != null && konto.Count > 0)
|
|
// {
|
|
// emp.Custom1 = Convert.ToDecimal(konto[0].AnzahlTage);
|
|
|
|
// for (int i = 0; i < konto.Count; i++)
|
|
// {
|
|
// var entry = konto[i];
|
|
|
|
// if (entry.DatumZurSortierung != null)
|
|
// {
|
|
// //if (i + 1 < konto.Count)
|
|
// //{
|
|
// if (konto[i].DatumZurSortierung > ro.ReportEndDate.AddTicks(-1))
|
|
// break;
|
|
// //}
|
|
|
|
// emp.Custom1 += Convert.ToDecimal(entry.AnzahlTage); // += weil Tage immer negativ sind
|
|
// }
|
|
// }
|
|
// }
|
|
//}
|
|
}
|
|
}
|
|
}
|