Bugfix: Rundungsintervall + Fortis Plan/Ist Übersicht + SeWo Zeitzuschlagsbeleg
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -227,7 +227,8 @@ namespace AkggMid
|
||||
|
||||
public override bool StundenBeiAbwesenheitBerechnen(AbsenceTime absenceTime)
|
||||
{
|
||||
if (IsKrankheitAbsenceTime(absenceTime))
|
||||
|
||||
if (absenceTime.AbsenceReason.Description.ToLower().Contains("krank"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,9 @@ namespace AkggMid
|
||||
|
||||
foreach (var day in empDetail.Days)
|
||||
{
|
||||
if (day.Date.Day == 15)
|
||||
bool added = false;
|
||||
|
||||
if (day.Date.Day == 4)
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
@@ -59,7 +61,14 @@ namespace AkggMid
|
||||
{
|
||||
var hours = day.HoursSick + day.HoursInVacation;
|
||||
empDetail.StundenGesamtIst += hours;
|
||||
day.ServiceRecords = null;
|
||||
|
||||
newDayList.Add(day);
|
||||
added = true;
|
||||
if (day.AbsenceTimes[0].AbsenceReason.Description.ToLower().Contains("krank"))
|
||||
{
|
||||
day.ServiceRecords = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (day.ServiceRecords != null && day.ServiceRecords.Count > 0)
|
||||
@@ -70,14 +79,17 @@ namespace AkggMid
|
||||
dd.Date = day.Date;
|
||||
dd.ServiceRecords = new List<ServiceRecord>();
|
||||
dd.ServiceRecords.Add(sr);
|
||||
added = true;
|
||||
newDayList.Add(dd);
|
||||
}
|
||||
}
|
||||
else
|
||||
day.ServiceRecords = null;
|
||||
|
||||
|
||||
if (!added)
|
||||
{
|
||||
newDayList.Add(day);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
empDetail.Days = newDayList;
|
||||
|
||||
@@ -88,11 +88,19 @@ namespace Fortis
|
||||
|
||||
if (ro.CustomerFirstName.Contains("TEST") || ro.CustomerLastName.Contains("TEST"))
|
||||
{
|
||||
report = new Fortis.Quittierungsbeleg();
|
||||
report = new Fortis.ZeitdokumentationPlanIstUebersicht();
|
||||
report.SetReportDataSource(ro);
|
||||
((XtraReport)report).CreateDocument();
|
||||
|
||||
var qb = new Fortis.Quittierungsbeleg();
|
||||
qb.SetReportDataSource(ro);
|
||||
qb.CreateDocument();
|
||||
((XtraReport)report).Pages.AddRange(qb.Pages);
|
||||
|
||||
return report as XtraReport;
|
||||
}
|
||||
|
||||
if (report == null)
|
||||
report = new BeWo.Report.DefaultReports.Quittierungsbeleg();
|
||||
report = new BeWo.Report.DefaultReports.Quittierungsbeleg();
|
||||
report.SetReportDataSource(ro);
|
||||
|
||||
return report as XtraReport;
|
||||
|
||||
@@ -71,6 +71,12 @@
|
||||
<DependentUpon>CustomerDataReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ZeitdokumentationPlanIstUebersicht.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZeitdokumentationPlanIstUebersicht.Designer.cs">
|
||||
<DependentUpon>ZeitdokumentationPlanIstUebersicht.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZeitdokumentationPlanIst.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -111,6 +117,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="ZeitdokumentationPlanIstUebersicht.resx">
|
||||
<DependentUpon>ZeitdokumentationPlanIstUebersicht.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ZeitdokumentationPlanIst.resx">
|
||||
<DependentUpon>ZeitdokumentationPlanIst.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
33
ReportImp/Fortis/Quittierungsbeleg.Designer.cs
generated
33
ReportImp/Fortis/Quittierungsbeleg.Designer.cs
generated
@@ -170,7 +170,7 @@ namespace Fortis
|
||||
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
|
||||
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow6});
|
||||
this.xrTable3.SizeF = new System.Drawing.SizeF(740F, 18F);
|
||||
this.xrTable3.SizeF = new System.Drawing.SizeF(985F, 18F);
|
||||
this.xrTable3.StylePriority.UseFont = false;
|
||||
this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
|
||||
//
|
||||
@@ -429,7 +429,7 @@ namespace Fortis
|
||||
this.xrTableRow2,
|
||||
this.xrTableRow3,
|
||||
this.xrTableRow1});
|
||||
this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(740F, 60F);
|
||||
this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(985F, 60F);
|
||||
this.xrTableServiceRecords1.StylePriority.UseBackColor = false;
|
||||
this.xrTableServiceRecords1.StylePriority.UseBorders = false;
|
||||
this.xrTableServiceRecords1.StylePriority.UseFont = false;
|
||||
@@ -863,15 +863,14 @@ namespace Fortis
|
||||
// xrLabel3
|
||||
//
|
||||
this.xrLabel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(229)))), ((int)(((byte)(214)))));
|
||||
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EndDate", "{0:dd.MM.yyyy}")});
|
||||
this.xrLabel3.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(50F, 30.50003F);
|
||||
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(66.55396F, 30.50003F);
|
||||
this.xrLabel3.Name = "xrLabel3";
|
||||
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.xrLabel3.SizeF = new System.Drawing.SizeF(100F, 30.50003F);
|
||||
this.xrLabel3.SizeF = new System.Drawing.SizeF(133.1083F, 30.50003F);
|
||||
this.xrLabel3.StylePriority.UseBackColor = false;
|
||||
this.xrLabel3.StylePriority.UseBorders = false;
|
||||
this.xrLabel3.StylePriority.UseFont = false;
|
||||
@@ -882,16 +881,15 @@ namespace Fortis
|
||||
// xrLabel2
|
||||
//
|
||||
this.xrLabel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(229)))), ((int)(((byte)(214)))));
|
||||
this.xrLabel2.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
this.xrLabel2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrLabel2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "StartDate", "{0:dd.MM.yyyy}")});
|
||||
this.xrLabel2.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(50F, 0F);
|
||||
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(66.55396F, 0F);
|
||||
this.xrLabel2.Name = "xrLabel2";
|
||||
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.xrLabel2.SizeF = new System.Drawing.SizeF(100F, 30.50003F);
|
||||
this.xrLabel2.SizeF = new System.Drawing.SizeF(133.1083F, 30.50003F);
|
||||
this.xrLabel2.StylePriority.UseBackColor = false;
|
||||
this.xrLabel2.StylePriority.UseBorders = false;
|
||||
this.xrLabel2.StylePriority.UseFont = false;
|
||||
@@ -908,7 +906,7 @@ namespace Fortis
|
||||
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 30.50003F);
|
||||
this.xrLabel1.Name = "xrLabel1";
|
||||
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.xrLabel1.SizeF = new System.Drawing.SizeF(50F, 30.50003F);
|
||||
this.xrLabel1.SizeF = new System.Drawing.SizeF(66.55396F, 30.50003F);
|
||||
this.xrLabel1.StylePriority.UseBackColor = false;
|
||||
this.xrLabel1.StylePriority.UseBorders = false;
|
||||
this.xrLabel1.StylePriority.UseFont = false;
|
||||
@@ -927,7 +925,7 @@ namespace Fortis
|
||||
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrLabel4.Name = "xrLabel4";
|
||||
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.xrLabel4.SizeF = new System.Drawing.SizeF(50F, 30.50003F);
|
||||
this.xrLabel4.SizeF = new System.Drawing.SizeF(66.55396F, 30.50003F);
|
||||
this.xrLabel4.StylePriority.UseBackColor = false;
|
||||
this.xrLabel4.StylePriority.UseBorders = false;
|
||||
this.xrLabel4.StylePriority.UseFont = false;
|
||||
@@ -959,7 +957,7 @@ namespace Fortis
|
||||
//
|
||||
// topMarginBand1
|
||||
//
|
||||
this.topMarginBand1.HeightF = 30.20833F;
|
||||
this.topMarginBand1.HeightF = 60F;
|
||||
this.topMarginBand1.Name = "topMarginBand1";
|
||||
//
|
||||
// bottomMarginBand1
|
||||
@@ -986,7 +984,7 @@ namespace Fortis
|
||||
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
|
||||
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow4});
|
||||
this.xrTable1.SizeF = new System.Drawing.SizeF(740F, 18F);
|
||||
this.xrTable1.SizeF = new System.Drawing.SizeF(985F, 18F);
|
||||
this.xrTable1.StylePriority.UseFont = false;
|
||||
this.xrTable1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
|
||||
//
|
||||
@@ -1261,9 +1259,10 @@ namespace Fortis
|
||||
this.formattingRuleCostBearer,
|
||||
this.formattingRuleEmployeeName,
|
||||
this.True});
|
||||
this.Margins = new System.Drawing.Printing.Margins(50, 30, 30, 30);
|
||||
this.PageHeight = 1169;
|
||||
this.PageWidth = 827;
|
||||
this.Landscape = true;
|
||||
this.Margins = new System.Drawing.Printing.Margins(80, 80, 60, 30);
|
||||
this.PageHeight = 827;
|
||||
this.PageWidth = 1169;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
|
||||
|
||||
@@ -91,6 +91,7 @@ namespace Fortis
|
||||
this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -123,11 +124,10 @@ namespace Fortis
|
||||
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.Dauer = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.True = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
@@ -843,6 +843,10 @@ namespace Fortis
|
||||
this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
this.xrTableCell49.Weight = 0.13966474814693633D;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// formattingRuleStartDate
|
||||
//
|
||||
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
|
||||
@@ -1237,11 +1241,7 @@ namespace Fortis
|
||||
//
|
||||
this.True.Name = "True";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// Quittierungsbeleg
|
||||
// ZeitdokumentationPlanIst
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail,
|
||||
@@ -1261,15 +1261,16 @@ namespace Fortis
|
||||
this.formattingRuleCostBearer,
|
||||
this.formattingRuleEmployeeName,
|
||||
this.True});
|
||||
this.Landscape = true;
|
||||
this.Margins = new System.Drawing.Printing.Margins(50, 30, 30, 30);
|
||||
this.PageHeight = 1169;
|
||||
this.PageWidth = 827;
|
||||
this.PageHeight = 827;
|
||||
this.PageWidth = 1169;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
1743
ReportImp/Fortis/ZeitdokumentationPlanIstUebersicht.Designer.cs
generated
Normal file
1743
ReportImp/Fortis/ZeitdokumentationPlanIstUebersicht.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
216
ReportImp/Fortis/ZeitdokumentationPlanIstUebersicht.cs
Normal file
216
ReportImp/Fortis/ZeitdokumentationPlanIstUebersicht.cs
Normal file
@@ -0,0 +1,216 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Fortis
|
||||
{
|
||||
public partial class ZeitdokumentationPlanIstUebersicht : XtraReport, IBeWoReport<ServicesOverviewRO>
|
||||
{
|
||||
|
||||
public ZeitdokumentationPlanIstUebersicht()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServicesOverviewRO pRO)
|
||||
{
|
||||
var newRo = BerechneRO(pRO);
|
||||
|
||||
bindingSource1.DataSource = newRo;
|
||||
}
|
||||
|
||||
private PlanIstUebersichtRO BerechneRO(ServicesOverviewRO pRO)
|
||||
{
|
||||
var ro = new PlanIstUebersichtRO();
|
||||
//ro.ServicesOverviewRO = pRO;
|
||||
ro.Name = pRO.CustomerLastName;
|
||||
ro.Vorname = pRO.CustomerFirstName;
|
||||
ro.GebDatum = pRO.CustomerBirthday;
|
||||
ro.Leistungserbringer = "";
|
||||
ro.Ansprechpartner = pRO.MainAttendant;
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.ApprovedStartDate))
|
||||
{
|
||||
ro.DokuzeitraumStart = DateTime.Parse(pRO.ApprovedStartDate);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.ApprovedEndDate))
|
||||
{
|
||||
ro.DokuzeitraumEnde = DateTime.Parse(pRO.ApprovedEndDate);
|
||||
}
|
||||
if (ro.DokuzeitraumStart.HasValue && ro.DokuzeitraumEnde.HasValue)
|
||||
{
|
||||
ro.AnzahlTagePlan = (int)ro.DokuzeitraumEnde.Value.Subtract(ro.DokuzeitraumEnde.Value).TotalDays + 1;
|
||||
}
|
||||
ro.StufeGeplant = "";
|
||||
if (pRO.ApprovedFLSPerWeek > 0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ro.AktuellesDatum = DateTime.Now.Date;
|
||||
if (ro.DokuzeitraumStart.HasValue)
|
||||
{
|
||||
ro.AnzahlTage = (int)ro.AktuellesDatum.Subtract(ro.DokuzeitraumStart.Value).TotalDays + 1;
|
||||
}
|
||||
if (pRO.Services != null)
|
||||
{
|
||||
foreach (var sr in pRO.Services)
|
||||
{
|
||||
if (sr.ServiceDescription != null && sr.ServiceDescription.Contains("abgesagt"))
|
||||
{
|
||||
ro.SummeAbgesagt += (decimal)sr.Minutes;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.SummeDirekt += (decimal)sr.Minutes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ro.AnzahlTage.HasValue && ro.AnzahlTage.Value > 0)
|
||||
{
|
||||
ro.DurchschnittProWocheDirekt = ro.SummeDirekt / ro.AnzahlTage.Value * 7;
|
||||
ro.DurchschnittProWocheAbgesagt = ro.SummeAbgesagt / ro.AnzahlTage.Value * 7;
|
||||
|
||||
if ((ro.DurchschnittProWocheDirekt + ro.DurchschnittProWocheAbgesagt) > 0)
|
||||
{
|
||||
ro.ProzentDirekt = (ro.DurchschnittProWocheDirekt / (ro.DurchschnittProWocheDirekt + ro.DurchschnittProWocheAbgesagt)) * 100;
|
||||
ro.ProzentAbgesagt = (ro.DurchschnittProWocheAbgesagt / (ro.DurchschnittProWocheDirekt + ro.DurchschnittProWocheAbgesagt)) * 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Stufe IST:
|
||||
|
||||
|
||||
if (!ro.DokuzeitraumStart.HasValue)
|
||||
{
|
||||
ro.StufeIst = "-";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt < 90)
|
||||
{
|
||||
ro.StufeIst = "< 1";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt >= 90 && ro.DurchschnittProWocheDirekt < 120)
|
||||
{
|
||||
ro.StufeIst = "2";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt >= 121 && ro.DurchschnittProWocheDirekt < 165)
|
||||
{
|
||||
ro.StufeIst = "3";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt >= 166 && ro.DurchschnittProWocheDirekt <= 225)
|
||||
{
|
||||
ro.StufeIst = "4";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt >= 226 && ro.DurchschnittProWocheDirekt <= 300)
|
||||
{
|
||||
ro.StufeIst = "5";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt >= 301 && ro.DurchschnittProWocheDirekt <= 420)
|
||||
{
|
||||
ro.StufeIst = "6";
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt > 420)
|
||||
{
|
||||
ro.StufeIst = "> 6";
|
||||
}
|
||||
|
||||
|
||||
//Unter STufe:
|
||||
if (ro.DurchschnittProWocheDirekt < 90)
|
||||
{
|
||||
ro.MinutenProWocheUnterStufe = ro.DurchschnittProWocheDirekt - ro.KorridorVon;
|
||||
}
|
||||
else if (ro.KorridorVon > ro.DurchschnittProWocheDirekt + 1)
|
||||
{
|
||||
ro.MinutenProWocheUnterStufe = ro.DurchschnittProWocheDirekt + 1 - ro.KorridorVon;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.MinutenProWocheUnterStufe = 0;
|
||||
}
|
||||
|
||||
|
||||
//Bis Ende Stufe:
|
||||
|
||||
if (ro.DurchschnittProWocheDirekt < 90)
|
||||
{
|
||||
ro.MinutenProWocheBisEndeStufe = 0;
|
||||
}
|
||||
else if (ro.DurchschnittProWocheDirekt + 1 >= ro.KorridorVon && ro.DurchschnittProWocheDirekt < ro.KorridorBis)
|
||||
{
|
||||
ro.MinutenProWocheBisEndeStufe = ro.DurchschnittProWocheDirekt - ro.KorridorBis;
|
||||
}
|
||||
|
||||
|
||||
//Über Stufe:
|
||||
|
||||
if (ro.KorridorBis < ro.DurchschnittProWocheDirekt)
|
||||
{
|
||||
ro.MinutenProWocheUeberStufe = (ro.KorridorBis - ro.DurchschnittProWocheDirekt) * -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.MinutenProWocheUeberStufe = 0;
|
||||
}
|
||||
|
||||
if (ro.MinutenProWocheUnterStufe < 0)
|
||||
{
|
||||
ro.Hinweise = "Vorsicht: Rückforderung droht!";
|
||||
}
|
||||
|
||||
|
||||
return ro;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PlanIstUebersichtRO
|
||||
{
|
||||
public String Name { get; set; }
|
||||
public String Vorname { get; set; }
|
||||
public DateTime? GebDatum { get; set; }
|
||||
public String Leistungserbringer { get; set; }
|
||||
public String Ansprechpartner { get; set; }
|
||||
public DateTime? DokuzeitraumStart { get; set; }
|
||||
public DateTime? DokuzeitraumEnde { get; set; }
|
||||
public int? AnzahlTagePlan { get; set; }
|
||||
public String StufeGeplant { get; set; }
|
||||
public decimal KorridorVon { get; set; }
|
||||
public decimal KorridorBis { get; set; }
|
||||
public DateTime? Unterbrechungszeitraum1Start { get; set; }
|
||||
public DateTime? Unterbrechungszeitraum1Ende { get; set; }
|
||||
public int? AnzahlTageUnterbrechung1 { get; set; }
|
||||
public DateTime? Unterbrechungszeitraum2Start { get; set; }
|
||||
public DateTime? Unterbrechungszeitraum2Ende { get; set; }
|
||||
public int? AnzahlTageUnterbrechung2 { get; set; }
|
||||
public DateTime? Unterbrechungszeitraum3Start { get; set; }
|
||||
public DateTime? Unterbrechungszeitraum3Ende { get; set; }
|
||||
public int? AnzahlTageUnterbrechung3 { get; set; }
|
||||
public int? SummeTageUnterbrechung { get; set; }
|
||||
|
||||
public DateTime AktuellesDatum { get; set; }
|
||||
public int? AnzahlTage { get; set; }
|
||||
|
||||
public decimal SummeDirekt { get; set; }
|
||||
public decimal SummeAbgesagt { get; set; }
|
||||
public decimal DurchschnittProWocheDirekt { get; set; }
|
||||
public decimal DurchschnittProWocheAbgesagt { get; set; }
|
||||
public decimal ProzentDirekt { get; set; }
|
||||
public decimal ProzentAbgesagt { get; set; }
|
||||
public decimal MinutenProWocheUnterStufe { get; set; }
|
||||
|
||||
public decimal MinutenProWocheBisEndeStufe { get; set; }
|
||||
public decimal MinutenProWocheUeberStufe { get; set; }
|
||||
public String StufeIst { get; set; }
|
||||
public decimal FehlstundenGesamt { get; set; }
|
||||
public String Hinweise { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
123
ReportImp/Fortis/ZeitdokumentationPlanIstUebersicht.resx
Normal file
123
ReportImp/Fortis/ZeitdokumentationPlanIstUebersicht.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>21, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -193,6 +193,12 @@
|
||||
<Compile Include="Zeitzuschlagsbeleg.Designer.cs">
|
||||
<DependentUpon>Zeitzuschlagsbeleg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZeitzuschlagsbelegAlt.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZeitzuschlagsbelegAlt.Designer.cs">
|
||||
<DependentUpon>ZeitzuschlagsbelegAlt.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="CustomerDataReport.resx">
|
||||
@@ -264,6 +270,9 @@
|
||||
<EmbeddedResource Include="Zeitzuschlagsbeleg.resx">
|
||||
<DependentUpon>Zeitzuschlagsbeleg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ZeitzuschlagsbelegAlt.resx">
|
||||
<DependentUpon>ZeitzuschlagsbelegAlt.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Data\Data.csproj">
|
||||
|
||||
1505
ReportImp/SeWo/Zeitzuschlagsbeleg.Designer.cs
generated
1505
ReportImp/SeWo/Zeitzuschlagsbeleg.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,8 @@ namespace BeWo.SeWo
|
||||
private Dictionary<int, double> samstag2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> sonntag2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> feiertag2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> nacht2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> nachtSchlaf2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> nachtWache2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> heiligSil2Minuten = new Dictionary<int, double>();
|
||||
|
||||
|
||||
@@ -91,8 +92,9 @@ namespace BeWo.SeWo
|
||||
{
|
||||
BerechneGesamtsumme(table1.Rows[1], samstag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[4], sonntag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[7], nacht2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[10], feiertag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[7], nachtSchlaf2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[9], nachtWache2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[11], feiertag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[13], heiligSil2Minuten);
|
||||
}
|
||||
|
||||
@@ -121,7 +123,7 @@ namespace BeWo.SeWo
|
||||
bool isHeaderRow = false;
|
||||
|
||||
int maxDays = 31;
|
||||
if (rowIdx == 1 || rowIdx == 4 || rowIdx == 7 || rowIdx == 10 || rowIdx == 13)
|
||||
if (rowIdx == 1 || rowIdx == 4 || rowIdx == 7 || rowIdx == 9 || rowIdx == 11 || rowIdx == 13)
|
||||
{
|
||||
isHeaderRow = true;
|
||||
int days = DateTime.DaysInMonth(monat.Year, monat.Month);
|
||||
@@ -172,11 +174,15 @@ namespace BeWo.SeWo
|
||||
|
||||
if (zs.MinutenFeiertag6_22 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenFeiertag6_22, datum, table1.Rows[10], feiertag2Minuten);
|
||||
AddValueToCell(zs.MinutenFeiertag6_22, datum, table1.Rows[11], feiertag2Minuten);
|
||||
}
|
||||
if (zs.MinutenNacht22_6 > 0)
|
||||
if (zs.MinutenNachtSchlaf22_6 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenNacht22_6, datum, table1.Rows[7], nacht2Minuten);
|
||||
AddValueToCell(zs.MinutenNachtSchlaf22_6, datum, table1.Rows[7], nachtSchlaf2Minuten);
|
||||
}
|
||||
if (zs.MinutenNachtwache22_6 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenNachtwache22_6, datum, table1.Rows[9], nachtWache2Minuten);
|
||||
}
|
||||
if (zs.MinutenSamstag13_22 > 0)
|
||||
{
|
||||
@@ -314,9 +320,9 @@ namespace BeWo.SeWo
|
||||
}
|
||||
|
||||
|
||||
public virtual Zeitverteilung BerechneZuschlag(ServiceRecord sr)
|
||||
public virtual Zeitverteilung2 BerechneZuschlag(ServiceRecord sr)
|
||||
{
|
||||
Zeitverteilung zv = new Zeitverteilung();
|
||||
Zeitverteilung2 zv = new Zeitverteilung2();
|
||||
|
||||
DateTime datum = sr.Start.Value;
|
||||
|
||||
@@ -352,8 +358,15 @@ namespace BeWo.SeWo
|
||||
{
|
||||
zv.MinutenSamstag13_22 = CheckUhrzeiten(datum, 13, 22, (double) duration);
|
||||
}
|
||||
|
||||
zv.MinutenNacht22_6 = CheckUhrzeiten(datum, nachtStart, 6, (double) duration);
|
||||
if (sr.ServiceDescription.ServiceCategory.Name == "Schlafbereitschaft")
|
||||
{
|
||||
zv.MinutenNachtSchlaf22_6 = CheckUhrzeiten(datum, nachtStart, 6, (double)duration);
|
||||
}
|
||||
else if (sr.ServiceDescription.ServiceCategory.Name == "Nachtwache")
|
||||
{
|
||||
zv.MinutenNachtwache22_6 = CheckUhrzeiten(datum, nachtStart, 6, (double)duration);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return zv;
|
||||
@@ -410,14 +423,15 @@ namespace BeWo.SeWo
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class Zeitverteilung
|
||||
public class Zeitverteilung2
|
||||
{
|
||||
public double MinutenSamstag13_22 { get; set; }
|
||||
public double MinutenSonntag6_22 { get; set; }
|
||||
public double MinutenNacht22_6 { get; set; }
|
||||
public double MinutenNachtSchlaf22_6 { get; set; }
|
||||
public double MinutenNachtwache22_6 { get; set; }
|
||||
public double MinutenFeiertag6_22 { get; set; }
|
||||
public double MinutenHeiligabendSilvester18_23 { get; set; }
|
||||
|
||||
|
||||
5729
ReportImp/SeWo/ZeitzuschlagsbelegAlt.Designer.cs
generated
Normal file
5729
ReportImp/SeWo/ZeitzuschlagsbelegAlt.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
425
ReportImp/SeWo/ZeitzuschlagsbelegAlt.cs
Normal file
425
ReportImp/SeWo/ZeitzuschlagsbelegAlt.cs
Normal file
@@ -0,0 +1,425 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared.Core;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Report;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using DevExpress.Charts.Native;
|
||||
|
||||
namespace BeWo.SeWo
|
||||
{
|
||||
public partial class ZeitzuschlagsbelegAlt : DevExpress.XtraReports.UI.XtraReport
|
||||
{
|
||||
private VacationService _vs = null;
|
||||
|
||||
private Dictionary<int, double> samstag2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> sonntag2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> feiertag2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> nacht2Minuten = new Dictionary<int, double>();
|
||||
private Dictionary<int, double> heiligSil2Minuten = new Dictionary<int, double>();
|
||||
|
||||
|
||||
public ZeitzuschlagsbelegAlt()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(DateTime monat, MitarbeiterstundenkontoRO.EmployeeDetail ed)
|
||||
{
|
||||
ed.FirstName = "";
|
||||
|
||||
if (ed.Custom9 > 0 || ed.Custom8 > 0)
|
||||
{
|
||||
ed.FirstName = String.Format("{0:0.##} / {1:0.##}", ed.Custom9, ed.Custom8);
|
||||
}
|
||||
|
||||
_vs = PluginLoader.FindClass<VacationService>();
|
||||
InitTable(monat);
|
||||
FillTableData(monat, ed);
|
||||
|
||||
lblZeitraum.Text = String.Format("{0:MMMM yyyy}", monat);
|
||||
|
||||
this.bindingSource1.DataSource = ed;
|
||||
}
|
||||
|
||||
private void FillTableData(DateTime monat, MitarbeiterstundenkontoRO.EmployeeDetail ed)
|
||||
{
|
||||
decimal kmTotal = 0;
|
||||
decimal rufTotal = 0;
|
||||
decimal notdienstTotal = 0;
|
||||
|
||||
if (ed.ServiceRecordsInSelectedTimeSpan != null)
|
||||
{
|
||||
foreach (var sr in ed.ServiceRecordsInSelectedTimeSpan)
|
||||
{
|
||||
if (sr.DistanceInMeter.HasValue)
|
||||
{
|
||||
kmTotal += sr.DistanceInMeter.Value;
|
||||
}
|
||||
|
||||
if (sr.ServiceDescription.ServiceCategory.Name == "SeWo Ruf")
|
||||
{
|
||||
rufTotal += GetDuration(sr);
|
||||
}
|
||||
else if (sr.ServiceDescription.ServiceCategory.Name == "SeWo Notdienst")
|
||||
{
|
||||
notdienstTotal += GetDuration(sr);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddValueToTable(sr);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BerechneGesamtsummen();
|
||||
lblGesamtKm.Text = String.Format("{0:0.00} km", kmTotal);
|
||||
lblRufGesamt.Text = String.Format("{0:0.00} Std.", rufTotal / 60);
|
||||
lblNotGesamt.Text = String.Format("{0:0.00} Std.", notdienstTotal / 60);
|
||||
}
|
||||
|
||||
private void BerechneGesamtsummen()
|
||||
{
|
||||
BerechneGesamtsumme(table1.Rows[1], samstag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[4], sonntag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[7], nacht2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[10], feiertag2Minuten);
|
||||
BerechneGesamtsumme(table1.Rows[13], heiligSil2Minuten);
|
||||
}
|
||||
|
||||
private void BerechneGesamtsumme(XRTableRow row, Dictionary<int, double> dict)
|
||||
{
|
||||
double gesamt = 0;
|
||||
for (int i = 1; i <= 31; i++)
|
||||
{
|
||||
if (dict.ContainsKey(i))
|
||||
{
|
||||
gesamt += dict[i];
|
||||
}
|
||||
}
|
||||
row.Cells[33].Text = String.Format("{0:0.00}", gesamt / 60);
|
||||
}
|
||||
|
||||
|
||||
private void InitTable(DateTime monat)
|
||||
{
|
||||
int rowIdx = 0;
|
||||
|
||||
foreach (XRTableRow row in table1.Rows)
|
||||
{
|
||||
if (rowIdx > 0)
|
||||
{
|
||||
bool isHeaderRow = false;
|
||||
|
||||
int maxDays = 31;
|
||||
if (rowIdx == 1 || rowIdx == 4 || rowIdx == 7 || rowIdx == 10 || rowIdx == 13)
|
||||
{
|
||||
isHeaderRow = true;
|
||||
int days = DateTime.DaysInMonth(monat.Year, monat.Month);
|
||||
|
||||
maxDays = days;
|
||||
}
|
||||
|
||||
int cellIdx = 0;
|
||||
foreach (XRTableCell cell in row.Cells)
|
||||
{
|
||||
|
||||
if (cellIdx > 1)
|
||||
{
|
||||
cell.Text = "";
|
||||
if (cellIdx <= 32)
|
||||
{
|
||||
cell.Font = new Font(cell.Font.FontFamily, 8, FontStyle.Regular);
|
||||
}
|
||||
|
||||
bool setBackground = false;
|
||||
|
||||
setBackground = !isHeaderRow || (maxDays < 31 && cellIdx > maxDays + 1 && cellIdx <= 32);
|
||||
|
||||
if (setBackground)
|
||||
{
|
||||
cell.BackColor = Color.LightGray;
|
||||
}
|
||||
}
|
||||
|
||||
cellIdx++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rowIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddValueToTable(ServiceRecord sr)
|
||||
{
|
||||
DateTime datum = sr.Start.Value;
|
||||
|
||||
if (datum.Second == 0)
|
||||
{
|
||||
var zs = BerechneZuschlag(sr);
|
||||
|
||||
|
||||
|
||||
if (zs.MinutenFeiertag6_22 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenFeiertag6_22, datum, table1.Rows[10], feiertag2Minuten);
|
||||
}
|
||||
if (zs.MinutenNacht22_6 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenNacht22_6, datum, table1.Rows[7], nacht2Minuten);
|
||||
}
|
||||
if (zs.MinutenSamstag13_22 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenSamstag13_22, datum, table1.Rows[1], samstag2Minuten);
|
||||
}
|
||||
if (zs.MinutenSonntag6_22 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenSonntag6_22, datum, table1.Rows[4], sonntag2Minuten);
|
||||
}
|
||||
if (zs.MinutenHeiligabendSilvester18_23 > 0)
|
||||
{
|
||||
AddValueToCell(zs.MinutenHeiligabendSilvester18_23, datum, table1.Rows[13], heiligSil2Minuten);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddValueToCell(double minuten, DateTime datum, XRTableRow row, Dictionary<int, double> dict)
|
||||
{
|
||||
XRTableCell cell = row.Cells[datum.Day + 1];
|
||||
|
||||
if (!dict.ContainsKey(datum.Day))
|
||||
{
|
||||
dict[datum.Day] = 0;
|
||||
}
|
||||
|
||||
dict[datum.Day] += minuten;
|
||||
|
||||
cell.Text = String.Format("{0:0.00}", dict[datum.Day] / 60);
|
||||
|
||||
}
|
||||
|
||||
private decimal GetDuration(ServiceRecord sr)
|
||||
{
|
||||
decimal duration = 0;
|
||||
|
||||
if (sr.ServiceDescription.Name != "Pause" && !sr.ServiceDescription.ServiceCategory.Name.Contains("Rufbereitschaft"))
|
||||
{
|
||||
if (sr.ServiceDescription.ServiceCategory.Name == "Verwaltung" || sr.ServiceDescription.ServiceCategory.Name == "Organisation")
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sr.ServiceDescription.ServiceCategory.Name.Contains("Overhead"))
|
||||
{
|
||||
if (sr.ServiceDescription.Name != "Übergabe" && sr.ServiceDescription.Name != "Fahrtzeit")
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (sr.GroupRoundedDuration.HasValue)
|
||||
{
|
||||
duration = sr.GroupRoundedDuration.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = sr.RoundedDuration;
|
||||
}
|
||||
|
||||
if (IsKrankheitAbsenceServiceRecord(sr) || IsUrlaubAbsenceServiceRecord(sr))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (sr.ServiceDescription != null && sr.ServiceDescription.ServiceCategory != null)
|
||||
{
|
||||
var p = sr.ServiceDescription.ServiceCategory.ProzentStundenkonto ?? sr.ServiceDescription.ServiceCategory.ProzentAbrechnung;
|
||||
if (sr.ServiceDescription.ProzentStundenkonto.HasValue)
|
||||
{
|
||||
p = sr.ServiceDescription.ProzentStundenkonto.Value;
|
||||
}
|
||||
|
||||
if (p != 100 && p > 0)
|
||||
{
|
||||
duration *= (p / 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//if (sr.ServiceDescription.ServiceCategory.Name == "SeWo Ruf" || sr.ServiceDescription.ServiceCategory.Name == "SeWo Notdienst")
|
||||
//{
|
||||
// var p = sr.ServiceDescription.ServiceCategory.Percentage;
|
||||
// if (p != 100 && p > 0)
|
||||
// {
|
||||
// duration *= (p / 100);
|
||||
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// var p = sr.ServiceDescription.ServiceCategory.Percentage;
|
||||
// if (p != 100 && p > 0)
|
||||
// {
|
||||
// duration *= (p / 100);
|
||||
|
||||
// }
|
||||
//}
|
||||
//var p = sr.ServiceDescription.ServiceCategory.Percentage;
|
||||
//if (p != 100 && p > 0)
|
||||
//{
|
||||
// //duration *= (p / 100);
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
|
||||
return duration;
|
||||
}
|
||||
|
||||
private bool IsKrankheitAbsenceServiceRecord(ServiceRecord item)
|
||||
{
|
||||
if (item.ServiceDescription.Name.ToLower().Contains("krankheit"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (item.ServiceDescription.Name.ToLower().Contains("corona"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsUrlaubAbsenceServiceRecord(ServiceRecord item)
|
||||
{
|
||||
if (item.ServiceDescription.Name.ToLower().Contains("urlaub"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public virtual Zeitverteilung BerechneZuschlag(ServiceRecord sr)
|
||||
{
|
||||
Zeitverteilung zv = new Zeitverteilung();
|
||||
|
||||
DateTime datum = sr.Start.Value;
|
||||
|
||||
var duration = GetDuration(sr);
|
||||
int nachtStart = 22;
|
||||
|
||||
if (duration > 0)
|
||||
{
|
||||
if (datum.Month == 12 && (datum.Day == 24 || datum.Day == 31))
|
||||
{
|
||||
zv.MinutenHeiligabendSilvester18_23 = CheckUhrzeiten(datum, 18, 23, (double) duration);
|
||||
|
||||
if (sr.Start.Value.DayOfWeek == DayOfWeek.Saturday)
|
||||
{
|
||||
zv.MinutenSamstag13_22 = CheckUhrzeiten(datum, 13, 18, (double) duration);
|
||||
}
|
||||
else if (sr.Start.Value.DayOfWeek == DayOfWeek.Sunday)
|
||||
{
|
||||
zv.MinutenSonntag6_22 = CheckUhrzeiten(datum, 6, 18, (double) duration);
|
||||
}
|
||||
|
||||
nachtStart = 23;
|
||||
}
|
||||
else if (_vs.IstFeiertag(datum))
|
||||
{
|
||||
zv.MinutenFeiertag6_22 = CheckUhrzeiten(datum, 6, 22, (double) duration);
|
||||
}
|
||||
else if (sr.Start.Value.DayOfWeek == DayOfWeek.Sunday)
|
||||
{
|
||||
zv.MinutenSonntag6_22 = CheckUhrzeiten(datum, 6, 22, (double) duration);
|
||||
}
|
||||
else if (sr.Start.Value.DayOfWeek == DayOfWeek.Saturday)
|
||||
{
|
||||
zv.MinutenSamstag13_22 = CheckUhrzeiten(datum, 13, 22, (double) duration);
|
||||
}
|
||||
|
||||
zv.MinutenNacht22_6 = CheckUhrzeiten(datum, nachtStart, 6, (double) duration);
|
||||
}
|
||||
|
||||
return zv;
|
||||
}
|
||||
|
||||
private double CheckUhrzeiten(DateTime start, int startStunde, int endStunde, double minuten)
|
||||
{
|
||||
if (startStunde > endStunde) //Nachts
|
||||
{
|
||||
DateTime nachtStartDt = start.Date.AddHours(startStunde);
|
||||
DateTime nachtEndDt = start.Date.AddDays(1).AddHours(endStunde);
|
||||
|
||||
|
||||
DateTime dtEnd = start.AddMinutes(minuten);
|
||||
|
||||
double minutes = GetOverlappingMinutes(start, dtEnd, nachtStartDt, nachtEndDt);
|
||||
minutes += GetOverlappingMinutes(start, dtEnd, nachtStartDt.AddDays(-1), nachtEndDt.AddDays(-1));
|
||||
minutes += GetOverlappingMinutes(start, dtEnd, nachtStartDt.AddDays(1), nachtEndDt.AddDays(1));
|
||||
|
||||
return minutes;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime tagsStartDt = start.Date.AddHours(startStunde);
|
||||
DateTime tagsEndDt = start.Date.AddHours(endStunde);
|
||||
|
||||
|
||||
DateTime dtEnd = start.AddMinutes(minuten);
|
||||
|
||||
double minutes = GetOverlappingMinutes(start, dtEnd, tagsStartDt, tagsEndDt);
|
||||
|
||||
return minutes;
|
||||
}
|
||||
}
|
||||
|
||||
private double GetOverlappingMinutes(DateTime start, DateTime end, DateTime start2, DateTime end2)
|
||||
{
|
||||
if (end > start2 && start < end2)
|
||||
{
|
||||
DateTime dtStart = start;
|
||||
|
||||
if (dtStart < start2)
|
||||
dtStart = start2;
|
||||
|
||||
DateTime dtEnd = end;
|
||||
|
||||
if (dtEnd > end2)
|
||||
dtEnd = end2;
|
||||
TimeSpan ts = dtEnd.Subtract(dtStart);
|
||||
|
||||
return ts.TotalMinutes;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Zeitverteilung
|
||||
{
|
||||
public double MinutenSamstag13_22 { get; set; }
|
||||
public double MinutenSonntag6_22 { get; set; }
|
||||
public double MinutenNacht22_6 { get; set; }
|
||||
public double MinutenFeiertag6_22 { get; set; }
|
||||
public double MinutenHeiligabendSilvester18_23 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
123
ReportImp/SeWo/ZeitzuschlagsbelegAlt.resx
Normal file
123
ReportImp/SeWo/ZeitzuschlagsbelegAlt.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>21, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -31,11 +31,11 @@ namespace BeWo.Service.Plugins
|
||||
//t = "1076891970"; // Assistenza
|
||||
//t = "0216265667"; // LH Hannover
|
||||
//t = "1774789565"; // LH Essen
|
||||
t = "9342168675"; // ABC Betreuungen - jetzt Schubkraft
|
||||
//t = "9342168675"; // ABC Betreuungen - jetzt Schubkraft
|
||||
//t = "1193188501"; // Aids Hilfe Dortmund
|
||||
//t = "7860351957"; // SKF Alsdorf
|
||||
//t = "3311520228"; // Die Düne
|
||||
//t = "1352143437"; // Sewo
|
||||
t = "1352143437"; // Sewo
|
||||
//t = "7107514623"; // BeWo Neuss
|
||||
//t = "9098141768"; // Fib e.V. Marburg
|
||||
//t = "1505148718"; // VSD Hamm
|
||||
@@ -53,7 +53,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "7375324044"; // Diakonie KK Kleve
|
||||
//t = "1441747891"; // BeWo Mobil Köln
|
||||
//t = "5120047701"; // Trialog
|
||||
t = "3629696651"; // Soziale Dienste Niederrhein (SDN)
|
||||
//t = "3629696651"; // Soziale Dienste Niederrhein (SDN)
|
||||
//t = "9893557471"; // Caritas Frankfurt
|
||||
//t = "2918696314"; // Caritas Frankfurt 2
|
||||
//t = "6923790936"; // Integra e.V.
|
||||
@@ -70,7 +70,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "5351926758"; // Viva a Vida
|
||||
//t = "2215396183"; // Diakonie Remscheid Lennep
|
||||
//t = "5157599087"; // SHG Schwerte
|
||||
//t = "4526293996"; // Fortis
|
||||
t = "4526293996"; // Fortis
|
||||
//t = "3647969417"; // Caritas Bottrop
|
||||
//t = "3057313346"; // SSB Mainz
|
||||
//t = "6246287823"; // BeWo Alsdorf
|
||||
@@ -197,7 +197,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "9883255779"; // VKM Menden (mobil GmbH)
|
||||
//t = "9556218062"; // Diakonie Landshut
|
||||
//t = "2279593936"; // Diakonie Mülheim
|
||||
t = "3623837005"; // Betreuwo Wesel
|
||||
//t = "3623837005"; // Betreuwo Wesel
|
||||
//t = "8407321888"; // AWO Wesel
|
||||
//t = "8454426692"; // Mit-Menschen Wuppertal
|
||||
//t = "0629004412"; // BeWo-Colonia Basaran (Projekt
|
||||
@@ -371,7 +371,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "1143768898"; // Diakonisches Werk im Ev. Kirchenkreis Dinslaken - Soziotherapie
|
||||
//t = "8164797250"; // Diakonisches Werk im Ev. Kirchenkreis Dinslaken - Ambulante Jugendhilfe JUDI
|
||||
//t = "4431610343"; // B-B-C-Terwort GmbH
|
||||
t = "2235342307"; // Suchtkrankenhilfe Ostfriesland
|
||||
//t = "2235342307"; // Suchtkrankenhilfe Ostfriesland
|
||||
return t;
|
||||
#else
|
||||
if (MultitenancyOperationContextExt.Current != null)
|
||||
|
||||
@@ -1869,7 +1869,7 @@ namespace BS.Shared.Services
|
||||
|
||||
var crv = org.CostRatePeriods.GetCostRatePeriodForDate(CostRatePeriodType.MinutesIntervall, date);
|
||||
|
||||
if (crv.CostRateValue.HasValue)
|
||||
if (crv != null && crv.CostRateValue.HasValue)
|
||||
{
|
||||
minuteInterval = (int)crv.CostRateValue.Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user