This commit is contained in:
Christian
2018-05-21 16:39:24 +02:00
parent a44b59079c
commit d20b2ec5bf
102 changed files with 20992 additions and 20197 deletions

View File

@@ -105,7 +105,9 @@ namespace BeWo.Report.ReportObjects
public string ApprovalDate { get; set; }
public InvoiceBaseDC InvoiceBase { get; set; }
public List<ServiceRecordDC> BillableServiceRecords { get; set; }
public static ServiceInvoiceRO Create(ServiceInvoiceDC pDC)
{
var lResult = new ServiceInvoiceRO
@@ -265,6 +267,28 @@ namespace BeWo.Report.ReportObjects
return lResult;
}
public void CreateBillableServiceRecords()
{
this.BillableServiceRecords = new List<ServiceRecordDC>();
if (ServiceInvoicePeriods != null)
{
foreach (var sip in ServiceInvoicePeriods)
{
if (sip.ServiceInvoiceItems != null)
{
foreach (var ii in sip.ServiceInvoiceItems)
{
if (ii.ServiceRecord != null)
{
BillableServiceRecords.Add(ii.ServiceRecord);
}
}
}
}
}
BillableServiceRecords.Sort((a, b) => a.Start.Value.CompareTo(b.Start.Value));
}
}
public class ServiceInvoicePeriodRO

View File

@@ -466,7 +466,8 @@ namespace BeWo.Report.ReportObjects
foreach (var iSr in lServiceRecords)
{
lResult.TotalGefahreneKilometer += Convert.ToDouble(iSr.DistanceInMeter);
lResult.TotalGefahreneKilometer += Convert.ToDouble(iSr.DistanceInMeter);
bool cont = !(empOid != 0 && iSr.EmployeeOid != null && iSr.EmployeeOid != empOid);
@@ -620,7 +621,7 @@ namespace BeWo.Report.ReportObjects
};
sd.ServiceRecordOid = iSr.Oid.Value;
sd.SignatureOid = iSr.SignatureOid;
sd.GefahreneKilometer = iSr.DistanceInMeter.HasValue ? (Convert.ToDouble(iSr.DistanceInMeter)).ToString("0.##") : string.Empty;
decimal roundedDur = iSr.RoundedDuration;
@@ -714,6 +715,9 @@ namespace BeWo.Report.ReportObjects
sd.EmployeeAbbr = employeeAbbr;
sd.EmployeeFullname = employeeFullName;
sd.EmployeeFirstName = iSr.Employee.Person.FirstName;
sd.EmployeeLastName = iSr.Employee.Person.LastName;
sd.EmployeeNameCommaSeparated = string.Format("{0}, {1}", iSr.Employee.Person.LastName, iSr.Employee.Person.FirstName);
sd.Notice = iSr.Notice;
@@ -1113,6 +1117,18 @@ namespace BeWo.Report.ReportObjects
}
}
public static void CreateSignatureString(ServiceDetail sd)
{
if (sd.SignatureOid.HasValue && String.IsNullOrEmpty(sd.Signature))
{
var sig = DAOFactory.GenericDAO.GetByID<Signature>(sd.SignatureOid.Value);
if (sig != null)
{
sd.Signature = sig.DataBild;
}
}
}
private static int GetKW(DateTime actualDate)
{
Calendar objCal = CultureInfo.CurrentCulture.Calendar;
@@ -1121,6 +1137,40 @@ namespace BeWo.Report.ReportObjects
return weekofyear;
}
public static ServicesOverviewRO CopyFromRO(ServicesOverviewRO ro)
{
ServicesOverviewRO newRo = new ServicesOverviewRO();
newRo.StartDate = ro.StartDate;
newRo.AbsenceTimes = ro.AbsenceTimes;
newRo.ApprovedEndDate = ro.ApprovedEndDate;
newRo.ApprovedFLSPerMonth = ro.ApprovedFLSPerMonth;
newRo.ApprovedFLSPerMonthTotal = ro.ApprovedFLSPerMonthTotal;
newRo.ApprovedFLSPerWeek = ro.ApprovedFLSPerWeek;
newRo.ApprovedFLSPerWeekTotal = ro.ApprovedFLSPerWeekTotal;
newRo.ApprovedFLSTotal = ro.ApprovedFLSTotal;
newRo.ApprovedStartDate = ro.ApprovedStartDate;
newRo.ContactEmployee = ro.ContactEmployee;
newRo.CostBearer2SupportConceptList = ro.CostBearer2SupportConceptList;
newRo.Costbearer = ro.Costbearer;
newRo.CustomerBirthday = ro.CustomerBirthday;
newRo.CustomerLastName = ro.CustomerLastName;
newRo.CustomerCity = ro.CustomerCity;
newRo.CustomerFirstName = ro.CustomerFirstName;
newRo.CustomerName = ro.CustomerName;
newRo.CustomerPostalCode = ro.CustomerPostalCode;
newRo.CustomerStreet = ro.CustomerStreet;
newRo.EndDate = ro.EndDate;
newRo.FreeMinutesThisMonth = ro.FreeMinutesThisMonth;
newRo.Month = ro.Month;
newRo.Year = ro.Year;
newRo.MainAttendant = ro.MainAttendant;
newRo.MainAttendantCommaSeperated = ro.MainAttendantCommaSeperated;
newRo.ReferenceNumber = ro.ReferenceNumber;
return newRo;
}
public class EmployeeDetail
{
public string EmployeeName { get; set; }
@@ -1215,6 +1265,12 @@ namespace BeWo.Report.ReportObjects
public bool IstFerien { get; set; }
public bool IstSamstag { get; set; }
public bool IstSonntag { get; set; }
public long? SignatureOid { get; set; }
public String Signature { get; set; }
public string EmployeeFirstName { get; set; }
public string EmployeeLastName { get; set; }
}
public class ServiceDoubleDetail