Bugfix, Customer History

This commit is contained in:
Christian
2025-03-17 11:18:13 +01:00
parent a1f7eeb775
commit 15e68f2f43

View File

@@ -1016,7 +1016,7 @@ namespace BeWo.Service.ServiceImplementations
var lOriginal = DAOFactory.GenericDAO.LoadByID<Customer>(oid);
object[] Lists = GetFromNHibernateDecoupledCustomerRelatedLists(lOriginal);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), lOriginal.Oid.Value, StatementType.Insert, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, pCustomerDC, lOriginal.Oid.Value, StatementType.Insert, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
OwnChatHelper.StartOwnChatSync();
return oid;
@@ -1250,11 +1250,13 @@ namespace BeWo.Service.ServiceImplementations
object[] Lists = GetFromNHibernateDecoupledCustomerRelatedLists(lOriginal);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, pCustomerDC, null, StatementType.Update, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
MapperFactory.CustomerDC_Customer.MergeWithEntity(pCustomerDC, lOriginal);
DAOFactory.GenericDAO.Update(lOriginal);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), null, StatementType.Update, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
CheckUpdatedReferenceNumbers(pCustomerDC, lOriginal);