MH: PaS Stundenkonto Reset
This commit is contained in:
@@ -55,7 +55,6 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="PasMitarbeiterstundenkontoBerechnung.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServicesOverviewReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
|
||||
namespace PaSMoenchengladbach
|
||||
{
|
||||
public class PasMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
|
||||
{
|
||||
public override bool AddServiceRecordToDuration(ServiceRecord item)
|
||||
{
|
||||
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
|
||||
{
|
||||
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList<ServiceRecord> groupFilteredRecords, DateTime berichtsAnfang,
|
||||
DateTime berichtsEnde)
|
||||
{
|
||||
decimal flsGesamt = 0;
|
||||
decimal arbeitszeit = 0;
|
||||
|
||||
var sum = new ServiceRecordSummary();
|
||||
sum.RecordsImBerichtszeitraum = new List<ServiceRecord>();
|
||||
//base.CorrectOverlappingTimes(groupFilteredRecords);
|
||||
|
||||
foreach (var item in groupFilteredRecords)
|
||||
{
|
||||
if (!IsServiceRecordFehlzeit(item))
|
||||
{
|
||||
if (item.Start.Value >= berichtsAnfang && item.Start.Value < berichtsEnde)
|
||||
{
|
||||
//if (AddServiceRecordToDuration(item))
|
||||
//{
|
||||
decimal duration = 0;
|
||||
|
||||
if (item.GroupRoundedDuration.HasValue)
|
||||
{
|
||||
duration = item.GroupRoundedDuration.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = item.RoundedDuration;
|
||||
}
|
||||
|
||||
if (item.ServiceDescription != null &&
|
||||
item.ServiceDescription.ServiceCategory != null)
|
||||
{
|
||||
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
|
||||
{
|
||||
arbeitszeit += duration;
|
||||
}
|
||||
else if (item.ServiceDescription.ServiceCategory.IsBillable)
|
||||
{
|
||||
flsGesamt += duration;
|
||||
}
|
||||
|
||||
}
|
||||
sum.RecordsImBerichtszeitraum.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sum.IstAbrechenbar = flsGesamt;
|
||||
sum.IstNichtAbrechenbar = arbeitszeit - flsGesamt;
|
||||
|
||||
|
||||
return sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user