From e2eb3dde6221c4e5e6c58665f8553ae2473333a0 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 24 Jan 2022 17:29:46 +0100 Subject: [PATCH] KomMitBewo --- ReportImp/KomMitBewo/Jahresabgrenzung.cs | 26 +++++++++++++----------- ReportImp/KomMitBewo/KomMitBewo.csproj | 9 -------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/ReportImp/KomMitBewo/Jahresabgrenzung.cs b/ReportImp/KomMitBewo/Jahresabgrenzung.cs index 0a6ffe4e5..c22241eb6 100644 --- a/ReportImp/KomMitBewo/Jahresabgrenzung.cs +++ b/ReportImp/KomMitBewo/Jahresabgrenzung.cs @@ -44,7 +44,7 @@ namespace KommMit } else - lblTitel.Text = "Jahresabgrenzung der laufenden Hilfepläne"; + lblTitel.Text = "Abgrenzung der laufenden Hilfepläne"; var srList = DAOFactory.GenericDAO.GetAllActive(); foreach (var sc in srList) @@ -96,6 +96,7 @@ namespace KommMit BerechneStunden(fro, entry, c2s, scRo); SetzeHilfeplanInfos(entry, c2s); + // CalculatePaidAmountInReportTimeSpan(entry, c2s, fro.ReportStartDate ?? DateTime.MinValue, fro.ReportEndDate ?? DateTime.MaxValue); } return entry; @@ -155,22 +156,21 @@ namespace KommMit } } - decimal eaInReportTimeSpan = 0; - decimal ea = 0; - if (c2S.SupportConcept.Customer.EquityContribution.HasValue) + decimal eigenanteilRg = 0; + IList eigenanteil = DAOFactory.SearchDAO.GetInvoiceBaseByTypeAndSupportConceptOid(InvoiceType.CustomerEquity, c2S.SupportConcept.Oid.Value); + foreach (var ibEigen in eigenanteil) { - ea = c2S.SupportConcept.Customer.EquityContribution.Value; - if (c2S.StartDate.HasValue) + if (ibEigen.InvoiceDate >= c2S.StartDate && (ibEigen.InvoiceDate <= fro.ReportEndDate || ibEigen.AccountingPeriodEnd <= fro.ReportEndDate)) { - var monthDiff = 12 * (c2S.StartDate.Value.Year - fro.ReportEndDate.Value.Year) + c2S.StartDate.Value.Month - fro.ReportEndDate.Value.Month + 1; - eaInReportTimeSpan = ea * monthDiff; - entry.Eigenanteil = -eaInReportTimeSpan; + foreach (var ii in ibEigen.InvoiceItems) + { + eigenanteilRg += ii.AmountTotal ?? 0; + } } - else - scRo.Custom1 = "Fehler"; } - entry.Claim = scRo.AmountInReportTimeSpan + eaInReportTimeSpan - scRo.AmountPaid; + entry.Eigenanteil = eigenanteilRg; + entry.Claim = scRo.AmountInReportTimeSpan - eigenanteilRg - scRo.AmountPaid; } } @@ -179,8 +179,10 @@ namespace KommMit entry.BewilligungStart = c2s.StartDate; entry.BewilligungEnde = c2s.EndDate; } + } + public class CustomFinanzauswertungRO { public List Entries { get; set; } diff --git a/ReportImp/KomMitBewo/KomMitBewo.csproj b/ReportImp/KomMitBewo/KomMitBewo.csproj index 4b67ff2a6..821012cc5 100644 --- a/ReportImp/KomMitBewo/KomMitBewo.csproj +++ b/ReportImp/KomMitBewo/KomMitBewo.csproj @@ -75,12 +75,6 @@ Mitarbeiterstundenkonto.cs - - Component - - - RechnungSelbstzahlerDue.cs - Component @@ -117,9 +111,6 @@ Designer - - RechnungSelbstzahlerDue.cs - ServicesOverviewReport.cs