diff --git a/ReportImp/DiakoniewerkEssen/DiakonieWerkEssen.csproj b/ReportImp/DiakoniewerkEssen/DiakonieWerkEssen.csproj
index 56a76a12c..170c11731 100644
--- a/ReportImp/DiakoniewerkEssen/DiakonieWerkEssen.csproj
+++ b/ReportImp/DiakoniewerkEssen/DiakonieWerkEssen.csproj
@@ -114,6 +114,7 @@
ServiceInvoiceReport67.cs
+
diff --git a/ReportImp/DiakoniewerkEssen/Validation/ServiceRecordValidator.cs b/ReportImp/DiakoniewerkEssen/Validation/ServiceRecordValidator.cs
new file mode 100644
index 000000000..5f01cab2f
--- /dev/null
+++ b/ReportImp/DiakoniewerkEssen/Validation/ServiceRecordValidator.cs
@@ -0,0 +1,61 @@
+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.DataContracts;
+using BS.Shared.Extensions;
+
+namespace DiakonieWerkEssen.Validation
+{
+ public class BetreuwoServiceRecordValidator : ServiceRecordValidator
+ {
+ public override List ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics,
+ int maxDaysEditServiceRecordsAllowed, IList employeeOids, IList cb2scOids)
+ {
+ var result = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
+ bool hasZukunftResult = false;
+
+ foreach (var r in result)
+ {
+ if (r.ResultType == ServiceRecordValidationResult.Custom && r.Message.Contains("Zukunft"))
+ {
+ hasZukunftResult = true;
+ }
+ }
+ if (!hasZukunftResult)
+ {
+ if (newServiceRecord.Start.Value > DateTime.Now)
+ {
+ result.Add(new ServiceRecordValidationResultDC
+ {
+ ResultType = ServiceRecordValidationResult.Custom,
+ Message = "Das gewählte Datum darf nicht in der Zukunft liegen."
+ });
+ }
+ }
+
+ // Dokumentationsfeld ist Pflicht - außer bei Arbeitszeiterfassung
+ if (!newServiceRecord.ServiceDescription.Category.Name.ToLower().Contains("arbeitszeiterfassung"))
+ {
+ if (newServiceRecord.Notice.IsNullOrEmpty())
+ {
+ result.Add(new ServiceRecordValidationResultDC
+ {
+ Allow = false,
+ EmployeeName = newServiceRecord.Employee.LastName + ", " + newServiceRecord.Employee.FirstName,
+ StartDate = newServiceRecord.Start.Value,
+ EndDate = newServiceRecord.End.Value,
+ ResultType = ServiceRecordValidationResult.Custom,
+ Message = "Das Dokumentationsfeld muss ausgefüllt werden."
+ });
+ }
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file