Konflikte gelöst.
This commit is contained in:
@@ -1518,21 +1518,33 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(false == Model.IsInEditingMode)
|
||||
{
|
||||
var oidList = OperationsService.InsertNewServiceRecords(new List<ServiceRecordDC> { Model.NewServiceRecord });
|
||||
|
||||
Model.LastCreatedServiceRecordOid = oidList[0];
|
||||
|
||||
TempData[TempDataConstants.AfterInsertKey] = true;
|
||||
|
||||
if(Model.IsAllowedToCreateSignature(Model.NewServiceRecord))
|
||||
if(Model.NewServiceRecord.CostBearer != null && Model.ShowSignature && (Model.NewServiceRecord.ServiceDescription.Category.IsBillable || Model.NewServiceRecord.ServiceDescription.Category.BillableAmount > 0m || Model.NewServiceRecord.ServiceDescription.BillableAmount > 0m))
|
||||
{
|
||||
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);
|
||||
bool doppelt = false;
|
||||
if(valRes.Count > 0 && valRes.FirstOrDefault(v => v.ResultType == ServiceRecordValidationResult.DoppelterEintrag) != null)
|
||||
{
|
||||
TempData[TempDataConstants.ShowSignatureSuggestionPopup] = true;
|
||||
doppelt = true;
|
||||
}
|
||||
|
||||
if(!doppelt)
|
||||
{
|
||||
var oidList = OperationsService.InsertNewServiceRecords(new List<ServiceRecordDC> { Model.NewServiceRecord });
|
||||
|
||||
Model.LastCreatedServiceRecordOid = oidList[0];
|
||||
|
||||
|
||||
if(Model.IsAllowedToCreateSignature(Model.NewServiceRecord))
|
||||
{
|
||||
if(Model.NewServiceRecord.CostBearer != null && Model.ShowSignature && (Model.NewServiceRecord.ServiceDescription.Category.IsBillable || Model.NewServiceRecord.ServiceDescription.Category.BillableAmount > 0m || Model.NewServiceRecord.ServiceDescription.BillableAmount > 0m))
|
||||
{
|
||||
TempData[TempDataConstants.ShowSignatureSuggestionPopup] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(false == appointmentPrototype is null)
|
||||
if(appointmentPrototype is object)
|
||||
{
|
||||
var serviceRecord = OperationsService.GetServiceRecordById(Model.LastCreatedServiceRecordOid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user