diff --git a/ReportImp/VkmHamm/AbsenceReport.Designer.cs b/ReportImp/VkmHamm/AbsenceReport.Designer.cs
index 99c466cf3..ef2b16ad8 100644
--- a/ReportImp/VkmHamm/AbsenceReport.Designer.cs
+++ b/ReportImp/VkmHamm/AbsenceReport.Designer.cs
@@ -30,6 +30,7 @@ namespace VkmHamm
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
+ DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.lblReportInformation = new DevExpress.XtraReports.UI.XRLabel();
@@ -113,6 +114,7 @@ namespace VkmHamm
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
+ this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -135,7 +137,8 @@ namespace VkmHamm
//
// lblReportInformation
//
- this.lblReportInformation.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
+ this.lblReportInformation.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
+ new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.lblReportInformation.LocationFloat = new DevExpress.Utils.PointFloat(0F, 35.00001F);
this.lblReportInformation.Multiline = true;
this.lblReportInformation.Name = "lblReportInformation";
@@ -1027,6 +1030,7 @@ namespace VkmHamm
// PageFooter
//
this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
+ this.xrLabel2,
this.xrPageInfo2});
this.PageFooter.HeightF = 35.00001F;
this.PageFooter.Name = "PageFooter";
@@ -1034,12 +1038,12 @@ namespace VkmHamm
// xrPageInfo2
//
this.xrPageInfo2.Font = new DevExpress.Drawing.DXFont("Arial", 8F);
- this.xrPageInfo2.Format = "Seite {0} von {1}";
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(602.0002F, 17.00001F);
this.xrPageInfo2.Name = "xrPageInfo2";
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(497F, 18F);
this.xrPageInfo2.StylePriority.UseFont = false;
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
+ this.xrPageInfo2.TextFormatString = "Seite {0} von {1}";
//
// approvedText
//
@@ -1061,6 +1065,16 @@ namespace VkmHamm
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.AbsenceRO);
//
+ // xrLabel2
+ //
+ this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 8F);
+ this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 17.00001F);
+ this.xrLabel2.Multiline = true;
+ this.xrLabel2.Name = "xrLabel2";
+ this.xrLabel2.SizeF = new System.Drawing.SizeF(602.0002F, 18F);
+ this.xrLabel2.StylePriority.UseFont = false;
+ this.xrLabel2.Text = "* Stand des Resturlaubs ist der letzte Tag dieses Ausdrucks";
+ //
// AbsenceReport
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1078,11 +1092,13 @@ namespace VkmHamm
this.ruleNotApprovedAndExpiringNext8Months,
this.ruleNotApprovedAndExpiringNext4Months});
this.Landscape = true;
- this.Margins = new DevExpress.Drawing.DXMargins(30, 30, 50, 20);
+ this.Margins = new DevExpress.Drawing.DXMargins(30F, 30F, 50F, 20.4167F);
this.PageHeight = 827;
this.PageWidth = 1169;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
- this.Version = "17.1";
+ this.Version = "23.2";
+ xrWatermark1.Id = "Watermark1";
+ this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
@@ -1175,5 +1191,6 @@ namespace VkmHamm
private DevExpress.XtraReports.UI.XRTableCell cellDetail29;
private DevExpress.XtraReports.UI.XRTableCell cellDetail30;
private DevExpress.XtraReports.UI.XRTableCell cellDetail31;
+ private DevExpress.XtraReports.UI.XRLabel xrLabel2;
}
}
diff --git a/ReportImp/VkmHamm/AbsenceReport.resx b/ReportImp/VkmHamm/AbsenceReport.resx
index d25f3eba2..d58980a38 100644
--- a/ReportImp/VkmHamm/AbsenceReport.resx
+++ b/ReportImp/VkmHamm/AbsenceReport.resx
@@ -117,7 +117,4 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
\ No newline at end of file
diff --git a/ReportImp/VkmHamm/Reports/VkmHammReportCreator.cs b/ReportImp/VkmHamm/Reports/VkmHammReportCreator.cs
index a896e001d..d8de40994 100644
--- a/ReportImp/VkmHamm/Reports/VkmHammReportCreator.cs
+++ b/ReportImp/VkmHamm/Reports/VkmHammReportCreator.cs
@@ -9,11 +9,13 @@ using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
+using BeWo.Service.Plugins;
using BeWo.Service.ServiceImplementations;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
+using BS.Shared.Extensions;
using DevExpress.XtraReports.UI;
namespace VkmHamm
@@ -80,8 +82,13 @@ namespace VkmHamm
List empsOhnePersonalnummer = new List();
var employees = service.GetAbsenceOverview(filter).OrderBy(e => e.PersonnelNumber).ToList();
+ // Alle Mitarbeiter mit ihrer Personalnummer in ein Dictionary packen, da diese ein string ist und sonst ohne
+ // Umwandlung in einen int nicht sortiert werden kann
foreach (var e in employees)
{
+ // Personalnummer vor den Nachnamen schreiben, damit sie mit angezeigt wird
+ e.LastName = e.PersonnelNumber.IsNotNullOrEmpty() ? e.PersonnelNumber + " " + e.LastName : e.LastName;
+
int personalnummer = 0;
if (int.TryParse(e.PersonnelNumber, out personalnummer))
{
@@ -103,6 +110,38 @@ namespace VkmHamm
employees.AddRange(personalnummer2employee.Values.ToList());
employees.AddRange(empsOhnePersonalnummer);
+ // Resturlaub mit anzeigen
+ foreach (var emp in employees)
+ {
+ var vs = PluginLoader.FindClass();
+ // Darstellungsvariante, da das normale Urlaubskonto nur den Resturlaubsstand vom Ende des Jahres anzeigt.
+ var konto = vs.BerechneUrlaubskontoZurDarstellung(emp, dt.Year, dt.AddMonths(1).AddTicks(-1));
+ if (konto != null && konto.Count > 0)
+ {
+ var alleVertraglichenBudgets = konto
+ .Where(k => k.DatumZurSortierung == null && (k.Erlaeuterung.Contains("Urlaubstage laut Vertrag") || k.Erlaeuterung.Contains("Sonderurlaub")))
+ .ToList();
+
+ var resturlaub = alleVertraglichenBudgets.Sum(b => Convert.ToDecimal(b.AnzahlTage));
+
+ // Jeder Entry enthält den Zeitraum und die abzuziehenden Tage vom Gesamtbudget.
+ foreach (var entry in konto)
+ {
+ // Hat entry kein Datum, dann ist es nur eine Überschrift in der Darstellung und hat hier keinen Nutzen
+ if (entry.DatumZurSortierung != null || entry.Erlaeuterung.Contains("Resturlaub aus"))
+ {
+ // Ist das Datum nach dem Enddatum des Stundenkontos braucht nicht weitergerechnet werden
+ if (entry.DatumZurSortierung > dt.AddMonths(1).AddTicks(-1))
+ break;
+
+ resturlaub += Convert.ToDecimal(entry.AnzahlTage); // += weil Tage immer als Minus dargestellt sind
+ }
+ }
+
+ emp.FirstName += string.Format(" ({0:0.00})", resturlaub);
+ }
+ }
+
report.SetReportDataSource(AbsenceRO.Create(employees, filter, compactTeams, feiertage));
// Anpassung Ende