From db0017a5b3160ea6c0db79c180df849826d41fda Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 24 May 2024 11:40:53 +0200 Subject: [PATCH] Bugfix im InvoiceItemVM + Hildmann/Kloss --- .../SupportConceptGoalRatingView.xaml.cs | 12 ++++--- BeWo/ViewModel/InvoiceBaseVM.cs | 2 ++ .../EmployeeKilometerauswertungsListRO.cs | 2 ++ .../EmployeeKilometerauswertungsRO.cs | 2 ++ ReportImp/AkggMid/AkggMid.csproj | 2 ++ ...CustomMitarbeiterstundenkontoBerechnung.cs | 11 ++++++ .../AkggMid/Service/CustomCustomerService.cs | 23 ++++++++++++ .../AkggMid/Service/CustomEmployeeService.cs | 18 ++++++++++ .../MitarbeiterstundenkontoJahr.designer.cs | 36 ++++++++++--------- .../AlphaEv/MitarbeiterstundenkontoJahr.resx | 5 +-- .../EmployeeKilometerauswertungsListReport.cs | 2 ++ .../EmployeeKilometerauswertungsReport.cs | 2 ++ ...CustomMitarbeiterstundenkontoBerechnung.cs | 7 ++-- 13 files changed, 97 insertions(+), 27 deletions(-) create mode 100644 ReportImp/AkggMid/Service/CustomCustomerService.cs create mode 100644 ReportImp/AkggMid/Service/CustomEmployeeService.cs diff --git a/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs index cba8b7ce4..9f0e28f44 100644 --- a/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs +++ b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs @@ -598,13 +598,14 @@ namespace BeWo.View.Detail { long c2sOid = 0; - if (SupportConcept != null && SupportConcept.CostBearerRelations != null) + if (SupportConcept != null && SupportConcept.CostBearerRelations != null && SupportConcept.CostBearerRelations.VMList.Count > 0) { c2sOid = SupportConcept.CostBearerRelations.VMList[0].DataContract.CostBearer2SupportConceptOid.Value; } if (c2sOid == 0) { + CreateStatisticInfos(null); return; } @@ -829,12 +830,13 @@ namespace BeWo.View.Detail private void CreateStatisticInfos(ServiceRecordStatisticsInfoDC info) { + StatisticInfoGrid.Children.Clear(); + StatisticInfoGrid.ColumnDefinitions.Clear(); + StatisticInfoGrid.RowDefinitions.Clear(); + if (info != null) { - StatisticInfoGrid.Children.Clear(); - StatisticInfoGrid.ColumnDefinitions.Clear(); - StatisticInfoGrid.RowDefinitions.Clear(); - + if (info.Header != null) { StatisticInfoGrid.ColumnDefinitions.Add(new ColumnDefinition diff --git a/BeWo/ViewModel/InvoiceBaseVM.cs b/BeWo/ViewModel/InvoiceBaseVM.cs index 09aa5dd95..994700504 100644 --- a/BeWo/ViewModel/InvoiceBaseVM.cs +++ b/BeWo/ViewModel/InvoiceBaseVM.cs @@ -186,6 +186,8 @@ namespace BeWo.ViewModel #region Constructors and Destructors + public InvoiceBaseVM(InvoiceBaseDC pDC) : this(pDC, false) { } + public InvoiceBaseVM(InvoiceBaseDC pDC, bool isChecked = false) : base(pDC, pDC.InvoiceBaseOid == null) { diff --git a/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs b/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs index 65484212f..ea3c63f1c 100644 --- a/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs +++ b/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs @@ -97,6 +97,8 @@ namespace BeWo.Report.ReportObjects Entries.Add(e); } + + Entries = Entries.OrderBy(o => o.Datum).ToList(); } } } diff --git a/Report/ReportObjects/EmployeeKilometerauswertungsRO.cs b/Report/ReportObjects/EmployeeKilometerauswertungsRO.cs index 7e5222f8a..4226e52d3 100644 --- a/Report/ReportObjects/EmployeeKilometerauswertungsRO.cs +++ b/Report/ReportObjects/EmployeeKilometerauswertungsRO.cs @@ -75,6 +75,8 @@ namespace BeWo.Report.ReportObjects Entries.Add(e); } + + Entries = Entries.OrderBy(o => o.Datum).ToList(); } } } diff --git a/ReportImp/AkggMid/AkggMid.csproj b/ReportImp/AkggMid/AkggMid.csproj index 7757905c4..5f9f7df70 100644 --- a/ReportImp/AkggMid/AkggMid.csproj +++ b/ReportImp/AkggMid/AkggMid.csproj @@ -152,8 +152,10 @@ + + Component diff --git a/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs index 7211751c0..c311060e5 100644 --- a/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/AkggMid/CustomMitarbeiterstundenkontoBerechnung.cs @@ -111,6 +111,15 @@ namespace AkggMid { foreach (var vv in ed.Employee.VarFieldValueList) { + var c = ed.Employee.GetValidContractForDate(datum); + if (c != null) + { + if (c.ProbationPeriod2.HasValue && c.ProbationPeriod2.Value > 0) + { + return c.ProbationPeriod2.Value / 5; + } + } + if (vv.VarFieldDefOid == 2) { var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName)); @@ -125,6 +134,8 @@ namespace AkggMid } } } + + } return base.GetSollStundenForAbsenceTime(ed, at, datum); diff --git a/ReportImp/AkggMid/Service/CustomCustomerService.cs b/ReportImp/AkggMid/Service/CustomCustomerService.cs new file mode 100644 index 000000000..6348ca46b --- /dev/null +++ b/ReportImp/AkggMid/Service/CustomCustomerService.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using BS.Shared.DataContracts.Compact; + +namespace AkggMid.Service +{ + public class CustomCustomerService : CustomerService + { + // public override List GetAllActiveSupportConceptCostbearer(bool onlyApproved, bool onlyWithAssignedCostbearer, long employeeOid) + //{ + // var liste = base.GetAllActiveSupportConceptCostbearer(onlyApproved, onlyWithAssignedCostbearer, employeeOid); + + // return liste.Where(a => a.CustomerFullName.StartsWith("A")).ToList(); + // } + + } +} \ No newline at end of file diff --git a/ReportImp/AkggMid/Service/CustomEmployeeService.cs b/ReportImp/AkggMid/Service/CustomEmployeeService.cs new file mode 100644 index 000000000..ef8656a66 --- /dev/null +++ b/ReportImp/AkggMid/Service/CustomEmployeeService.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using BeWo.Data; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using BS.Shared; +using BS.Shared.DataContracts.Compact; +using DevExpress.Data.Browsing; + +namespace AkggMid.Service +{ + public class CustomEmployeeService : EmployeeService + { + + + } +} \ No newline at end of file diff --git a/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.designer.cs b/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.designer.cs index bfd2561b3..444e7a890 100644 --- a/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.designer.cs +++ b/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.designer.cs @@ -135,6 +135,7 @@ namespace AlphaEv this.xrLabel20 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel19 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.pageFooterBand1 = new DevExpress.XtraReports.UI.PageFooterBand(); this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); @@ -152,7 +153,6 @@ namespace AlphaEv this.fieldKalkInd = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldSaldoKalkAz = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldTatIndZeit = new DevExpress.XtraReports.UI.CalculatedField(); - 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.xrTable1)).BeginInit(); @@ -668,7 +668,8 @@ namespace AlphaEv // // xrTable1 // - this.xrTable1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTable1.Font = new DevExpress.Drawing.DXFont("Microsoft Sans Serif", 8F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.xrTable1.Name = "xrTable1"; this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -1054,7 +1055,8 @@ namespace AlphaEv // // lblMonat // - this.lblMonat.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblMonat.Font = new DevExpress.Drawing.DXFont("Microsoft Sans Serif", 12F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.lblMonat.Multiline = true; this.lblMonat.Name = "lblMonat"; @@ -1093,7 +1095,8 @@ namespace AlphaEv // // xrLabel13 // - this.xrLabel13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrLabel13.Font = new DevExpress.Drawing.DXFont("Microsoft Sans Serif", 8F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))), DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10F); this.xrLabel13.Multiline = true; this.xrLabel13.Name = "xrLabel13"; @@ -1101,6 +1104,10 @@ namespace AlphaEv this.xrLabel13.StylePriority.UseFont = false; this.xrLabel13.Text = "Legende:"; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoMonateRO); + // // pageFooterBand1 // this.pageFooterBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { @@ -1110,7 +1117,7 @@ namespace AlphaEv // // xrPageInfo1 // - this.xrPageInfo1.Font = new System.Drawing.Font("Arial", 8F); + this.xrPageInfo1.Font = new DevExpress.Drawing.DXFont("Arial", 8F); this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F); this.xrPageInfo1.Name = "xrPageInfo1"; this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; @@ -1124,7 +1131,7 @@ namespace AlphaEv this.Title.BorderColor = System.Drawing.SystemColors.ControlText; this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; this.Title.BorderWidth = 1F; - this.Title.Font = new System.Drawing.Font("Times New Roman", 24F); + this.Title.Font = new DevExpress.Drawing.DXFont("Times New Roman", 24F); this.Title.ForeColor = System.Drawing.Color.Black; this.Title.Name = "Title"; // @@ -1134,7 +1141,7 @@ namespace AlphaEv this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText; this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None; this.FieldCaption.BorderWidth = 1F; - this.FieldCaption.Font = new System.Drawing.Font("Times New Roman", 10F, System.Drawing.FontStyle.Bold); + this.FieldCaption.Font = new DevExpress.Drawing.DXFont("Times New Roman", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.FieldCaption.ForeColor = System.Drawing.Color.Black; this.FieldCaption.Name = "FieldCaption"; // @@ -1144,7 +1151,7 @@ namespace AlphaEv this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText; this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None; this.PageInfo.BorderWidth = 1F; - this.PageInfo.Font = new System.Drawing.Font("Times New Roman", 8F); + this.PageInfo.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F); this.PageInfo.ForeColor = System.Drawing.Color.Black; this.PageInfo.Name = "PageInfo"; // @@ -1154,7 +1161,7 @@ namespace AlphaEv this.DataField.BorderColor = System.Drawing.SystemColors.ControlText; this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None; this.DataField.BorderWidth = 1F; - this.DataField.Font = new System.Drawing.Font("Times New Roman", 8F); + this.DataField.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F); this.DataField.ForeColor = System.Drawing.SystemColors.ControlText; this.DataField.Name = "DataField"; // @@ -1229,10 +1236,6 @@ namespace AlphaEv this.fieldTatIndZeit.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldTatIndZeit.Name = "fieldTatIndZeit"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoMonateRO); - // // MitarbeiterstundenkontoJahr // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -1252,9 +1255,10 @@ namespace AlphaEv this.fieldSaldoKalkAz, this.fieldTatIndZeit}); this.DataSource = this.bindingSource1; - this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Font = new DevExpress.Drawing.DXFont("Microsoft Sans Serif", 8F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.Landscape = true; - this.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 31); + this.Margins = new DevExpress.Drawing.DXMargins(50F, 50F, 50F, 31F); this.PageHeight = 1276; this.PageWidth = 1500; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Custom; @@ -1263,7 +1267,7 @@ namespace AlphaEv this.FieldCaption, this.PageInfo, this.DataField}); - this.Version = "17.1"; + this.Version = "23.2"; ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); diff --git a/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.resx b/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.resx index 447b81a57..729537b4b 100644 --- a/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.resx +++ b/ReportImp/AlphaEv/MitarbeiterstundenkontoJahr.resx @@ -144,14 +144,11 @@ FLS Fallverantwortlicher FLS in Vertretung FLS gesamt aus Fallverantwortung und Vertretung kalkulierte indirekte Zeiten -FLS Quote aus Sollarbeitszeit und FLS Gesamt +FLS-Quote aus Arbeitszeit-Erfassung und FLS gesamt kalkulierte Arbeitszeit aus FLS Gesamt + kalkulierte indirekte Zeiten Saldo kalk. Arbeitszeit Vormonat + kalk. Arbeitszeit lfdm. Monat - Soll Arbeitszeit Arbeitszeiterfassungsstunden tatsächliche indirekte Zeiten (Arbeitszeiterfassung - FLS Gesamt) Saldo Arbeitszeit Vormonat (im Januar + Übertrag aus Vorjahr) + Zeiterfassung lfd. Monat - Soll Arbeitszeit lfd. Monat - - 17, 17 - \ No newline at end of file diff --git a/ReportImp/SHKService/EmployeeKilometerauswertungsListReport.cs b/ReportImp/SHKService/EmployeeKilometerauswertungsListReport.cs index 8f7bbd991..7974f86bf 100644 --- a/ReportImp/SHKService/EmployeeKilometerauswertungsListReport.cs +++ b/ReportImp/SHKService/EmployeeKilometerauswertungsListReport.cs @@ -1,5 +1,6 @@ using BeWo.Report; using BeWo.Report.ReportObjects; +using System.Linq; namespace SHKService { @@ -15,6 +16,7 @@ namespace SHKService foreach (var e2e in pRO.Employees2Entries) { double kmEigene = 0; + e2e.Entries = e2e.Entries.OrderBy(o => o.Datum).ToList(); foreach (var e in e2e.Entries) { if (!string.IsNullOrWhiteSpace(e.Notice2)) diff --git a/ReportImp/SHKService/EmployeeKilometerauswertungsReport.cs b/ReportImp/SHKService/EmployeeKilometerauswertungsReport.cs index 8d2a10487..68bc4cc68 100644 --- a/ReportImp/SHKService/EmployeeKilometerauswertungsReport.cs +++ b/ReportImp/SHKService/EmployeeKilometerauswertungsReport.cs @@ -1,5 +1,6 @@ using BeWo.Report; using BeWo.Report.ReportObjects; +using System.Linq; namespace SHKService { @@ -15,6 +16,7 @@ namespace SHKService pRO.CreateDistanceList(); double kmEigene = 0; + pRO.Entries = pRO.Entries.OrderBy(o => o.Datum).ToList(); foreach (var e in pRO.Entries) { if (!string.IsNullOrWhiteSpace(e.Notice2)) diff --git a/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs index 485749d5e..179a7d4e9 100644 --- a/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs @@ -110,9 +110,12 @@ namespace SHKServiceSBD } foreach (var e2c in empDetail.Employee.Employee2CustomerList) { - var kind = e2c.Customer; + if ((!e2c.StartDate.HasValue || e2c.StartDate.Value < berichtsEnde) && (!e2c.EndDate.HasValue || e2c.EndDate.Value >= berichtsAnfang)) + { + var kind = e2c.Customer; - BerechneSollZeitenDictionary(kind.Arbeitszeiten, empDetail, ersterVertragsStart, letzerVertragsEnde); + BerechneSollZeitenDictionary(kind.Arbeitszeiten, empDetail, ersterVertragsStart, letzerVertragsEnde); + } } }