ApiBerlin/Mitarbeiterarbeitszeitkonto, AidshilfeEssen Rundung Bewo67

This commit is contained in:
Alexandra
2022-09-19 17:47:03 +02:00
parent a3c6c8731c
commit 7cfbaa7882
5 changed files with 169 additions and 45 deletions

View File

@@ -63,6 +63,7 @@
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\ServiceRecordDurationCalculator.cs" />
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -0,0 +1,38 @@
using System;
using BeWo.Data.Entities;
using BeWo.Service.Plugins;
using BS.Shared.DataContracts;
namespace AidshilfeEssen.Service
{
public class CustomServiceRecordDurationCalculator : ServiceRecordDurationCalculator
{
public override void CalculateRoundedDuration(ServiceRecord sr)
{
if (sr.ServiceDescription.ServiceCategory.IsBillable && sr.CostBearer2SupportConcept.CostBearer.Organisation.Name.Contains("LVR §67"))
{
var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
sr.RoundedDuration = Math.Floor(duration / 10) * 10;
}
else
{
base.CalculateRoundedDuration(sr);
}
}
public override void CalculateRoundedDuration(ServiceRecordDC sr)
{
if (sr.CostBearer.Name.Contains("LVR §67"))
{
var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
sr.RoundedDuration = Math.Floor(duration / 10) * 10;
}
else
{
base.CalculateRoundedDuration(sr);
}
}
}
}

View File

@@ -363,9 +363,8 @@ namespace ApiBerlin
emp.Custom3 += duration / 60;
}
else if (item.ServiceDescription.ServiceCategory.Name.Contains("Arbeitszeit Sonstiges"))
else if (item.ServiceDescription.ServiceCategory.Name.Contains("Arbeitszeit Sonstiges") && !item.ServiceDescription.Name.Contains("Pause"))
{
emp.Custom4 += duration / 60;
}
}

View File

@@ -38,10 +38,29 @@ namespace ApiBerlin
ed.Regelarbeitszeit = String.Format("{0:0.00} Stunden pro Woche", c.WeeklyTotalHours);
}
}
foreach (var d in ed.Days)
{
if (d.ServiceRecords != null && d.ServiceRecords.Count > 0)
foreach (var sr in d.ServiceRecords)
{
if (sr.ServiceDescription.ServiceCategory.Name.Contains("Arbeitszeit Sonstiges") && sr.ServiceDescription.Name.Contains("Pause"))
{
if (d.Custom8 != null && d.Custom8.Length != 0)
d.Custom8 += ", ";
d.Custom8 += String.Format("{0:HH:mm} - {1:HH:mm}", sr.Start, sr.End);
}
else if (sr.ServiceDescription.ServiceCategory.Name == "Arbeitszeit Sonstiges" && sr.ServiceDescription.Name.Contains("Selbsttest C19"))
d.Custom9 = "x";
else if (sr.ServiceDescription.ServiceCategory.Name.Contains("Arbeitszeit Sonstiges") && sr.ServiceDescription.Name.Contains("Supervision"))
{
if (lblSupervision.Text != null && lblSupervision.Text.Length != 0)
lblSupervision.Text += ", ";
lblSupervision.Text += String.Format("am {0:dd.MM.yyyy} - {1:0.##} Minuten", sr.Start, sr.RoundedDuration);
}
}
}
}
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -67,7 +67,6 @@ namespace ApiBerlin
this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow9 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -97,7 +96,6 @@ namespace ApiBerlin
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.Title = new DevExpress.XtraReports.UI.XRControlStyle();
this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle();
this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle();
@@ -115,6 +113,14 @@ namespace ApiBerlin
this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblSupervision = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -147,7 +153,7 @@ namespace ApiBerlin
this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowDetail});
this.xrTableDetail.SizeF = new System.Drawing.SizeF(670F, 22F);
this.xrTableDetail.SizeF = new System.Drawing.SizeF(700F, 22F);
this.xrTableDetail.StylePriority.UseBorders = false;
this.xrTableDetail.StylePriority.UseFont = false;
this.xrTableDetail.StylePriority.UsePadding = false;
@@ -159,6 +165,8 @@ namespace ApiBerlin
this.xrTableRowDetail.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell3,
this.xrTableCell20,
this.xrTableCell9,
this.xrTableCell29,
this.xrTableCell31,
this.xrTableCell67,
this.xrTableCell27});
@@ -175,7 +183,7 @@ namespace ApiBerlin
this.xrTableCell3.StylePriority.UsePadding = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell3.Weight = 0.090171325518485154D;
this.xrTableCell3.Weight = 0.0676284941388639D;
this.xrTableCell3.XlsxFormatString = "ddd. dd.MM.yyyy";
//
// xrTableCell20
@@ -184,7 +192,7 @@ namespace ApiBerlin
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.ZeitraeumeString", "{0:HH:mm}")});
this.xrTableCell20.Name = "xrTableCell20";
this.xrTableCell20.Text = "xrTableCell20";
this.xrTableCell20.Weight = 0.27051398343498156D;
this.xrTableCell20.Weight = 0.22542832039932953D;
//
// xrTableCell31
//
@@ -194,7 +202,7 @@ namespace ApiBerlin
this.xrTableCell31.StylePriority.UseTextAlignment = false;
this.xrTableCell31.Text = "xrTableCell31";
this.xrTableCell31.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell31.Weight = 0.08115419554645896D;
this.xrTableCell31.Weight = 0.055906220910430467D;
//
// xrTableCell67
//
@@ -204,7 +212,7 @@ namespace ApiBerlin
this.xrTableCell67.StylePriority.UseTextAlignment = false;
this.xrTableCell67.Text = "xrTableCell67";
this.xrTableCell67.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell67.Weight = 0.081154197266340475D;
this.xrTableCell67.Weight = 0.055906222630312009D;
//
// xrTableCell27
//
@@ -214,7 +222,7 @@ namespace ApiBerlin
this.xrTableCell27.StylePriority.UseTextAlignment = false;
this.xrTableCell27.Text = "xrTableCell27";
this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell27.Weight = 0.08115417920758361D;
this.xrTableCell27.Weight = 0.05500450163356338D;
//
// DetailReport
//
@@ -266,7 +274,7 @@ namespace ApiBerlin
this.xrTableHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowHeader});
this.xrTableHeader.SizeF = new System.Drawing.SizeF(670F, 30F);
this.xrTableHeader.SizeF = new System.Drawing.SizeF(701F, 30F);
this.xrTableHeader.StylePriority.UseBackColor = false;
this.xrTableHeader.StylePriority.UseBorders = false;
this.xrTableHeader.StylePriority.UseFont = false;
@@ -279,6 +287,8 @@ namespace ApiBerlin
this.xrTableRowHeader.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell5,
this.xrTableCell2,
this.xrTableCell4,
this.xrTableCell23,
this.xrTableCell7,
this.xrTableCell8,
this.xrTableCell10});
@@ -293,7 +303,7 @@ namespace ApiBerlin
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.Text = "Datum";
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell5.Weight = 0.090171325629990237D;
this.xrTableCell5.Weight = 0.067628494250368959D;
//
// xrTableCell2
//
@@ -301,7 +311,7 @@ namespace ApiBerlin
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.Text = "Uhrzeit";
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell2.Weight = 0.27051397637806085D;
this.xrTableCell2.Weight = 0.22542831350532205D;
//
// xrTableCell7
//
@@ -309,7 +319,7 @@ namespace ApiBerlin
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.Text = "Stunden";
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell7.Weight = 0.081154194025935031D;
this.xrTableCell7.Weight = 0.055906222863732119D;
//
// xrTableCell8
//
@@ -318,7 +328,7 @@ namespace ApiBerlin
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "Krank";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.081154199562331691D;
this.xrTableCell8.Weight = 0.055906221520602595D;
//
// xrTableCell10
//
@@ -328,7 +338,7 @@ namespace ApiBerlin
this.xrTableCell10.StylePriority.UseTextAlignment = false;
this.xrTableCell10.Text = "Urlaub";
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell10.Weight = 0.0811541853775325D;
this.xrTableCell10.Weight = 0.055906221094855733D;
//
// GroupHeader3
//
@@ -364,8 +374,9 @@ namespace ApiBerlin
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1,
this.xrTableRow8,
this.xrTableRow10});
this.xrTable2.SizeF = new System.Drawing.SizeF(552.2002F, 54F);
this.xrTableRow10,
this.xrTableRow2});
this.xrTable2.SizeF = new System.Drawing.SizeF(552.2002F, 72F);
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.StylePriority.UsePadding = false;
@@ -440,8 +451,7 @@ namespace ApiBerlin
this.xrTableRow10.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell21,
this.xrTableCell24,
this.xrTableCell28,
this.xrTableCell23});
this.xrTableCell28});
this.xrTableRow10.Name = "xrTableRow10";
this.xrTableRow10.Weight = 0.75540991165010141D;
//
@@ -474,17 +484,7 @@ namespace ApiBerlin
this.xrTableCell28.StylePriority.UseTextAlignment = false;
this.xrTableCell28.Text = "Arbeitstage diesen Monat:";
this.xrTableCell28.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell28.Weight = 0.213129273221085D;
//
// xrTableCell23
//
this.xrTableCell23.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.ArbeitstageImBerichtszeitraum", "{0:0}")});
this.xrTableCell23.Name = "xrTableCell23";
this.xrTableCell23.StylePriority.UseFont = false;
this.xrTableCell23.StylePriority.UseTextAlignment = false;
this.xrTableCell23.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell23.Weight = 0.11263223681788141D;
this.xrTableCell28.Weight = 0.32576151003896642D;
//
// GroupFooter2
//
@@ -500,12 +500,12 @@ namespace ApiBerlin
// xrTable4
//
this.xrTable4.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(110F, 0F);
this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(6.103516E-05F, 0F);
this.xrTable4.Name = "xrTable4";
this.xrTable4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTable4.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow9});
this.xrTable4.SizeF = new System.Drawing.SizeF(560F, 22F);
this.xrTable4.SizeF = new System.Drawing.SizeF(700F, 22F);
this.xrTable4.StylePriority.UseBorders = false;
this.xrTable4.StylePriority.UseFont = false;
this.xrTable4.StylePriority.UsePadding = false;
@@ -530,7 +530,7 @@ namespace ApiBerlin
this.xrTableCell64.StylePriority.UseTextAlignment = false;
this.xrTableCell64.Text = "Summe:";
this.xrTableCell64.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell64.Weight = 0.26149405118689462D;
this.xrTableCell64.Weight = 0.46437722650537272D;
//
// cellSumMinutesTotalDecimal
//
@@ -544,7 +544,7 @@ namespace ApiBerlin
this.cellSumMinutesTotalDecimal.Summary = xrSummary1;
this.cellSumMinutesTotalDecimal.Text = "cellSumMinutesTotalDecimal";
this.cellSumMinutesTotalDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.cellSumMinutesTotalDecimal.Weight = 0.081153321921416444D;
this.cellSumMinutesTotalDecimal.Weight = 0.055905785866453145D;
//
// cellSumHoursSickDecimal
//
@@ -559,7 +559,7 @@ namespace ApiBerlin
this.cellSumHoursSickDecimal.Summary = xrSummary2;
this.cellSumHoursSickDecimal.Text = "cellSumHoursSickDecimal";
this.cellSumHoursSickDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.cellSumHoursSickDecimal.Weight = 0.081153328404945282D;
this.cellSumHoursSickDecimal.Weight = 0.05590557220749838D;
//
// cellSumHoursInVacationDecimal
//
@@ -575,7 +575,7 @@ namespace ApiBerlin
this.cellSumHoursInVacationDecimal.Summary = xrSummary3;
this.cellSumHoursInVacationDecimal.Text = "cellSumHoursInVacationDecimal";
this.cellSumHoursInVacationDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.cellSumHoursInVacationDecimal.Weight = 0.081153321723263658D;
this.cellSumHoursInVacationDecimal.Weight = 0.055003944466325762D;
//
// xrTable1
//
@@ -589,7 +589,7 @@ namespace ApiBerlin
this.xrTableRow4,
this.xrTableRow5,
this.xrTableRow6});
this.xrTable1.SizeF = new System.Drawing.SizeF(669.9999F, 60F);
this.xrTable1.SizeF = new System.Drawing.SizeF(699.9999F, 60F);
this.xrTable1.StylePriority.UseBorders = false;
this.xrTable1.StylePriority.UseFont = false;
this.xrTable1.StylePriority.UsePadding = false;
@@ -839,10 +839,6 @@ namespace ApiBerlin
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell14.Weight = 0.080942614161178317D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
//
// Title
//
this.Title.BackColor = System.Drawing.Color.White;
@@ -972,6 +968,71 @@ namespace ApiBerlin
this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt";
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.Text = "Pause";
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell4.Weight = 0.13525698945052234D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom8")});
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.StylePriority.UseTextAlignment = false;
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell9.Weight = 0.1352569911339595D;
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell16,
this.lblSupervision});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 0.75540991165010141D;
//
// xrTableCell16
//
this.xrTableCell16.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrTableCell16.Name = "xrTableCell16";
this.xrTableCell16.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell16.StylePriority.UseFont = false;
this.xrTableCell16.StylePriority.UsePadding = false;
this.xrTableCell16.StylePriority.UseTextAlignment = false;
this.xrTableCell16.Text = "Supervision:";
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell16.Weight = 0.138246012405208D;
//
// lblSupervision
//
this.lblSupervision.Name = "lblSupervision";
this.lblSupervision.StylePriority.UseTextAlignment = false;
this.lblSupervision.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.lblSupervision.Weight = 0.49791629021026573D;
//
// xrTableCell23
//
this.xrTableCell23.Name = "xrTableCell23";
this.xrTableCell23.StylePriority.UseTextAlignment = false;
this.xrTableCell23.Text = "Test";
this.xrTableCell23.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell23.Weight = 0.036068531187271553D;
//
// xrTableCell29
//
this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom9")});
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.StylePriority.UseTextAlignment = false;
this.xrTableCell29.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell29.Weight = 0.036068529250248241D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
//
// Mitarbeiterarbeitszeitkonto
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1095,7 +1156,13 @@ namespace ApiBerlin
private DevExpress.XtraReports.UI.XRTableCell xrTableCell21;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell24;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell28;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell23;
private DevExpress.XtraReports.UI.CalculatedField fieldUeberstundenGesamt;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell29;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell23;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
private DevExpress.XtraReports.UI.XRTableCell lblSupervision;
}
}