MH: BAW Sammelrechnung und 2. Spitzabrechnung
This commit is contained in:
@@ -29,67 +29,67 @@ namespace RatPlusTat
|
||||
{
|
||||
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
|
||||
{
|
||||
if (item.ServiceDescription.ServiceCategory.Name == "Pause")
|
||||
if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//protected override ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList<ServiceRecord> groupFilteredRecords, DateTime berichtsAnfang,
|
||||
// DateTime berichtsEnde)
|
||||
//{
|
||||
// decimal flsGesamt = 0;
|
||||
// decimal arbeitszeit = 0;
|
||||
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);
|
||||
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;
|
||||
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.GroupRoundedDuration.HasValue)
|
||||
{
|
||||
duration = item.GroupRoundedDuration.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = item.RoundedDuration;
|
||||
}
|
||||
|
||||
// if (item.ServiceDescription != null &&
|
||||
// item.ServiceDescription.ServiceCategory != null)
|
||||
// {
|
||||
// if (item.ServiceDescription.ServiceCategory.Name == "Pause")
|
||||
// {
|
||||
// arbeitszeit -= duration;
|
||||
// }
|
||||
// else if (item.ServiceDescription.ServiceCategory.IsBillable)
|
||||
// {
|
||||
// flsGesamt += duration;
|
||||
// }
|
||||
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.RecordsImBerichtszeitraum.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// sum.IstAbrechenbar = flsGesamt;
|
||||
// sum.IstNichtAbrechenbar = arbeitszeit - flsGesamt;
|
||||
sum.IstAbrechenbar = flsGesamt;
|
||||
sum.IstNichtAbrechenbar = arbeitszeit - flsGesamt;
|
||||
|
||||
|
||||
// return sum;
|
||||
//}
|
||||
return sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<Compile Include="Teamstundenkonto.designer.cs">
|
||||
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Validation\ServiceRecordValidator.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="BudgetnachweisAnhang.resx">
|
||||
|
||||
25
ReportImp/RatPlusTat/Validation/ServiceRecordValidator.cs
Normal file
25
ReportImp/RatPlusTat/Validation/ServiceRecordValidator.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
|
||||
namespace RatPlusTat.Validation
|
||||
{
|
||||
public class CustomServiceRecordValidator : ServiceRecordValidator
|
||||
{
|
||||
public override string[] GetIgnoreCategoriesForOverlappingCheck()
|
||||
{
|
||||
return new[] { "Arbeitszeit" };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user