From 82a52b530355cc1080c53144aa411adbaa92c273 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 7 Aug 2024 16:26:43 +0200 Subject: [PATCH] Bugfix Mok: Auslesen der anzuzeigenden Leistungskategorien, Erweiterung des Standard Arbeitszeitkontos um die Spalte "Sonstige Abw." 2-Faktor Authentifizierung fertiggestellt --- BeWo/BeWoApp.xaml.cs | 2 +- .../BeWoDatabaseTerminator/Program.cs | 71 +++++--- BeWoPlanerMobil/Controllers/MainController.cs | 4 +- Data/Access/SearchDAO.cs | 15 +- Model/Changes_alle_fuer_neue_db.txt | 4 + .../Mitarbeiterarbeitszeitkonto.cs | 11 +- .../Mitarbeiterarbeitszeitkonto.designer.cs | 171 ++++++++++++------ .../Mitarbeiterarbeitszeitkonto.resx | 3 - ...dChangesAfterInvoiceDateReport.Designer.cs | 103 +++++++++-- .../MitarbeiterstundenkontoBerechnung.cs | 4 + .../MitarbeiterstundenkontoRO.cs | 2 + .../ServiceRecordChangesAfterInvoiceDateRO.cs | 56 +++++- ReportImp/FizHof/Properties/licenses.licx | 1 + .../FizHof/Service/CustomVacationService.cs | 6 +- Service/OwnChat/OwnChatHelper.cs | 14 +- Service/Plugins/CustomerService.cs | 34 ++-- Service/Plugins/PluginLoader.cs | 4 +- .../ServiceImplementations/UserServiceImp.cs | 25 ++- 18 files changed, 390 insertions(+), 140 deletions(-) diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 3df3b4cfb..f498cd3c9 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -647,7 +647,7 @@ namespace BeWo String url = ""; #if DEBUG url = String.Format("http://localhost:3777/Host"); - //return new Uri("https://app4.bewoplaner.de/service"); + //return new Uri("https://app5.bewoplaner.de/service"); //url = String.Format("app1.bewoplaner.de/service"); #endif diff --git a/BeWoDatabaseTerminator/BeWoDatabaseTerminator/Program.cs b/BeWoDatabaseTerminator/BeWoDatabaseTerminator/Program.cs index 0ea3b7a7c..feceb11f7 100644 --- a/BeWoDatabaseTerminator/BeWoDatabaseTerminator/Program.cs +++ b/BeWoDatabaseTerminator/BeWoDatabaseTerminator/Program.cs @@ -143,7 +143,7 @@ namespace BeWoDatabaseTerminator FileUtils.WriteLog($"Es wurde{(statusCount > 1 ? "n" : string.Empty)} {(statusCount > 1 ? statusCount.ToString() : statusCount == 0 ? "kein" : "ein")} ContractStat{(statusCount > 1 ? "i" : "us")} gefunden.", _LogFilePath); - foreach(var contractStatusKeyValuePair in contractStatusCollection.ContractStatuses) + foreach (var contractStatusKeyValuePair in contractStatusCollection.ContractStatuses) { var contractStatus = contractStatusKeyValuePair.Value; @@ -165,16 +165,16 @@ namespace BeWoDatabaseTerminator if(contractStatus.Deactivate == 1) { FileUtils.WriteLog($"Deaktiviere Datenbank `{contractStatus.Tenant}`.", _LogFilePath); - //ToggleConfigActivation(contractStatus, false); - //ToggleBackupConfigActivation(contractStatus, false); + ToggleConfigActivation(contractStatus, false); + ToggleBackupConfigActivation(contractStatus, false); } if(contractStatus.Delete == 1) { - FileUtils.WriteLog($"Lösche Datenbank `{contractStatus.Tenant}`. Das Löschen ist zur Zeit deaktiviert. Config-Datei und Datenbank werden nicht gelöscht!", _LogFilePath); - //DeleteDatabase(contractStatus.Tenant); + FileUtils.WriteLog($"Lösche Datenbank `{contractStatus.Tenant}`.", _LogFilePath); + DeleteDatabase(contractStatus); } } } @@ -316,16 +316,28 @@ namespace BeWoDatabaseTerminator /// Kundennummer, die gleichzeitig auch der Name der Datenbank ist. private static void DeleteDatabase(ContractStatus contractStatus) { - var configFile = Path.Combine(_MultitenancyPath, $"{contractStatus.Tenant}.config.deactivated"); - - if(File.Exists(configFile)) + var configFile = Path.Combine(_MultitenancyPath, $"{contractStatus.Tenant}.config"); + var deactivatedFile = Path.Combine(_MultitenancyPath, $"{contractStatus.Tenant}.config.deactivated"); + if (!File.Exists(deactivatedFile) && File.Exists(configFile)) { - var connectionString = ExtractConnectionString(configFile); + ToggleConfigActivation(contractStatus, false); + ToggleBackupConfigActivation(contractStatus, false); + } + if (File.Exists(deactivatedFile)) + { + var deleteFile = Path.Combine(_MultitenancyPath, $"{contractStatus.Tenant}.config.deleted"); + if (!File.Exists(deleteFile)) + { + File.Move(deactivatedFile, deleteFile); + } + + + var connectionString = ExtractConnectionString(deleteFile); var mySqlHelper = new MySqlHelper(connectionString); mySqlHelper.DeleteDatabase(contractStatus.Tenant); - File.Delete(configFile); + //File.Delete(deactivatedFile); FileUtils.WriteLog($"Datenbank `{contractStatus.Tenant}` und {contractStatus.Tenant}.config.deactivated wurden gelöscht.", _LogFilePath); @@ -333,7 +345,7 @@ namespace BeWoDatabaseTerminator } else { - LogUtils.LogMessage($"Die Config-Datei für Datenbank `{contractStatus.Tenant}` existiert nicht.", ConsoleColor.Red, ConsoleColor.Black); + LogUtils.LogMessage($"Die Config-Datei (*.config.deactivated) für Datenbank `{contractStatus.Tenant}` existiert nicht.", ConsoleColor.Red, ConsoleColor.Black); FileUtils.WriteLog($"{contractStatus.Tenant}.config nicht gefunden. Datenbank `{contractStatus.Tenant}`, falls vorhanden, nicht gelöscht.", _LogFilePath); } } @@ -374,26 +386,29 @@ namespace BeWoDatabaseTerminator private static void ToggleBackupConfigActivation(ContractStatus contractStatus, bool isToBeActivated) { - var fileName1 = isToBeActivated ? $"{contractStatus.Tenant}.db2mail.deactivated" : $"{contractStatus.Tenant}.db2mail"; - var fileName2 = isToBeActivated ? $"{contractStatus.Tenant}.db2mail" : $"{contractStatus.Tenant}.db2mail.deactivated"; - - var path1 = Path.Combine(_BackupConfigFolderPath, fileName1); - var path2 = Path.Combine(_BackupConfigFolderPath, fileName2); - - if (File.Exists(path1) && !File.Exists(path2)) + if (!String.IsNullOrEmpty(_BackupConfigFolderPath)) { - File.Move(path1, path2); - if (File.Exists(path1)) + var fileName1 = isToBeActivated ? $"{contractStatus.Tenant}.db2mail.deactivated" : $"{contractStatus.Tenant}.db2mail"; + var fileName2 = isToBeActivated ? $"{contractStatus.Tenant}.db2mail" : $"{contractStatus.Tenant}.db2mail.deactivated"; + + var path1 = Path.Combine(_BackupConfigFolderPath, fileName1); + var path2 = Path.Combine(_BackupConfigFolderPath, fileName2); + + if (File.Exists(path1) && !File.Exists(path2)) { - File.Delete(path1); + File.Move(path1, path2); + if (File.Exists(path1)) + { + File.Delete(path1); + } + + FileUtils.WriteLog($"{contractStatus.Tenant}.db2mail {(isToBeActivated == false ? "de" : string.Empty)}aktiviert.", _LogFilePath); + } + else + { + FileUtils.WriteLog($"Fehler beim {(isToBeActivated == false ? "Dea" : "A")}ktivieren: {fileName1} existiert nicht oder {fileName2} existiert.", _LogFilePath); } - - FileUtils.WriteLog($"{contractStatus.Tenant}.db2mail {(isToBeActivated == false ? "de" : string.Empty)}aktiviert.", _LogFilePath); - } - else - { - FileUtils.WriteLog($"Fehler beim {(isToBeActivated == false ? "Dea" : "A")}ktivieren: {fileName1} existiert nicht oder {fileName2} existiert.", _LogFilePath); } } @@ -573,7 +588,7 @@ namespace BeWoDatabaseTerminator t = "2"; } var uri = new Uri($"https://support.bewoplaner.de/api/dbstate.php?APIKEY1={APIKEY}&LicenseTypeID={contractStatus.LicenseTypeId}&CustomerID={contractStatus.Tenant}&Type={t}"); - + var request = (HttpWebRequest)WebRequest.Create(uri); diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index d4ea871ac..e7a071d11 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -1782,7 +1782,7 @@ namespace BeWoPlanerMobil.Controllers allServiceDescriptions.AsParallel().DoForEach(serviceDescription => { - if(serviceDescription.Category.OhneHilfeplan.HasValue && (serviceDescription.Category.OhneHilfeplan == AccountingvisibilityType.Beides || serviceDescription.Category.OhneHilfeplan == AccountingvisibilityType.NichtKlientenbezogen)) + if(serviceDescription.Category.ActivationType == ActivationTypeId.Active && (!serviceDescription.Category.OhneHilfeplan.HasValue || serviceDescription.Category.OhneHilfeplan == AccountingvisibilityType.Beides || serviceDescription.Category.OhneHilfeplan == AccountingvisibilityType.NichtKlientenbezogen)) { Model.Categories2Descriptions.AddOrUpdateValueInDictionary(serviceDescription.Category, serviceDescription); } @@ -1877,7 +1877,7 @@ namespace BeWoPlanerMobil.Controllers if(firstNode.ServiceAccountings.Count == 0 || result.Count == 0) { - var allServiceDescriptions = OperationsService.GetAllServiceDescriptions().Where(sd => sd.Category.OhneHilfeplan != AccountingvisibilityType.NichtKlientenbezogen).ToList(); + var allServiceDescriptions = OperationsService.GetAllServiceDescriptions().Where(sd => sd.Category.ActivationType == ActivationTypeId.Active && sd.Category.OhneHilfeplan != AccountingvisibilityType.NichtKlientenbezogen).ToList(); foreach(var serviceDescription in allServiceDescriptions) { diff --git a/Data/Access/SearchDAO.cs b/Data/Access/SearchDAO.cs index f7fa51475..6250e8f13 100644 --- a/Data/Access/SearchDAO.cs +++ b/Data/Access/SearchDAO.cs @@ -504,6 +504,14 @@ namespace BeWo.Data.Access return lCriteria.List(); } + public TwoFactorCode GetLastTwoFactorCode(string loginName, string bCryptPassword) + { + return CreateCriteriaIsActive() + .Add(Expression.Eq("LoginName", loginName)) + .Add(Expression.Eq("Password", bCryptPassword)) + .AddOrder(new Order("Oid", false)).List().FirstOrDefault(); + } + public IEnumerable FindCurrentSupportConcepts() { return CreateCriteriaIsActive() @@ -4645,6 +4653,11 @@ namespace BeWo.Data.Access public IList FindCustomerOid2Persons(IList personOids) { + if (personOids == null || personOids.Count == 0) + { + return null; + } + String oidList = ""; foreach (var oid in personOids) { @@ -4654,7 +4667,7 @@ namespace BeWo.Data.Access } oidList += String.Format("{0}", oid); } - + return GetSqlResult("SELECT oid,personoid,customeroid,istfamilie FROM customer2person where personoid in (" + oidList + ")"); } diff --git a/Model/Changes_alle_fuer_neue_db.txt b/Model/Changes_alle_fuer_neue_db.txt index 6aef8416c..436cb2bb8 100644 --- a/Model/Changes_alle_fuer_neue_db.txt +++ b/Model/Changes_alle_fuer_neue_db.txt @@ -1070,3 +1070,7 @@ CREATE TABLE `twofactorcode` ( UsedDate DATETIME DEFAULT NULL ) ENGINE=InnoDB; +ALTER TABLE `servicerecordhistory` +ADD INDEX `cb2scIdx` (`CostBearer2SupportConceptOid` ASC); + + diff --git a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.cs b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.cs index 08a6969ae..53802d8c3 100644 --- a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.cs +++ b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.cs @@ -42,8 +42,15 @@ namespace BeWo.Report.DefaultReports ed.UrlaubUndKrankheit = 0; foreach (var day in ed.Days) { - ed.UrlaubUndKrankheit += (day.HoursSick + day.HoursInVacation); - } + if (day.HoursOtherAbsenceTimes > 0) + { + //CB: In der Standard Berechnungsklasse wurden die anderen Abwesenheiten auch auf die MinutesTotal addiert, daher hier wieder abziehen + //Ich traue mich nicht, das in der Berechnungsklasse zu ändern, weil es dann bestimmt wieder zu Fehlern in angepassten Konten führt. + day.MinutesTotal -= day.HoursOtherAbsenceTimes * 60; + } + + ed.UrlaubUndKrankheit += (day.HoursSick + day.HoursInVacation + day.HoursOtherAbsenceTimes); + } } this.bindingSource1.DataSource = pRO; diff --git a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs index 6c628e626..6a798b981 100644 --- a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs +++ b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs @@ -34,6 +34,8 @@ namespace BeWo.Report.DefaultReports DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary(); DevExpress.XtraReports.UI.XRSummary xrSummary3 = new DevExpress.XtraReports.UI.XRSummary(); DevExpress.XtraReports.UI.XRSummary xrSummary4 = new DevExpress.XtraReports.UI.XRSummary(); + DevExpress.XtraReports.UI.XRSummary xrSummary5 = new DevExpress.XtraReports.UI.XRSummary(); + DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); this.xrTableDetail = new DevExpress.XtraReports.UI.XRTable(); @@ -43,6 +45,7 @@ namespace BeWo.Report.DefaultReports this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell67 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); this.ruleIstFeiertagOderWE = new DevExpress.XtraReports.UI.FormattingRule(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand(); @@ -55,6 +58,7 @@ namespace BeWo.Report.DefaultReports this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); this.GroupHeader3 = new DevExpress.XtraReports.UI.GroupHeaderBand(); this.lblMonat = new DevExpress.XtraReports.UI.XRLabel(); this.xrTable2 = new DevExpress.XtraReports.UI.XRTable(); @@ -76,6 +80,7 @@ namespace BeWo.Report.DefaultReports this.cellSumMinutesTotalDecimal = new DevExpress.XtraReports.UI.XRTableCell(); this.cellSumHoursSickDecimal = new DevExpress.XtraReports.UI.XRTableCell(); this.cellSumHoursInVacationDecimal = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell46 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -97,7 +102,6 @@ namespace BeWo.Report.DefaultReports this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell26 = 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 +119,8 @@ namespace BeWo.Report.DefaultReports this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField(); + this.fieldTatsSoll = 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.xrTable2)).BeginInit(); @@ -132,7 +138,8 @@ namespace BeWo.Report.DefaultReports // // Detail1 // - this.Detail1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.Detail1.HeightF = 0F; this.Detail1.Name = "Detail1"; this.Detail1.StylePriority.UseFont = false; @@ -141,7 +148,8 @@ namespace BeWo.Report.DefaultReports // this.xrTableDetail.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableDetail.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTableDetail.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.xrTableDetail.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.xrTableDetail.Name = "xrTableDetail"; this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -161,7 +169,8 @@ namespace BeWo.Report.DefaultReports this.xrTableCell20, this.xrTableCell31, this.xrTableCell67, - this.xrTableCell27}); + this.xrTableCell27, + this.xrTableCell12}); this.xrTableRowDetail.FormattingRules.Add(this.ruleIstFeiertagOderWE); this.xrTableRowDetail.Name = "xrTableRowDetail"; this.xrTableRowDetail.Weight = 0.88D; @@ -176,7 +185,7 @@ namespace BeWo.Report.DefaultReports 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.081154192966636646D; this.xrTableCell3.XlsxFormatString = "ddd. dd.MM.yyyy"; // // xrTableCell20 @@ -185,7 +194,7 @@ namespace BeWo.Report.DefaultReports 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.25247971833128457D; // // xrTableCell31 // @@ -195,7 +204,7 @@ namespace BeWo.Report.DefaultReports 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.0676284967186862D; // // xrTableCell67 // @@ -205,7 +214,7 @@ namespace BeWo.Report.DefaultReports 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.067628498438567719D; // // xrTableCell27 // @@ -215,7 +224,18 @@ namespace BeWo.Report.DefaultReports 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.067628480379810868D; + // + // xrTableCell12 + // + this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.HoursOtherAbsenceTimes")}); + this.xrTableCell12.Multiline = true; + this.xrTableCell12.Name = "xrTableCell12"; + this.xrTableCell12.StylePriority.UseTextAlignment = false; + this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell12.TextFormatString = "{0:0.00}"; + this.xrTableCell12.Weight = 0.067628480379810868D; // // ruleIstFeiertagOderWE // @@ -250,7 +270,7 @@ namespace BeWo.Report.DefaultReports // this.Detail2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTableDetail}); - this.Detail2.Font = new System.Drawing.Font("Arial", 8F); + this.Detail2.Font = new DevExpress.Drawing.DXFont("Arial", 8F); this.Detail2.HeightF = 22F; this.Detail2.Name = "Detail2"; this.Detail2.StylePriority.UseFont = false; @@ -259,8 +279,8 @@ namespace BeWo.Report.DefaultReports // this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTableHeader}); - this.GroupHeader2.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); - this.GroupHeader2.HeightF = 30F; + this.GroupHeader2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); + this.GroupHeader2.HeightF = 40F; this.GroupHeader2.Name = "GroupHeader2"; this.GroupHeader2.StylePriority.UseFont = false; // @@ -274,7 +294,7 @@ namespace BeWo.Report.DefaultReports 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(670F, 40F); this.xrTableHeader.StylePriority.UseBackColor = false; this.xrTableHeader.StylePriority.UseBorders = false; this.xrTableHeader.StylePriority.UseFont = false; @@ -289,9 +309,10 @@ namespace BeWo.Report.DefaultReports this.xrTableCell2, this.xrTableCell7, this.xrTableCell8, - this.xrTableCell10}); + this.xrTableCell10, + this.xrTableCell11}); this.xrTableRowHeader.Name = "xrTableRowHeader"; - this.xrTableRowHeader.Weight = 0.79999999999999982D; + this.xrTableRowHeader.Weight = 1.0666666666666664D; // // xrTableCell5 // @@ -301,7 +322,7 @@ namespace BeWo.Report.DefaultReports 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.081154193078141729D; // // xrTableCell2 // @@ -309,7 +330,7 @@ namespace BeWo.Report.DefaultReports 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.25247971115578405D; // // xrTableCell7 // @@ -317,7 +338,7 @@ namespace BeWo.Report.DefaultReports 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.067628491699109325D; // // xrTableCell8 // @@ -326,7 +347,7 @@ namespace BeWo.Report.DefaultReports 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.067628493795742983D; // // xrTableCell10 // @@ -336,14 +357,24 @@ namespace BeWo.Report.DefaultReports 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.067628493369995935D; + // + // xrTableCell11 + // + this.xrTableCell11.Multiline = true; + this.xrTableCell11.Name = "xrTableCell11"; + this.xrTableCell11.StylePriority.UseBackColor = false; + this.xrTableCell11.StylePriority.UseTextAlignment = false; + this.xrTableCell11.Text = "Sonstige Abw."; + this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell11.Weight = 0.067628489930232891D; // // GroupHeader3 // this.GroupHeader3.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.lblMonat, this.xrTable2}); - this.GroupHeader3.Font = new System.Drawing.Font("Arial", 10F); + this.GroupHeader3.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.GroupHeader3.HeightF = 120F; this.GroupHeader3.Level = 1; this.GroupHeader3.Name = "GroupHeader3"; @@ -354,7 +385,7 @@ namespace BeWo.Report.DefaultReports // this.lblMonat.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReportStartDate", "Stundenkonto {0:MMMM yy}")}); - this.lblMonat.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold); + this.lblMonat.Font = new DevExpress.Drawing.DXFont("Arial", 14F, DevExpress.Drawing.DXFontStyle.Bold); this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.lblMonat.Multiline = true; this.lblMonat.Name = "lblMonat"; @@ -390,7 +421,7 @@ namespace BeWo.Report.DefaultReports // // xrTableCell1 // - this.xrTableCell1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTableCell1.StylePriority.UseFont = false; @@ -404,7 +435,7 @@ namespace BeWo.Report.DefaultReports // this.xrTableCell25.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.FullName")}); - this.xrTableCell25.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell25.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell25.Multiline = true; this.xrTableCell25.Name = "xrTableCell25"; this.xrTableCell25.StylePriority.UseFont = false; @@ -422,7 +453,7 @@ namespace BeWo.Report.DefaultReports // // xrTableCell6 // - this.xrTableCell6.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell6.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTableCell6.StylePriority.UseFont = false; @@ -455,7 +486,7 @@ namespace BeWo.Report.DefaultReports // // xrTableCell21 // - this.xrTableCell21.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell21.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell21.Name = "xrTableCell21"; this.xrTableCell21.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTableCell21.StylePriority.UseFont = false; @@ -476,7 +507,7 @@ namespace BeWo.Report.DefaultReports // // xrTableCell28 // - this.xrTableCell28.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell28.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell28.Name = "xrTableCell28"; this.xrTableCell28.StylePriority.UseFont = false; this.xrTableCell28.StylePriority.UseTextAlignment = false; @@ -499,7 +530,7 @@ namespace BeWo.Report.DefaultReports this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable4, this.xrTable1}); - this.GroupFooter2.Font = new System.Drawing.Font("Arial", 10F); + this.GroupFooter2.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.GroupFooter2.HeightF = 116.6667F; this.GroupFooter2.KeepTogether = true; this.GroupFooter2.Name = "GroupFooter2"; @@ -508,12 +539,12 @@ namespace BeWo.Report.DefaultReports // xrTable4 // this.xrTable4.Borders = DevExpress.XtraPrinting.BorderSide.None; - this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(110F, 0F); + this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 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(670F, 22F); this.xrTable4.StylePriority.UseBorders = false; this.xrTable4.StylePriority.UseFont = false; this.xrTable4.StylePriority.UsePadding = false; @@ -526,19 +557,21 @@ namespace BeWo.Report.DefaultReports this.xrTableCell64, this.cellSumMinutesTotalDecimal, this.cellSumHoursSickDecimal, - this.cellSumHoursInVacationDecimal}); + this.cellSumHoursInVacationDecimal, + this.xrTableCell13}); this.xrTableRow9.Name = "xrTableRow9"; this.xrTableRow9.Weight = 0.87999999999999978D; // // xrTableCell64 // - this.xrTableCell64.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTableCell64.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.xrTableCell64.Name = "xrTableCell64"; this.xrTableCell64.StylePriority.UseFont = false; 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.33363034022068316D; // // cellSumMinutesTotalDecimal // @@ -552,7 +585,7 @@ namespace BeWo.Report.DefaultReports this.cellSumMinutesTotalDecimal.Summary = xrSummary1; this.cellSumMinutesTotalDecimal.Text = "cellSumMinutesTotalDecimal"; this.cellSumMinutesTotalDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellSumMinutesTotalDecimal.Weight = 0.081153321921416444D; + this.cellSumMinutesTotalDecimal.Weight = 0.067627767727581084D; // // cellSumHoursSickDecimal // @@ -567,7 +600,7 @@ namespace BeWo.Report.DefaultReports this.cellSumHoursSickDecimal.Summary = xrSummary2; this.cellSumHoursSickDecimal.Text = "cellSumHoursSickDecimal"; this.cellSumHoursSickDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellSumHoursSickDecimal.Weight = 0.081153328404945282D; + this.cellSumHoursSickDecimal.Weight = 0.067627774211109937D; // // cellSumHoursInVacationDecimal // @@ -583,7 +616,21 @@ namespace BeWo.Report.DefaultReports this.cellSumHoursInVacationDecimal.Summary = xrSummary3; this.cellSumHoursInVacationDecimal.Text = "cellSumHoursInVacationDecimal"; this.cellSumHoursInVacationDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellSumHoursInVacationDecimal.Weight = 0.081153321723263658D; + this.cellSumHoursInVacationDecimal.Weight = 0.0676277675294283D; + // + // xrTableCell13 + // + this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.HoursOtherAbsenceTimes")}); + this.xrTableCell13.Multiline = true; + this.xrTableCell13.Name = "xrTableCell13"; + this.xrTableCell13.StylePriority.UseBackColor = false; + this.xrTableCell13.StylePriority.UseTextAlignment = false; + xrSummary4.FormatString = "{0:0.00}"; + xrSummary4.Running = DevExpress.XtraReports.UI.SummaryRunning.Group; + this.xrTableCell13.Summary = xrSummary4; + this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell13.Weight = 0.0676277675294283D; // // xrTable1 // @@ -680,7 +727,7 @@ namespace BeWo.Report.DefaultReports this.xrTableCell4.StylePriority.UseBorders = false; this.xrTableCell4.StylePriority.UsePadding = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; - this.xrTableCell4.Text = "Stunden Urlaub/Krankheit:"; + this.xrTableCell4.Text = "Stunden Abwesenheiten:"; this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell4.Weight = 0.17987241552156494D; // @@ -784,7 +831,7 @@ namespace BeWo.Report.DefaultReports this.xrTableCell57, this.xrTableCell58, this.xrTableCell26}); - this.xrTableRow6.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableRow6.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableRow6.Name = "xrTableRow6"; this.xrTableRow6.StylePriority.UseFont = false; this.xrTableRow6.Weight = 0.8D; @@ -792,7 +839,7 @@ namespace BeWo.Report.DefaultReports // xrTableCell48 // this.xrTableCell48.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableCell48.Font = new System.Drawing.Font("Arial", 10F); + this.xrTableCell48.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrTableCell48.Name = "xrTableCell48"; this.xrTableCell48.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 8, 0, 0, 100F); this.xrTableCell48.StylePriority.UseBorders = false; @@ -808,14 +855,14 @@ namespace BeWo.Report.DefaultReports this.xrTableCell57.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; this.xrTableCell57.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.fieldHours")}); - this.xrTableCell57.Font = new System.Drawing.Font("Arial", 10F); + this.xrTableCell57.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrTableCell57.Name = "xrTableCell57"; this.xrTableCell57.StylePriority.UseBorders = false; this.xrTableCell57.StylePriority.UseFont = false; this.xrTableCell57.StylePriority.UseTextAlignment = false; - xrSummary4.FormatString = "{0:0.00}"; - xrSummary4.Running = DevExpress.XtraReports.UI.SummaryRunning.Group; - this.xrTableCell57.Summary = xrSummary4; + xrSummary5.FormatString = "{0:0.00}"; + xrSummary5.Running = DevExpress.XtraReports.UI.SummaryRunning.Group; + this.xrTableCell57.Summary = xrSummary5; this.xrTableCell57.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell57.Weight = 0.089936204907626063D; // @@ -844,17 +891,13 @@ namespace BeWo.Report.DefaultReports this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell26.Weight = 0.11143081848591821D; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); - // // Title // this.Title.BackColor = System.Drawing.Color.White; 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"; // @@ -864,7 +907,7 @@ namespace BeWo.Report.DefaultReports 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"; // @@ -874,7 +917,7 @@ namespace BeWo.Report.DefaultReports 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"; // @@ -884,7 +927,7 @@ namespace BeWo.Report.DefaultReports 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"; // @@ -977,6 +1020,17 @@ namespace BeWo.Report.DefaultReports this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt"; // + // fieldTatsSoll + // + this.fieldTatsSoll.DataMember = "EmployeeDetailList"; + this.fieldTatsSoll.Expression = "[StundenSollMax] - [UrlaubUndKrankheit]"; + this.fieldTatsSoll.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldTatsSoll.Name = "fieldTatsSoll"; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); + // // Mitarbeiterarbeitszeitkonto // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -995,13 +1049,14 @@ namespace BeWo.Report.DefaultReports this.fieldSumHours, this.fieldSumHoliday2, this.fieldIstArbeitszeit, - this.fieldUeberstundenGesamt}); + this.fieldUeberstundenGesamt, + this.fieldTatsSoll}); this.DataSource = this.bindingSource1; this.DisplayName = "Mitarbeiterstundenkonto"; - this.Font = new System.Drawing.Font("Arial", 8F); + this.Font = new DevExpress.Drawing.DXFont("Arial", 8F); this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { this.ruleIstFeiertagOderWE}); - this.Margins = new System.Drawing.Printing.Margins(75, 50, 50, 50); + this.Margins = new DevExpress.Drawing.DXMargins(75F, 50F, 50F, 50F); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; @@ -1010,7 +1065,9 @@ namespace BeWo.Report.DefaultReports this.FieldCaption, this.PageInfo, this.DataField}); - this.Version = "17.1"; + this.Version = "23.2"; + xrWatermark1.Id = "Watermark1"; + this.Watermarks.Add(xrWatermark1); ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); @@ -1104,5 +1161,9 @@ namespace BeWo.Report.DefaultReports private DevExpress.XtraReports.UI.XRTableCell xrTableCell9; private DevExpress.XtraReports.UI.XRTableCell xrTableCell16; private DevExpress.XtraReports.UI.XRTableCell xrTableCell19; + private DevExpress.XtraReports.UI.CalculatedField fieldTatsSoll; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell12; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell13; } } diff --git a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.resx b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.resx index d25f3eba2..d58980a38 100644 --- a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.resx +++ b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.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/Report/DefaultReports/ServiceRecordChangesAfterInvoiceDateReport.Designer.cs b/Report/DefaultReports/ServiceRecordChangesAfterInvoiceDateReport.Designer.cs index 2e62b0b91..ee2aa4de0 100644 --- a/Report/DefaultReports/ServiceRecordChangesAfterInvoiceDateReport.Designer.cs +++ b/Report/DefaultReports/ServiceRecordChangesAfterInvoiceDateReport.Designer.cs @@ -38,6 +38,7 @@ this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -56,11 +57,14 @@ this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.Auszahlungstextsichtbarkeitsformatierungsregel = new DevExpress.XtraReports.UI.FormattingRule(); + this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell(); this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); @@ -85,7 +89,7 @@ this.xrTable1.Name = "xrTable1"; this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow1}); - this.xrTable1.SizeF = new System.Drawing.SizeF(975F, 50F); + this.xrTable1.SizeF = new System.Drawing.SizeF(1085F, 50F); this.xrTable1.StylePriority.UseFont = false; // // xrTableRow1 @@ -97,10 +101,12 @@ this.xrTableCell13, this.xrTableCell2, this.xrTableCell7, + this.xrTableCell19, this.xrTableCell3, this.xrTableCell11, this.xrTableCell15, - this.xrTableCell14}); + this.xrTableCell14, + this.xrTableCell21}); this.xrTableRow1.Name = "xrTableRow1"; this.xrTableRow1.StylePriority.UseBorders = false; this.xrTableRow1.Weight = 1.1999998535156429D; @@ -173,6 +179,20 @@ this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell7.Weight = 0.41538463299091033D; // + // xrTableCell19 + // + this.xrTableCell19.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell19.Multiline = true; + this.xrTableCell19.Name = "xrTableCell19"; + this.xrTableCell19.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.xrTableCell19.StylePriority.UseBorders = false; + this.xrTableCell19.StylePriority.UsePadding = false; + this.xrTableCell19.StylePriority.UseTextAlignment = false; + this.xrTableCell19.Text = "Minuten \r\nalt"; + this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell19.Weight = 0.32307694005998633D; + // // xrTableCell3 // this.xrTableCell3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) @@ -183,7 +203,7 @@ this.xrTableCell3.StylePriority.UseBorders = false; this.xrTableCell3.StylePriority.UsePadding = false; this.xrTableCell3.StylePriority.UseTextAlignment = false; - this.xrTableCell3.Text = "Minuten"; + this.xrTableCell3.Text = "Minuten\r\nneu"; this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell3.Weight = 0.32307694005998633D; // @@ -199,7 +219,7 @@ this.xrTableCell11.StylePriority.UseTextAlignment = false; this.xrTableCell11.Text = "Datum der\r\nÄnderung"; this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell11.Weight = 0.55384617433151717D; + this.xrTableCell11.Weight = 0.3692307863136659D; // // xrTableCell15 // @@ -214,7 +234,7 @@ this.xrTableCell15.StylePriority.UseTextAlignment = false; this.xrTableCell15.Text = "Geändert von"; this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell15.Weight = 0.55384616851512269D; + this.xrTableCell15.Weight = 0.50769232151065979D; // // xrTableCell14 // @@ -229,12 +249,13 @@ this.xrTableCell14.StylePriority.UseTextAlignment = false; this.xrTableCell14.Text = "Art der\r\nÄnderung"; this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell14.Weight = 0.32307693405838517D; + this.xrTableCell14.Weight = 0.369230781062848D; // // TopMargin // this.TopMargin.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); + this.TopMargin.HeightF = 80F; this.TopMargin.Name = "TopMargin"; this.TopMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.TopMargin.StylePriority.UseFont = false; @@ -281,7 +302,7 @@ this.xrTable2.Name = "xrTable2"; this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2}); - this.xrTable2.SizeF = new System.Drawing.SizeF(975F, 25F); + this.xrTable2.SizeF = new System.Drawing.SizeF(1085F, 25F); this.xrTable2.StylePriority.UseBorders = false; this.xrTable2.StylePriority.UseFont = false; // @@ -293,10 +314,12 @@ this.xrTableCell17, this.xrTableCell16, this.xrTableCell5, + this.xrTableCell20, this.xrTableCell8, this.xrTableCell6, this.xrTableCell12, - this.xrTableCell18}); + this.xrTableCell18, + this.xrTableCell22}); this.xrTableRow2.Name = "xrTableRow2"; this.xrTableRow2.StylePriority.UsePadding = false; this.xrTableRow2.StylePriority.UseTextAlignment = false; @@ -374,16 +397,28 @@ this.Auszahlungstextsichtbarkeitsformatierungsregel.Formatting.ForeColor = System.Drawing.Color.Transparent; this.Auszahlungstextsichtbarkeitsformatierungsregel.Name = "Auszahlungstextsichtbarkeitsformatierungsregel"; // + // xrTableCell20 + // + this.xrTableCell20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "DetailList.MinutesOld")}); + this.xrTableCell20.Multiline = true; + this.xrTableCell20.Name = "xrTableCell20"; + this.xrTableCell20.StylePriority.UsePadding = false; + this.xrTableCell20.StylePriority.UseTextAlignment = false; + this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell20.TextFormatString = "{0:0.##}"; + this.xrTableCell20.Weight = 0.32307692271418365D; + // // xrTableCell8 // this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "DetailList.Minutes")}); + new DevExpress.XtraReports.UI.XRBinding("Text", null, "DetailList.MinutesNew")}); this.xrTableCell8.Multiline = true; this.xrTableCell8.Name = "xrTableCell8"; this.xrTableCell8.StylePriority.UsePadding = false; this.xrTableCell8.StylePriority.UseTextAlignment = false; this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell8.TextFormatString = "{0:0}"; + this.xrTableCell8.TextFormatString = "{0:0.##}"; this.xrTableCell8.Weight = 0.32307692271418365D; // // xrTableCell6 @@ -396,7 +431,7 @@ this.xrTableCell6.StylePriority.UseTextAlignment = false; this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell6.TextFormatString = "{0:dd.MM.yyyy HH:mm}"; - this.xrTableCell6.Weight = 0.55384615412977178D; + this.xrTableCell6.Weight = 0.36923076885138917D; // // xrTableCell12 // @@ -412,7 +447,7 @@ this.xrTableCell12.StylePriority.UseTextAlignment = false; this.xrTableCell12.Text = "xrTableCell12"; this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell12.Weight = 0.553846146458497D; + this.xrTableCell12.Weight = 0.50769230013890132D; // // xrTableCell18 // @@ -428,7 +463,7 @@ this.xrTableCell18.StylePriority.UseTextAlignment = false; this.xrTableCell18.Text = "xrTableCell18"; this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell18.Weight = 0.32307691478241685D; + this.xrTableCell18.Weight = 0.36923076110201247D; // // GroupHeader1 // @@ -437,6 +472,37 @@ this.GroupHeader1.HeightF = 48.33333F; this.GroupHeader1.Name = "GroupHeader1"; // + // xrTableCell21 + // + this.xrTableCell21.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell21.Multiline = true; + this.xrTableCell21.Name = "xrTableCell21"; + this.xrTableCell21.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F); + this.xrTableCell21.StylePriority.UseBorders = false; + this.xrTableCell21.StylePriority.UsePadding = false; + this.xrTableCell21.StylePriority.UseTextAlignment = false; + this.xrTableCell21.Text = "Rg-Nr."; + this.xrTableCell21.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell21.Weight = 0.369230781062848D; + // + // xrTableCell22 + // + this.xrTableCell22.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell22.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "DetailList.InvoiceNumber")}); + this.xrTableCell22.Multiline = true; + this.xrTableCell22.Name = "xrTableCell22"; + this.xrTableCell22.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F); + this.xrTableCell22.StylePriority.UseBorders = false; + this.xrTableCell22.StylePriority.UsePadding = false; + this.xrTableCell22.StylePriority.UseTextAlignment = false; + this.xrTableCell22.Text = "xrTableCell22"; + this.xrTableCell22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell22.Weight = 0.36923076110201247D; + // // bindingSource1 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceRecordChangesAfterInvoiceDateRO); @@ -456,9 +522,10 @@ this.Einzahlungstextsichtbarkeitsformatierungsregel, this.Auszahlungstextsichtbarkeitsformatierungsregel}); this.Landscape = true; - this.Margins = new DevExpress.Drawing.DXMargins(60F, 60F, 100F, 60F); - this.PageHeight = 850; - this.PageWidth = 1100; + this.Margins = new DevExpress.Drawing.DXMargins(40F, 40F, 80F, 60F); + this.PageHeight = 827; + this.PageWidth = 1169; + this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; this.Version = "23.2"; xrWatermark1.Id = "Watermark1"; this.Watermarks.Add(xrWatermark1); @@ -503,5 +570,9 @@ private DevExpress.XtraReports.UI.XRTableCell xrTableCell16; private DevExpress.XtraReports.UI.XRTableCell xrTableCell14; private DevExpress.XtraReports.UI.XRTableCell xrTableCell18; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell19; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell20; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell21; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell22; } } diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs index 84682e332..5fc8ce5e8 100644 --- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs +++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs @@ -1992,6 +1992,10 @@ namespace BeWo.Report.ReportObjects } else { + if (!AbsenceTimeAufIstStundenAddieren(absenceTime)) + { + dd.HoursOtherAbsenceTimes = abwesenheitsDauer; + } if (istGanztaegig) { //Bei ganztägigen Abwesenheiten darf nicht noch zusätzlich gearbeitet werden diff --git a/Report/ReportObjects/MitarbeiterstundenkontoRO.cs b/Report/ReportObjects/MitarbeiterstundenkontoRO.cs index e9d554eac..1327f2e37 100644 --- a/Report/ReportObjects/MitarbeiterstundenkontoRO.cs +++ b/Report/ReportObjects/MitarbeiterstundenkontoRO.cs @@ -376,6 +376,8 @@ namespace BeWo.Report.ReportObjects public decimal HoursSick { get; set; } + public decimal HoursOtherAbsenceTimes { get; set; } + public decimal MinutesTotal { get; set; } public decimal SollStunden { get; set; } diff --git a/Report/ReportObjects/ServiceRecordChangesAfterInvoiceDateRO.cs b/Report/ReportObjects/ServiceRecordChangesAfterInvoiceDateRO.cs index 210c5cb66..5e2d1d488 100644 --- a/Report/ReportObjects/ServiceRecordChangesAfterInvoiceDateRO.cs +++ b/Report/ReportObjects/ServiceRecordChangesAfterInvoiceDateRO.cs @@ -28,6 +28,7 @@ namespace BeWo.Report.ReportObjects List c2sOids = new List(); Dictionary c2sOid2MaxInsts = new Dictionary(); + Dictionary c2sOid2InvoiceNumber = new Dictionary(); foreach (var item in invoices) { @@ -41,11 +42,14 @@ namespace BeWo.Report.ReportObjects if (!c2sOid2MaxInsts.ContainsKey(c2sOid)) { c2sOid2MaxInsts.Add(c2sOid, insts); + c2sOid2InvoiceNumber.Add(c2sOid, item.InvoiceNumber); } else if (insts > c2sOid2MaxInsts[c2sOid]) { c2sOid2MaxInsts.Remove(c2sOid); c2sOid2MaxInsts.Add(c2sOid, insts); + c2sOid2InvoiceNumber.Remove(c2sOid); + c2sOid2InvoiceNumber.Add(c2sOid, item.InvoiceNumber); } } } @@ -85,7 +89,8 @@ and sh.StartDate >= '{1:yyyy-MM-dd}' and sh.StartDate < '{2:yyyy-MM-dd}' and sh. foreach (object[] srRow in sqlresult) { var rro = CreateRecordRO(srRow); - + rro.InvoiceNumber = c2sOid2InvoiceNumber[c2sOid]; + rro.MinutesOld = GetMinutesOld(rro); if (!ro.DetailList.Exists(r => r.ServiceRecordHistoryOid == rro.ServiceRecordHistoryOid)) { ro.DetailList.Add(rro); @@ -106,6 +111,49 @@ and sh.StartDate >= '{1:yyyy-MM-dd}' and sh.StartDate < '{2:yyyy-MM-dd}' and sh. return ro; } + private static decimal GetMinutesOld(ServiceRecordChangeRO rro) + { + decimal old = 0; + + String sql = String.Format(@" +SELECT +sh.startdate, +sh.enddate, +sh.roundedduration, +sh.changetype, +sh.Timestamp, +sh.InsUser, +sh.ServiceRecordOid, +p.FirstName, +p.LastName, +c2s.ApprovedStartDate, +c2s.ApprovedEndDate, +o.Name, +sh.Oid +FROM servicerecordhistory sh +join costbearer2supportconcept c2s on sh.costbearer2supportconceptoid = c2s.Oid +join supportconcept sc on sc.Oid = c2s.supportconceptoid +join customer c on sc.customeroid = c.Oid +join person p on p.Oid = c.PersonOid +join costbearer cb on cb.Oid = c2s.CostBearerOid +join organisation o on o.costbeareroid = cb.Oid +where sh.ServiceRecordOid = {0} and sh.Oid < {1} +order by oid desc" +, rro.ServiceRecordOid, rro.ServiceRecordHistoryOid); + + var sqlresult = DAOFactory.SearchDAO.GetSqlResult(sql); + // + //update customer set debitornumber = '5' + debitornumber where debitornumber is not null + foreach (object[] srRow in sqlresult) + { + var ro = CreateRecordRO(srRow); + + old = ro.MinutesNew ?? 0; + } + + return old; + } + private static ServiceRecordChangeRO CreateRecordRO(object[] sqlRow) { var ro = new ServiceRecordChangeRO(); @@ -137,7 +185,7 @@ and sh.StartDate >= '{1:yyyy-MM-dd}' and sh.StartDate < '{2:yyyy-MM-dd}' and sh. ro.ChangeDate = (DateTime)sqlRow[4]; ro.ServiceRecordStart = (DateTime)sqlRow[0]; ro.ServiceRecordEnd = (DateTime)sqlRow[1]; - ro.Minutes = (decimal?)sqlRow[2]; + ro.MinutesNew = (decimal?)sqlRow[2]; ro.ChangeType = Int32.Parse(sqlRow[3].ToString()); ro.UpdateUserName = (String)sqlRow[5]; ro.ServiceRecordOid = (long)sqlRow[6]; @@ -187,9 +235,11 @@ and sh.StartDate >= '{1:yyyy-MM-dd}' and sh.StartDate < '{2:yyyy-MM-dd}' and sh. public DateTime ChangeDate { get; set; } public DateTime ServiceRecordStart { get; set; } public DateTime ServiceRecordEnd { get; set; } - public decimal? Minutes { get; set; } + public decimal? MinutesOld { get; set; } + public decimal? MinutesNew { get; set; } public int ChangeType { get; set; } public String UpdateUserName { get; set; } + public String InvoiceNumber { get; set; } public String TimeRange { get diff --git a/ReportImp/FizHof/Properties/licenses.licx b/ReportImp/FizHof/Properties/licenses.licx index e69de29bb..d59547a61 100644 --- a/ReportImp/FizHof/Properties/licenses.licx +++ b/ReportImp/FizHof/Properties/licenses.licx @@ -0,0 +1 @@ +DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/ReportImp/FizHof/Service/CustomVacationService.cs b/ReportImp/FizHof/Service/CustomVacationService.cs index 0fe9c767a..a7a40aac7 100644 --- a/ReportImp/FizHof/Service/CustomVacationService.cs +++ b/ReportImp/FizHof/Service/CustomVacationService.cs @@ -24,11 +24,11 @@ namespace FizHof.Service if (year < 2020) { list.Remove(list.First(f => f.Datum == new DateTime(year, 1, 6))); - - //list.Add(new DateTime(year, 8, 15)); // , "Mariä Himmelfahrt")); ISt in Oberfranken doch kein Feiertag, nur in Rest-Bayern + } - + list.Remove(list.First(f => f.Datum == new DateTime(year, 8, 15))); + if (year >= 2020) { list.Remove(list.First(f => f.Datum == new DateTime(year, 12, 24))); diff --git a/Service/OwnChat/OwnChatHelper.cs b/Service/OwnChat/OwnChatHelper.cs index a8e0cd1f4..b8880a4db 100644 --- a/Service/OwnChat/OwnChatHelper.cs +++ b/Service/OwnChat/OwnChatHelper.cs @@ -140,14 +140,14 @@ LG - //#if DEBUG - // tenant = "4368658435"; - // var serverUrl = OwnChatHelper.ErmittleServerURL(tenant); - // var apikey = "hNykpBwxE1Y6NmwZBTDQOpPXW6xCgnVHjJ5lh0QDQyCefgcnimC32aZ3CwB4qQl4"; - // var userid = "1432790061"; +#if DEBUG + tenant = "4368658435"; + var serverUrl = OwnChatHelper.ErmittleServerURL(tenant); + var apikey = "hNykpBwxE1Y6NmwZBTDQOpPXW6xCgnVHjJ5lh0QDQyCefgcnimC32aZ3CwB4qQl4"; + var userid = "1432790061"; - //#else +#else var m = DAOFactory.GenericDAO.LoadByID(1); if (m == null || String.IsNullOrEmpty(m.Apikey)) { @@ -162,7 +162,7 @@ LG var serverUrl = OwnChatHelper.ErmittleServerURL(tenant); var apikey = m.Apikey; var userid = String.Format("E{0}", emp.Oid); - //#endif +#endif diff --git a/Service/Plugins/CustomerService.cs b/Service/Plugins/CustomerService.cs index d911d40a5..abb274b44 100644 --- a/Service/Plugins/CustomerService.cs +++ b/Service/Plugins/CustomerService.cs @@ -501,25 +501,27 @@ namespace BeWo.Service.Plugins var c2oList = DAOFactory.SearchDAO.FindCustomerOid2Persons(personOids); - - foreach (object[] item in c2oList) + if (c2oList != null) { - var oid = (long)item[0]; - var poid = (long)item[1]; - var coid = (long)item[2]; - var test = (sbyte?)item[3]; - var isF = (sbyte?)item[3]; - var c2p = new CustomerPersonRelationDC(); - c2p.Customer2PersonOid = oid; - c2p.Person = new CompactPersonDC { PersonOid = poid }; - c2p.Customer = new CompactCustomerDC { CustomerOid = coid }; - c2p.IstFamilie = isF.HasValue ? isF.Value == 1 : false; - - if (!person2CustomerOidDict.ContainsKey(poid)) + foreach (object[] item in c2oList) { - person2CustomerOidDict.Add(poid, new List()); + var oid = (long)item[0]; + var poid = (long)item[1]; + var coid = (long)item[2]; + var test = (sbyte?)item[3]; + var isF = (sbyte?)item[3]; + var c2p = new CustomerPersonRelationDC(); + c2p.Customer2PersonOid = oid; + c2p.Person = new CompactPersonDC { PersonOid = poid }; + c2p.Customer = new CompactCustomerDC { CustomerOid = coid }; + c2p.IstFamilie = isF.HasValue ? isF.Value == 1 : false; + + if (!person2CustomerOidDict.ContainsKey(poid)) + { + person2CustomerOidDict.Add(poid, new List()); + } + person2CustomerOidDict[poid].Add(c2p); } - person2CustomerOidDict[poid].Add(c2p); } } foreach (var person in persons) diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 0977b24c3..9fe7beaff 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -51,7 +51,7 @@ namespace BeWo.Service.Plugins //t = "4950382346"; // Holsinger //t = "5973016645"; // Verein Lebensgestaltung Hanau //t = "7375324044"; // Diakonie KK Kleve - //t = "1441747891"; // BeWo Mobil Köln + t = "1441747891"; // BeWo Mobil Köln //t = "5120047701"; // Trialog //t = "3629696651"; // Soziale Dienste Niederrhein (SDN) //t = "9893557471"; // Caritas Frankfurt @@ -388,7 +388,7 @@ namespace BeWo.Service.Plugins //t = "2544632712"; // Wabe gGmbH //t = "7077286353"; // PariSozial //t = "8735029937"; // Caritas Ostvest - t = "7653029063"; // SkF Leverkusen JuHi + //t = "7653029063"; // SkF Leverkusen JuHi //t = "5000000000"; return t; diff --git a/Service/ServiceImplementations/UserServiceImp.cs b/Service/ServiceImplementations/UserServiceImp.cs index 528517ab8..78ad688ca 100644 --- a/Service/ServiceImplementations/UserServiceImp.cs +++ b/Service/ServiceImplementations/UserServiceImp.cs @@ -515,7 +515,17 @@ namespace BeWo.Service.ServiceImplementations { result = CreateTwoFactorCode(lUser); } - + else + { + if (!CheckTwoFactorCode(lUser, twoFactorPin)) + { + result = UserValidationResult.UserUnknown; + } + else + { + result = UserValidationResult.UserValid; + } + } } else if (settings.IsPasswordSecurityActiv) { @@ -583,6 +593,19 @@ namespace BeWo.Service.ServiceImplementations } } + private bool CheckTwoFactorCode(ApplicationUser lUser, string twoFactorPin) + { + var code = DAOFactory.SearchDAO.GetLastTwoFactorCode(lUser.LoginName, lUser.BCryptPassword); + if (code != null && code.TFCode == twoFactorPin && code.UsedDate == DateTime.MinValue) + { + code.UsedDate = DateTime.Now; + DAOFactory.GenericDAO.Update(code); + return true; + } + return false; + + } + protected virtual UserValidationResult CreateTwoFactorCode(ApplicationUser user) { var code = CreateTwoFactorCode();