Bugfix Team Pfeil im ServiceRecordValidator
This commit is contained in:
@@ -1532,7 +1532,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
//if(Model.NewServiceRecord.CostBearer != null && Model.ShowSignature && (Model.NewServiceRecord.ServiceDescription.Category.IsBillable || Model.NewServiceRecord.ServiceDescription.Category.BillableAmount > 0m || Model.NewServiceRecord.ServiceDescription.BillableAmount > 0m))
|
||||
//{
|
||||
var valRes = OperationsService.ValidateServiceRecord(Model.NewServiceRecord, null, 0, null, null);
|
||||
var dummystats = new SupportConceptStatisticsDC();
|
||||
dummystats.PeriodStatistics = new List<SupportConceptPeriodStatisticsDC>();
|
||||
var valRes = OperationsService.ValidateServiceRecord(Model.NewServiceRecord, dummystats, 0, null, null);
|
||||
|
||||
|
||||
var doppelt = valRes.Count > 0 && valRes.FirstOrDefault(v => v.ResultType == DoppelterEintrag) != null;
|
||||
|
||||
if(!doppelt)
|
||||
|
||||
@@ -32,27 +32,13 @@ namespace TeamPfeil.Validation
|
||||
});
|
||||
}
|
||||
|
||||
SupportConceptPeriodStatisticsDC periodStat = GetStatisticsForServiceRecord(statistics, newServiceRecord);
|
||||
if (periodStat == null && newServiceRecord.ServiceDescription.CategoryName.Contains("Qualifikationsniveau"))
|
||||
if (statistics != null)
|
||||
{
|
||||
if (!statistics.PeriodStatistics.Any(s => s.SupportConceptApprovalPeriod.ServiceCategory.Name == newServiceRecord.ServiceDescription.CategoryName))
|
||||
{
|
||||
String handlungsOption = "Möchten Sie trotzdem Speichern?";
|
||||
bool hatDasRechtTrotzdemZuSpeichern = true;
|
||||
|
||||
list.Add(new ServiceRecordValidationResultDC
|
||||
SupportConceptPeriodStatisticsDC periodStat = GetStatisticsForServiceRecord(statistics, newServiceRecord);
|
||||
if (periodStat == null && newServiceRecord.ServiceDescription.CategoryName.Contains("Qualifikationsniveau"))
|
||||
{
|
||||
if (!statistics.PeriodStatistics.Any(s => s.SupportConceptApprovalPeriod.ServiceCategory.Name == newServiceRecord.ServiceDescription.CategoryName))
|
||||
{
|
||||
ResultType = ServiceRecordValidationResult.Custom,
|
||||
Message = "Achtung für Ihr Qualifikationsniveau gibt in diesem Hilfeplan keine passende Bewilligung." +
|
||||
" \nBitte anderes Qualifikationsniveau als Leistungskategorie wählen.\n" + handlungsOption,
|
||||
Allow = hatDasRechtTrotzdemZuSpeichern
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var aplist = statistics.PeriodStatistics.Where(s => s.SupportConceptApprovalPeriod.ServiceCategory.Name == newServiceRecord.ServiceDescription.CategoryName).ToList();
|
||||
if (aplist == null && !aplist.Any(a => a.SupportConceptApprovalPeriod.StartDate <= newServiceRecord.Start && a.SupportConceptApprovalPeriod.EndDate >= newServiceRecord.Start))
|
||||
{
|
||||
String handlungsOption = "Möchten Sie trotzdem Speichern?";
|
||||
bool hatDasRechtTrotzdemZuSpeichern = true;
|
||||
|
||||
@@ -64,6 +50,23 @@ namespace TeamPfeil.Validation
|
||||
Allow = hatDasRechtTrotzdemZuSpeichern
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var aplist = statistics.PeriodStatistics.Where(s => s.SupportConceptApprovalPeriod.ServiceCategory.Name == newServiceRecord.ServiceDescription.CategoryName).ToList();
|
||||
if (aplist == null && !aplist.Any(a => a.SupportConceptApprovalPeriod.StartDate <= newServiceRecord.Start && a.SupportConceptApprovalPeriod.EndDate >= newServiceRecord.Start))
|
||||
{
|
||||
String handlungsOption = "Möchten Sie trotzdem Speichern?";
|
||||
bool hatDasRechtTrotzdemZuSpeichern = true;
|
||||
|
||||
list.Add(new ServiceRecordValidationResultDC
|
||||
{
|
||||
ResultType = ServiceRecordValidationResult.Custom,
|
||||
Message = "Achtung für Ihr Qualifikationsniveau gibt in diesem Hilfeplan keine passende Bewilligung." +
|
||||
" \nBitte anderes Qualifikationsniveau als Leistungskategorie wählen.\n" + handlungsOption,
|
||||
Allow = hatDasRechtTrotzdemZuSpeichern
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "7282396774"; // Caritas Unna
|
||||
//t = "6884855402"; // IBP
|
||||
//t = "4867997795"; // ADiK Kleve
|
||||
t = "3184859776"; // Sergej Becker
|
||||
//t = "3184859776"; // Sergej Becker
|
||||
//t = "7752610643"; // BWK Gbr
|
||||
//t = "3785623125"; // Betreuwo
|
||||
//t = "7130228334"; // LH Borken
|
||||
@@ -270,7 +270,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2998118179"; // BeWo Plus
|
||||
//t = "9254115251"; // Praunheimer Werkstätten 2.DB
|
||||
//t = "5880845152"; // Bewegt Systemische Beratung und Begleitung (Kathrin Lilly)
|
||||
//t = "5798370140"; // Team Pfeil
|
||||
t = "5798370140"; // Team Pfeil
|
||||
//t = "8242644560"; // Bewolonia - Fr. Sultan Schulz
|
||||
//t = "4817284046"; // Verein für Sozialmedizin Stade e.V.
|
||||
//t = "6323001211"; // ASB Faßbacher Hof gGmbH
|
||||
|
||||
Reference in New Issue
Block a user