MH: Haus Dülken 0 Min SR verbieten
This commit is contained in:
@@ -27,6 +27,25 @@ namespace KetteReports.Validation
|
||||
return new[] { "Arbeitszeit", "Pause" };
|
||||
}
|
||||
|
||||
public override List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics, int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
|
||||
{
|
||||
var results = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
|
||||
|
||||
if (newServiceRecord.RoundedDuration == 0)
|
||||
{
|
||||
results.Add(new ServiceRecordValidationResultDC()
|
||||
{
|
||||
Allow = false,
|
||||
CustomerName = newServiceRecord.Customer != null ? newServiceRecord.Customer.LastNameFirstName : "",
|
||||
EmployeeName = newServiceRecord.Employee != null ? newServiceRecord.Employee.FirstNameLastName : "",
|
||||
Message = "Einträge mit einer Dauer von 0 Minuten können nicht gespeichert werden.",
|
||||
ResultType = ServiceRecordValidationResult.Custom,
|
||||
});
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
public override ServiceRecordValidationResultDC CheckOverlappingCustomerServiceRecords(ServiceRecordDC newServiceRecord, DateTime start, IList<ServiceRecord> allCustomerRecords, bool isGroupRecord, decimal roundedDuration)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user