Die unterschriebenen Einträge werden wieder aufgelistet, allerdings noch ohne Ziele/Maßnahmen
This commit is contained in:
@@ -1401,7 +1401,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.NewServiceRecord.IP = Request.UserHostAddress;
|
||||
|
||||
|
||||
Model.NewServiceRecord.Goals = CreateValueListEntriesFromMokZiele(Model.SelectedGoals);
|
||||
|
||||
Model.NewServiceRecord.Start = zeitenFeld[0];
|
||||
@@ -1513,7 +1512,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
TempData[TempDataConstants.AfterInsertKey] = true;
|
||||
|
||||
// ToDo: Einbauen, dass man nur Einträge mit abrechenbarer Leistung/Kategorie unterschreiben kann?
|
||||
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;
|
||||
@@ -1597,7 +1595,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.PreviouslySelectedCostbearer2SupportConceptOid = null;
|
||||
}
|
||||
|
||||
|
||||
//Wenn nicht im Editing Mode, dann behalte die zuletzt ausgewählte Leistung bei, die im Reset zurückgesetzt wird
|
||||
long? oldCatOid = null;
|
||||
long? oldDescOid = null;
|
||||
@@ -1618,8 +1615,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedServiceDescriptionOid = oldDescOid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -867,8 +867,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return PartialView("ConfirmationReceiptSignaturePartial");
|
||||
}
|
||||
|
||||
//Model.ConfirmationReceiptSignatures = OperationsService.LoadAllConfirmationReceiptSignaturesByServiceRecordOids(srOids, out var serviceRecordOidsWithSignature);
|
||||
|
||||
// Ist leer oder null!
|
||||
var obj = Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.FirstOrDefault(f => f.Identifier.Equals(identifier));
|
||||
|
||||
@@ -878,12 +876,32 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
var oids = isEmployee ? obj.EmployeeSignatureOids : obj.CustomerSignatureOids;
|
||||
|
||||
// ToDo: Hierzu fehlen die ConfirmationReceiptSignatures!
|
||||
|
||||
var signatures = Model.GetConfirmationReceitSignaturesByOids(oids);
|
||||
|
||||
Model.SelectedConfirmationReceiptSignatures = ConvertSignatureDCsToSignatureObjects(signatures);
|
||||
|
||||
var serviceRecords = new List<ServiceRecordDC>();
|
||||
|
||||
signatures.DoForEach(s =>
|
||||
{
|
||||
serviceRecords.AddRangeIfElementsNotIn(s.ServiceRecords);
|
||||
});
|
||||
|
||||
Model.ServiceRecordOids2GoalHeader = new Dictionary<long, List<string>>();
|
||||
|
||||
foreach(var serviceRecord in serviceRecords)
|
||||
{
|
||||
if(serviceRecord.ServiceRecordOid is null || serviceRecord.Goals is null || serviceRecord.Goals.Count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var goalHeaders = serviceRecord.Goals.Select(g => g.DisplayName).ToList();
|
||||
|
||||
Model.ServiceRecordOids2GoalHeader.AddOrUpdateValueInDictionary(serviceRecord.ServiceRecordOid.Value, goalHeaders);
|
||||
}
|
||||
|
||||
var customerName = obj.CustomerName;
|
||||
var employeeName = LoggedInUser.Employee.SimpleDescription;
|
||||
|
||||
@@ -891,7 +909,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(isEmployee)
|
||||
{
|
||||
serviceRecordCount = Model.HasRightToProvideEmployeeSignatureForOthers ? obj.Items.Count : obj.Items.Count(x => x.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid));
|
||||
serviceRecordCount = Model.HasRightToProvideEmployeeSignatureForOthers
|
||||
? obj.Items.Count
|
||||
: obj.Items.Count(x => x.EmployeeOid.Equals(LoggedInEmployee.EmployeeOid));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -271,7 +271,11 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public List<long> ReportServiceRecordOids { get; set; }
|
||||
|
||||
public List<ConfirmationReceiptSignatureDC> ConfirmationReceiptSignatures { get; set; } = new List<ConfirmationReceiptSignatureDC>();
|
||||
public List<ConfirmationReceiptSignatureDC> ConfirmationReceiptSignatures
|
||||
{
|
||||
get => ReportSessionModel.ConfirmationReceiptSignatures;
|
||||
set => ReportSessionModel.ConfirmationReceiptSignatures = value;
|
||||
}
|
||||
|
||||
public ConfirmationReceiptSignatureDC GetConfirmationReceiptSignatureByOid(long confirmationReceiptSignatureOid)
|
||||
{
|
||||
@@ -306,7 +310,11 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public List<RatingTypeDC> GoalRatingTypes { get; set; } = new List<RatingTypeDC>();
|
||||
|
||||
public Dictionary<long, List<string>> ServiceRecordOids2GoalHeader { get; set; }
|
||||
public Dictionary<long, List<string>> ServiceRecordOids2GoalHeader
|
||||
{
|
||||
get => ReportSessionModel.ServiceRecordOids2GoalHeader;
|
||||
set => ReportSessionModel.ServiceRecordOids2GoalHeader = value;
|
||||
}
|
||||
|
||||
public ValueListEntryDC[] Dokutypes { get; set; }
|
||||
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BeWoPlanerMobil.Util.ReportUtils;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
@@ -36,6 +28,8 @@ namespace BeWoPlanerMobil.Models
|
||||
public Quittierungsbelegsunterschriftenobjekt Quittierungsbelegsunterschriftenobjekt { get; internal set; }
|
||||
public List<ConfirmationReceiptSignatureObject> SelectedConfirmationReceiptSignatures { get; internal set; }
|
||||
public QbSignatureIntervalSelection SelectedIntervalSelection { get; internal set; }
|
||||
public List<ConfirmationReceiptSignatureDC> ConfirmationReceiptSignatures { get; internal set; }
|
||||
public Dictionary<long, List<string>> ServiceRecordOids2GoalHeader { get; internal set; }
|
||||
|
||||
public override void ResetValues()
|
||||
{
|
||||
@@ -59,6 +53,8 @@ namespace BeWoPlanerMobil.Models
|
||||
Quittierungsbelegsunterschriftenobjekt = null;
|
||||
SelectedConfirmationReceiptSignatures = null;
|
||||
SelectedIntervalSelection = QbSignatureIntervalSelection.FirstHalf;
|
||||
ConfirmationReceiptSignatures = null;
|
||||
ServiceRecordOids2GoalHeader = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,8 @@
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Invoicing;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
@@ -125,7 +120,7 @@ namespace BeWoPlanerMobil.Util
|
||||
}
|
||||
}
|
||||
|
||||
if (model != null && model.ServiceRecordOids2GoalHeader.ContainsKey(s.Oid.Value))
|
||||
if (model?.ServiceRecordOids2GoalHeader?.ContainsKey(s.Oid.Value) ?? false)
|
||||
{
|
||||
var ziele = dc.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType || g.Type == ValueListEntryType.SupportConceptGoalCategoryType).ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user