LJ: Warnung bei vorhandener Monatsunterschrift wird auch im FaC angezeigt, ohne dass dieser ausgeliefert werden muss.
Fehler beim Löschen eines ServiceRecords ohne Unterschrift behoben.
This commit is contained in:
@@ -2687,7 +2687,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
newResult.KannTrotzdemGespeichertWerden = vr.Allow;
|
||||
break;
|
||||
case SignatureExists:
|
||||
case ConfirmationReceiptSignatureExists:
|
||||
var klient3 = "diesem Hilfeplan";
|
||||
if(!string.IsNullOrEmpty(vr.CustomerName))
|
||||
{
|
||||
|
||||
@@ -387,9 +387,6 @@ namespace BeWo.Data.Access
|
||||
|
||||
private static void LogSignatureDeletion(BeWoEntityBase entity)
|
||||
{
|
||||
// ToDo: vorerst ausgesetzt, da versucht wird, ein Null-Objekt in die Datenbank zu schreiben.
|
||||
return;
|
||||
|
||||
var signatureHistoryEntries = new List<SignatureHistory>();
|
||||
|
||||
switch(entity)
|
||||
@@ -410,7 +407,7 @@ namespace BeWo.Data.Access
|
||||
break;
|
||||
}
|
||||
case Bargeldkasse bargeldkasse when bargeldkasse.Bargeldtransaktionen.Any(bargeldtransaktion => bargeldtransaktion.SignatureOid.HasValue):
|
||||
signatureHistoryEntries.AddRange(DAOFactory.SearchDAO.CreateSignatureHistoryEntryForBargeldkasse(bargeldkasse));
|
||||
signatureHistoryEntries.AddRangeIfNotNull(DAOFactory.SearchDAO.CreateSignatureHistoryEntryForBargeldkasse(bargeldkasse));
|
||||
break;
|
||||
case Bargeldtransaktion bargeldtransaktion when bargeldtransaktion.SignatureOid.HasValue:
|
||||
signatureHistoryEntries.AddIfNotNull(DAOFactory.SearchDAO.CreateSignatureHistoryForBargeldtransaktion(bargeldtransaktion, SignatureEventType.CascadingDelete));
|
||||
@@ -419,7 +416,7 @@ namespace BeWo.Data.Access
|
||||
|
||||
if(signatureHistoryEntries.Any())
|
||||
{
|
||||
DAOFactory.GenericDAO.Insert(signatureHistoryEntries);
|
||||
DAOFactory.GenericDAO.Insert(signatureHistoryEntries.Where(she => she is object));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2499262621"; // HPH Bersenbrück
|
||||
//t = "4950382346"; // Holsinger
|
||||
//t = "5973016645"; // Verein Lebensgestaltung Hanau
|
||||
t = "7375324044"; // Diakonie KK Kleve
|
||||
//t = "7375324044"; // Diakonie KK Kleve
|
||||
//t = "1441747891"; // BeWo Mobil Köln
|
||||
//t = "5120047701"; // Trialog
|
||||
//t = "3629696651"; // Soziale Dienste Niederrhein (SDN)
|
||||
@@ -65,7 +65,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2542550178"; // LWVEingliederungshilfe
|
||||
//t = "3963982016"; // Convoi
|
||||
//t = "1600408120"; // BeWo Amrath
|
||||
//t = "3886054624"; // Brücke ABW
|
||||
t = "3886054624"; // Brücke ABW
|
||||
//t = "2028095630"; // Integra Heinsberg
|
||||
//t = "5351926758"; // Viva a Vida
|
||||
//t = "2215396183"; // Diakonie Remscheid Lennep
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace BeWo.Service.Plugins
|
||||
DateTime start = groupRecord.Start.Value;
|
||||
bool noTime = start.Hour == 0 && start.Minute == 0 && start.Second == 1; //Keine Zeit angegeben
|
||||
|
||||
// 0. Monatsunterschrift ist vorhanden und die Leistungskategorie ist abrechenbar
|
||||
if(groupRecord.ServiceDescription.Category.IsBillable)
|
||||
{
|
||||
var startDate = groupRecord.Start.Value;
|
||||
@@ -50,7 +51,7 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
if(hasMonatsunterschrift)
|
||||
{
|
||||
result.AddOrUpdateValueInDictionary(groupRecord, ServiceRecordValidationResult.ConfirmationReceiptSignatureExists);
|
||||
result.AddOrUpdateValueInDictionary(groupRecord, ServiceRecordValidationResult.SignatureExists);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,13 +260,17 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
if(hasMonatsunterschrift)
|
||||
{
|
||||
var customerName = newServiceRecord.SupportConcept.CustomerName;
|
||||
|
||||
var customerText = customerName is object ? $"Klient {customerName}" : "diesem Hilfeplan";
|
||||
|
||||
result.Add(new ServiceRecordValidationResultDC
|
||||
{
|
||||
ResultType = ServiceRecordValidationResult.ConfirmationReceiptSignatureExists,
|
||||
ResultType = ServiceRecordValidationResult.SignatureExists,
|
||||
Allow = true,
|
||||
CustomerName = newServiceRecord.SupportConcept.CustomerName,
|
||||
EmployeeName = newServiceRecord.Employee.ToString(),
|
||||
Message = "Für den ausgewählten Zeitraum existiert bereits eine Monatsunterschrift, die mit dem Anlegen dieses Eintrags verfällt und neu geleistet werden muss."
|
||||
Message = $"Für den ausgewählten Zeitraum existiert bereits eine Monatsunterschrift bei {customerText}, die mit dem Anlegen dieses Eintrags verfällt und neu geleistet werden muss."
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -288,7 +293,7 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
result.Add(new ServiceRecordValidationResultDC
|
||||
{
|
||||
ResultType = ServiceRecordValidationResult.ConfirmationReceiptSignatureExists,
|
||||
ResultType = ServiceRecordValidationResult.SignatureExists,
|
||||
Message = message,
|
||||
Allow = true,
|
||||
CustomerName = newServiceRecord.SupportConcept?.CustomerName,
|
||||
|
||||
@@ -909,8 +909,7 @@ namespace BS.Shared
|
||||
SettlementInvoiceAlreadyExisting = 6,
|
||||
FristAbgelaufen = 7,
|
||||
Custom = 8,
|
||||
SignatureExists = 9,
|
||||
ConfirmationReceiptSignatureExists = 10
|
||||
SignatureExists = 9
|
||||
}
|
||||
|
||||
public enum ViewDestination
|
||||
|
||||
@@ -134,12 +134,28 @@ namespace BS.Shared.Extensions
|
||||
|
||||
public static void AddIfNotNull<T>(this IList<T> list, T item)
|
||||
{
|
||||
list.Add(item);
|
||||
if(item != null)
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddIfNotNullAndNotIn<T>(this IList<T> list, T item)
|
||||
{
|
||||
list.AddIfNotIn(item);
|
||||
}
|
||||
|
||||
public static void AddRangeIfNotNull<T>(this IList<T> list, IList<T> items)
|
||||
{
|
||||
if(items == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(var item in items)
|
||||
{
|
||||
list.AddIfNotNull(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user