KomMitBewo

This commit is contained in:
Alexandra
2022-01-24 17:29:46 +01:00
parent aef19b2689
commit e2eb3dde62
2 changed files with 14 additions and 21 deletions

View File

@@ -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<SupportConcept>();
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<InvoiceBase> 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<CustomFinanzauswertungEntry> Entries { get; set; }

View File

@@ -75,12 +75,6 @@
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RechnungSelbstzahlerDue.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="RechnungSelbstzahlerDue.Designer.cs">
<DependentUpon>RechnungSelbstzahlerDue.cs</DependentUpon>
</Compile>
<Compile Include="ServicesOverviewReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -117,9 +111,6 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="RechnungSelbstzahlerDue.resx">
<DependentUpon>RechnungSelbstzahlerDue.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ServicesOverviewReport.resx">
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
</EmbeddedResource>