diff --git a/Model/Changes_alle_fuer_neue_db.txt b/Model/Changes_alle_fuer_neue_db.txt index 50632c625..95a8e7390 100644 --- a/Model/Changes_alle_fuer_neue_db.txt +++ b/Model/Changes_alle_fuer_neue_db.txt @@ -1005,4 +1005,35 @@ ADD COLUMN `IKDatenannahmestelle` VARCHAR(16) NULL DEFAULT NULL; ALTER TABLE `mandator` -ADD COLUMN `IKLeistungserbringer` VARCHAR(16) NULL; \ No newline at end of file +ADD COLUMN `IKLeistungserbringer` VARCHAR(16) NULL; + +ALTER TABLE signature + ADD COLUMN EmployeeOid BIGINT DEFAULT NULL, + ADD COLUMN CustomerOid BIGINT DEFAULT NULL, + ADD COLUMN BargeldtransaktionsOid BIGINT DEFAULT NULL; + + +CREATE TABLE `bargeldtransaktionshistory` ( + Oid BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, + InsTs DATETIME DEFAULT NULL, + InsUser VARCHAR(256) DEFAULT NULL, + UdpUser VARCHAR(256) DEFAULT NULL, + Tid INT NOT NULL, + Notice VARCHAR(1024) DEFAULT NULL, + Version BIGINT DEFAULT NULL, + IsActive TINYINT DEFAULT NULL, + SystemEntryID INT DEFAULT NULL, + ChangeType TINYINT DEFAULT NULL, + Zahlungstyp TINYINT DEFAULT NULL, + Zahlungsdatum DATETIME DEFAULT NULL, + Betrag DECIMAL(18, 10) DEFAULT NULL, + Transaktionskassenbestand DECIMAL(18, 10) DEFAULT NULL, + BargeldtransaktionOid BIGINT DEFAULT NULL, + Belegnummer VARCHAR(128) DEFAULT NULL, + SignatureOid BIGINT DEFAULT NULL, + SignatureStateType INT DEFAULT '0', + BargeldtransaktionInsTs DATETIME DEFAULT NULL, + BargeldtransaktionInsUser VARCHAR(256) DEFAULT NULL, + BargeldtransaktionVersion BIGINT DEFAULT NULL, + BargeldtransaktionUdpUser VARCHAR(256) DEFAULT NULL +) ENGINE=InnoDB; \ No newline at end of file diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs index 4e5c1b2cc..d937c2e1f 100644 --- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs +++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs @@ -3400,13 +3400,14 @@ namespace BeWo.Report.ReportObjects //gibt 1 zurück wenn ganzer Feiertag und z.B. 0.5 bei halben etc. public virtual decimal GetFeiertagsFaktor(DateTime start) { - return vacationService.GetFeiertagsFaktor(start); - //if (IstFeiertag(start)) - //{ - // return 1; - //} - //return 0; - } + //CB 26.02.2024: Darf nicht über den VacationService gehen, sonst werden die im CustomMitarbeiterstundenkontoBerechnung hinterlegten Feiertage ignoriert + //return vacationService.GetFeiertagsFaktor(start); + if (IstFeiertag(start)) + { + return 1; + } + return 0; + } public virtual bool IstFeiertag(DateTime start) { diff --git a/ReportImp/AkggMid/LeistungsnachweisHelper.cs b/ReportImp/AkggMid/LeistungsnachweisHelper.cs index e511c3d72..eebff3ef2 100644 --- a/ReportImp/AkggMid/LeistungsnachweisHelper.cs +++ b/ReportImp/AkggMid/LeistungsnachweisHelper.cs @@ -655,8 +655,11 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa { info.AbwesenheitsNotiz = ""; } - - abrechenbareAbwesenheiten.Add(dtIterator, info); + if (!abrechenbareAbwesenheiten.ContainsKey(dtIterator)) + { + abrechenbareAbwesenheiten.Add(dtIterator, info); + } + } } diff --git a/ReportImp/Fortis/CustomReportCreator.cs b/ReportImp/Fortis/CustomReportCreator.cs index c2d24778c..555416f6d 100644 --- a/ReportImp/Fortis/CustomReportCreator.cs +++ b/ReportImp/Fortis/CustomReportCreator.cs @@ -26,12 +26,12 @@ namespace Fortis { var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid); - rootReport.CreateDocument(); + //rootReport.CreateDocument(); for (int i = 1; i < lROs.Count; i++) { var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid); - lNext.CreateDocument(); + rootReport.Pages.AddRange(lNext.Pages); } @@ -76,9 +76,9 @@ namespace Fortis public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) { - var customer = DAOFactory.GenericDAO.LoadByID(customerOid); - if (customer.Person.LastName.ToLower().Contains("test") || customer.Person.FirstName.ToLower().Contains("test")) - { + //var customer = DAOFactory.GenericDAO.LoadByID(customerOid); + //if (customer.Person.LastName.ToLower().Contains("test") || customer.Person.FirstName.ToLower().Contains("test")) + //{ DateTime startDate = new DateTime(year, month, 1); if (startDay == 1 && endDay == DateTime.DaysInMonth(year, month)) @@ -88,7 +88,7 @@ namespace Fortis endDay = (int)endDate.Subtract(startDate).TotalDays; } - } + //} var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); return CreateServicesOverviewReportForRo(ro, serviceCategoryOid); @@ -99,8 +99,8 @@ namespace Fortis { IBeWoReport report = null; - if (ro.CustomerFirstName.Contains("TEST") || ro.CustomerLastName.Contains("TEST")) - { + //if (ro.CustomerFirstName.Contains("TEST") || ro.CustomerLastName.Contains("TEST")) + //{ report = new Fortis.ZeitdokumentationPlanIstUebersicht(); report.SetReportDataSource(ro); ((XtraReport)report).CreateDocument(); @@ -111,7 +111,7 @@ namespace Fortis ((XtraReport)report).Pages.AddRange(qb.Pages); return report as XtraReport; - } + //} report = new BeWo.Report.DefaultReports.Quittierungsbeleg(); report.SetReportDataSource(ro); diff --git a/ReportImp/Fortis/Quittierungsbeleg.cs b/ReportImp/Fortis/Quittierungsbeleg.cs index bf09853b7..92fbec167 100644 --- a/ReportImp/Fortis/Quittierungsbeleg.cs +++ b/ReportImp/Fortis/Quittierungsbeleg.cs @@ -22,10 +22,14 @@ namespace Fortis { if (pRO.Services != null) { + List servicesBillable = new List(); + Dictionary tag2Details = new Dictionary(); foreach (var sr in pRO.Services) { + bool add = true; + if (sr.ProzentAbrechenbar < 100) { sr.Minutes = (sr.Minutes / 100) * (double)sr.ProzentAbrechenbar; @@ -64,12 +68,18 @@ namespace Fortis { fsr.MinutenGD += sr.Minutes; } + else if (sr.ServiceDescription.Contains("abgesagt")) + { + fsr.FehlkontaktBeginn = sr.StartDate; + fsr.FehlkontaktEnde = sr.EndDate; + fsr.FehlkontaktMinuten = sr.Minutes; + } else if (sr.ServiceDescription.Contains("pool") || sr.ServiceCategory.Contains("WG-Aktivität") || sr.ServiceCategory.Contains("WG Aktivität")) { fsr.MinutenGI += sr.Minutes; } - else if (sr.ServiceDescription.Contains("Kompensatorisch")) + else if (sr.ServiceDescription.Contains("Kompensatorisch") || sr.ServiceDescription.Contains("Leistung im Auftrag")) { fsr.MinutenKL += sr.Minutes; @@ -79,24 +89,25 @@ namespace Fortis { fsr.MinutenAK += sr.Minutes; } - else if (sr.ServiceDescription.Contains("abgesagt")) - { - fsr.FehlkontaktBeginn = sr.StartDate; - fsr.FehlkontaktEnde = sr.EndDate; - fsr.FehlkontaktMinuten = sr.Minutes; - } else { //fsr.MinutenH += sr.Minutes; + add = false; } //if (sr.EmployeeCount > 1) //{ // fsr.AnzahlMA += sr.EmployeeCount; //} - fsr.AnzahlMA = sr.EmployeeCount; - fsr.Groesse += sr.CustomerCount; - } + if (add) + { + fsr.AnzahlMA = sr.EmployeeCount; + fsr.Groesse += sr.CustomerCount; + servicesBillable.Add(sr); + } + } + + pRO.Services = servicesBillable; //List newServices = new List(); //DateTime dt = pRO.StartDate; diff --git a/Service/Plugins/ServiceRecordStatisticFactory.cs b/Service/Plugins/ServiceRecordStatisticFactory.cs index d0cc01508..2e7cc70e3 100644 --- a/Service/Plugins/ServiceRecordStatisticFactory.cs +++ b/Service/Plugins/ServiceRecordStatisticFactory.cs @@ -338,12 +338,15 @@ namespace BeWo.Service.Plugins { var srDc = MapToServiceRecordDCForStatistic(sr); minutesProvidedRounded = calc.GetBillableDurationInMinutes(srDc, false); - - if (periodStats.ServiceRecords == null) + if (periodStats != null) { - periodStats.ServiceRecords = new List(); + + if (periodStats.ServiceRecords == null) + { + periodStats.ServiceRecords = new List(); + } + periodStats.ServiceRecords.Add(srDc); } - periodStats.ServiceRecords.Add(srDc); } diff --git a/Shared/Services/Calculations.cs b/Shared/Services/Calculations.cs index ac3754b30..e38754bf9 100644 --- a/Shared/Services/Calculations.cs +++ b/Shared/Services/Calculations.cs @@ -204,10 +204,12 @@ namespace BS.Shared.Services SupportConceptApprovalPeriodDC scap = null; if (category != null) + { scap = relDC.ApprovalPeriodList.FirstOrDefault( i => dt.InBetween(i.Span, true) && i.ServiceCategory != null && i.ServiceCategory.ServiceCategoryOid == category.ServiceCategoryOid); + } if (scap == null) scap = relDC.ApprovalPeriodList.FirstOrDefault(i => dt.InBetween(i.Span, true));