LebenshilfeBadKreuznachFUD/Invoicing - Ergänzung um Pflegesatz Kita

This commit is contained in:
2025-08-13 16:01:18 +02:00
parent 79f686429b
commit d083a9d08d
2 changed files with 63 additions and 19 deletions

View File

@@ -15,7 +15,12 @@ using BS.Shared.Services;
namespace LebenshilfeBadKreuznachFUD.Invoicing
{
// weitgehend normal, für Entlastung kommt eine Hausbesuchspauschale und für Q1 KANN eine Wegevergütung hinzugefügt werden
// Drei Abrechnungsarten:
// 1) Entlastungsleistungen mit Hausbesuchspauschale
// 2) Integrationsdienst nach Qualifikation - aber das über Leistungskategorie geregelt
// 2) bei Q1 KANN eine Wegevergütung hinzugefügt werden, ansonsten können Zuschläge u Weitere Kosten im HP über kurze Bewilligungen ergänzt werden
// 3) Pflegesätze bei Kita und Kindergarten - stumpfe Tagespauschale
public class CustomInvoiceCreation : InvoiceCreation
{
public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod, IList<CompactSupportConceptDC> supportConceptList)
@@ -102,6 +107,16 @@ namespace LebenshilfeBadKreuznachFUD.Invoicing
{
return true;
}
if (supportConceptApprovalPeriod.ServiceCategory != null)
{
List<CostRatePeriodDC> crList = supportConceptApprovalPeriod.ServiceCategory.CostRatePeriods;
AccountingIntervalType? ai = supportConceptApprovalPeriod.ServiceCategory.AccountingInterval;
if (ai.HasValue && crList.Count(c => c.CostRateValue.HasValue) > 0)
{
return ai.Value != AccountingIntervalType.Hourly;
}
}
return false;
}
@@ -204,21 +219,41 @@ namespace LebenshilfeBadKreuznachFUD.Invoicing
desc = supportConceptApprovalPeriod.ServiceCategory.Name;
}
}
foreach (var billingData in data)
{
serviceInvoicePeriod.InvoiceItemList.Add(new InvoiceItem
if (desc.Contains("Pflegesatz"))
{
if (data != null && data.Count > 0)
{
serviceInvoicePeriod.InvoiceItemList.Add(new InvoiceItem
{
ItemPeriodStart = data[0].BillingPeriodStart,
ItemPeriodEnd = data[0].BillingPeriodEnd,
AccountingInterval = data[0].AccountingInterval,
AmountPerUnit = data[0].AmountTotal,
UnitCount = data.Count,
UnitDescription = "Tage",
AmountTotal = data[0].AmountTotal * data.Count,
GrossAmountTotal = data[0].AmountTotal * data.Count,
ItemDescription = desc
});
}
}
else
{
foreach (var billingData in data)
{
AmountTotal = billingData.AmountTotal,
GrossAmountTotal = billingData.GrossAmountTotal,
ItemPeriodStart = billingData.BillingPeriodStart,
ItemPeriodEnd = billingData.BillingPeriodEnd,
AccountingInterval = billingData.AccountingInterval,
AmountPerUnit = billingData.AmountPerUnit,
UnitCount = billingData.UnitCount,
UnitDescription = "Stk",
ItemDescription = desc
});
serviceInvoicePeriod.InvoiceItemList.Add(new InvoiceItem
{
AmountTotal = billingData.AmountTotal,
GrossAmountTotal = billingData.GrossAmountTotal,
ItemPeriodStart = billingData.BillingPeriodStart,
ItemPeriodEnd = billingData.BillingPeriodEnd,
AccountingInterval = billingData.AccountingInterval,
AmountPerUnit = billingData.AmountPerUnit,
UnitCount = billingData.UnitCount,
UnitDescription = "Stk",
ItemDescription = desc
});
}
}
}

View File

@@ -19,13 +19,17 @@ namespace LebenshilfeBadKreuznachFUD
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
bool entlastung = false;
string art = "";
decimal hours = 0;
if (pRO.ServiceInvoicePeriods != null)
{
if (pRO.ServiceInvoicePeriods.Any(s => s.SupportConceptApprovalPeriod.ServiceCategory.Name.ToLower().Contains("entlastung")))
if (pRO.ServiceInvoicePeriods.Any(s => (s.SupportConceptApprovalPeriod.ServiceCategory?.Name.ToLower() ?? "").Contains("entlastung")))
{
entlastung = true;
art = "entlastung";
}
if (pRO.ServiceInvoicePeriods.Any(s => (s.SupportConceptApprovalPeriod.ServiceCategory?.Name.ToLower() ?? "").Contains("pflegesatz")))
{
art = "pflegesatz";
}
foreach (var sip in pRO.ServiceInvoicePeriods)
{
@@ -39,13 +43,18 @@ namespace LebenshilfeBadKreuznachFUD
}
}
if (entlastung)
if (art == "entlastung")
{
lblZahlziel.Visible = true;
lblIk.Visible = true;
lblZahlziel.Text = String.Format("(bis {0:dd.MM.yyyy})", pRO.InvoiceDateTime.Value.AddDays(30));
lblZahlzeit.Text = "30 Tage";
}
else if (art == "pflegesatz")
{
lblVers.Text = String.Format("Aktenzeichen {0}", pRO.CustomerReferenceNumber);
lblHeader.Text = "Eingliederungshilfe nach SGB IX";
}
else
{
lblVers.Text = String.Format("Aktenzeichen {0}", pRO.CustomerReferenceNumber);