Bugfix Overtimehistory. EmployeeOid wird jetzt auch bei Neuanlage gesetzt

This commit is contained in:
2025-12-10 14:45:11 +01:00
parent 9391cc61b0
commit 33a5d332ac

View File

@@ -73,7 +73,21 @@ namespace BeWo.ServiceUtils.History
}
}
}
CreateAbsenceTimeHistoryEntry(originalEmployee.AbsenceTimes, newEmployee.AbsenceTimes);
if (newEmployee.Overtimes != null)
{
foreach (var item in newEmployee.Overtimes)
{
if (!item.EmployeeOid.HasValue)
{
item.EmployeeOid = originalEmployee.Oid.Value;
}
}
}
CreateOvertimeHistoryEntry(originalEmployee.Overtimes, newEmployee.Overtimes);
@@ -482,7 +496,7 @@ namespace BeWo.ServiceUtils.History
//CostBearer2SupportConcept_ServiceRecords = originalC2S.ServiceRecords,
CostBearer2SupportConcept_Status = originalC2S.Status,
//CostBearer2SupportConcept_SupportConceptApprovalPeriodList = originalC2S.ApprovalPeriodList
CostBearer2SupportConcept_SupportConceptHistoryOid = lOriginal.Oid.Value,
CostBearer2SupportConcept_SupportConceptHistoryOid = lOriginal?.Oid,
ChangeType = statementType,
Notice = originalC2S.Notice
};
@@ -502,14 +516,14 @@ namespace BeWo.ServiceUtils.History
SupportConceptApprovalPeriod_BudgetOid = item.Budget?.Oid.Value,
SupportConceptApprovalPeriod_ContactCountInterval = item.ContactCountInterval,
SupportConceptApprovalPeriod_ContactCountPerInterval = item.ContactCountPerInterval,
SupportConceptApprovalPeriod_CostBearer2SupportConceptHistoryOid = originalC2S.Oid.Value,
SupportConceptApprovalPeriod_CostBearer2SupportConceptHistoryOid = originalC2S?.Oid,
SupportConceptApprovalPeriod_EndDate = item.EndDate,
SupportConceptApprovalPeriod_IsApprovedBEShifting = item.IsApprovedBEShifting,
SupportConceptApprovalPeriod_IsApprovedFixedAmountShifting = item.IsApprovedFixedAmountShifting,
SupportConceptApprovalPeriod_MonthlyPayment = item.MonthlyPayment,
SupportConceptApprovalPeriod_StartDate = item.StartDate,
SupportConceptApprovalPeriod_SupportConceptApprovalPeriod2Employee = item.SupportConceptApprovalPeriod2Employee,
SupportConceptApprovalPeriod_SupportConceptHistoryOid = supportConceptHistoryEntry.Oid.Value,
SupportConceptApprovalPeriod_SupportConceptHistoryOid = supportConceptHistoryEntry?.Oid,
Notice = item.Notice
};
DAOFactory.GenericDAO.Insert(scApprovalPeriodHistory);