SBBMainzReports/Invoicing/ Fortsetzung neue Abrechnungen
This commit is contained in:
@@ -18,10 +18,12 @@ using System.Text;
|
||||
|
||||
namespace SBBMainzReports.Invoicing
|
||||
{
|
||||
public class CustomInvoiceCreationQA : InvoiceCreation
|
||||
{
|
||||
public class CustomInvoiceCreationQA : InvoiceCreation
|
||||
{
|
||||
// Bei QA werden werden pauschal die bewilligten Stunden pro Woche abgerechnet
|
||||
// nur wenn ein Kontingent bewilligt wurde, wird es nach Zeiterfassung abgerechnet
|
||||
|
||||
bool bienen_ = false;
|
||||
public override void SetInvoiceItems(ServiceInvoice invoice,
|
||||
ServiceInvoicePeriod serviceInvoicePeriod,
|
||||
SupportConceptApprovalPeriodDC supportConceptApprovalPeriod,
|
||||
@@ -41,12 +43,15 @@ namespace SBBMainzReports.Invoicing
|
||||
i.ServiceDescription.Category.ServiceCategoryOid;
|
||||
return valid;
|
||||
}).ToList();
|
||||
|
||||
if (cb2sc.CustomerReferenceNumber.Trim().EndsWith("b") || cb2sc.AuswahlBezeichnung.Trim().ToLower().Contains("bienen"))
|
||||
{
|
||||
bienen_ = true;
|
||||
}
|
||||
if (ShouldCreateFixedAmounts(serviceInvoicePeriod, supportConceptApprovalPeriod, cb2sc))
|
||||
{
|
||||
CreateFixedAmounts(serviceInvoicePeriod, supportConceptApprovalPeriod, cb2sc);
|
||||
// Erweiterung um Wegepauschale
|
||||
if (serviceRecordsInPeriod.Count > 0)
|
||||
if (serviceRecordsInPeriod.Count > 0 && !bienen_)
|
||||
{
|
||||
InvoiceItem wg = null;
|
||||
wg = CreateWegepauschale(serviceRecordsInPeriod, invoicePeriod, serviceInvoicePeriod.SupportConceptApprovalPeriod);
|
||||
@@ -148,6 +153,7 @@ namespace SBBMainzReports.Invoicing
|
||||
ItemPeriodStart = serviceInvoicePeriod.Start,
|
||||
ItemPeriodEnd = serviceInvoicePeriod.End,
|
||||
AmountPerUnit = hourlyRate.Value,
|
||||
ItemDescription = "Fachleistungseinheiten/Woche",
|
||||
UnitCount = approvedHours
|
||||
});
|
||||
}
|
||||
@@ -158,7 +164,7 @@ namespace SBBMainzReports.Invoicing
|
||||
{
|
||||
var list = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
|
||||
InvoiceItem wg = null;
|
||||
if (list.Count > 0)
|
||||
if (list.Count > 0 && !bienen_)
|
||||
{
|
||||
wg = CreateWegepauschale(serviceRecordsInPeriod, invoicePeriod, scap);
|
||||
if (wg != null)
|
||||
@@ -188,8 +194,7 @@ namespace SBBMainzReports.Invoicing
|
||||
invoiceItem.ItemPeriodEnd = invoicePeriod.EndDate;
|
||||
invoiceItem.RateFactor = null;
|
||||
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
|
||||
invoiceItem.ItemDescription = "Wegepauschale";
|
||||
invoiceItem.UnitDescription = "Stk";
|
||||
invoiceItem.ItemDescription = "Wegepauschale/Wocche";
|
||||
if (scap != null)
|
||||
{
|
||||
invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid;
|
||||
@@ -199,5 +204,27 @@ namespace SBBMainzReports.Invoicing
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer)
|
||||
{
|
||||
base.SetRecipientInformation(serviceInvoice, costBearer);
|
||||
if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null)
|
||||
{
|
||||
var refNumber = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CustomerReferenceNumber;
|
||||
if (!string.IsNullOrEmpty(refNumber))
|
||||
{
|
||||
var parts = refNumber.Split('.');
|
||||
if (parts.Length == 3 && parts[0].Trim() == "50" && int.TryParse(parts[1].Trim(), out _))
|
||||
{
|
||||
string sachgebiet = parts[1].Trim();
|
||||
string suffix = $"Sachgebiet {sachgebiet}";
|
||||
if (string.IsNullOrEmpty(serviceInvoice.InvoiceBase.RecipientDivision))
|
||||
serviceInvoice.InvoiceBase.RecipientDivision = suffix;
|
||||
else if (!serviceInvoice.InvoiceBase.RecipientDivision.EndsWith(suffix))
|
||||
serviceInvoice.InvoiceBase.RecipientDivision += $" {suffix}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,17 @@ namespace SbbMainzReports.Invoicing
|
||||
{
|
||||
foreach (var sr in list)
|
||||
{
|
||||
//if (sr.CostBearer != null)
|
||||
//{
|
||||
// if (sr.CostBearer.Name.Contains("besW"))
|
||||
// {
|
||||
// return new CollectiveInvoiceCreation();
|
||||
// }
|
||||
//}
|
||||
if (sr.CostBearer != null && sr.CostBearer.Function != null)
|
||||
{
|
||||
if (sr.CostBearer.Function.ToLower().Contains("qa") || sr.CostBearer.Function.ToLower().Contains("bienen"))
|
||||
{
|
||||
return new CustomInvoiceCreationQA();
|
||||
}
|
||||
if (sr.CostBearer.Function.ToLower().Contains("ts") || sr.CostBearer.Function.ToLower().Contains("tagesstätte"))
|
||||
{
|
||||
return new CustomInvoiceCreationTS();
|
||||
}
|
||||
}
|
||||
var sd = sr.ServiceDescription.Category;
|
||||
var ic = GetInvoiceCreatorForCategory(sd);
|
||||
if (ic != null)
|
||||
|
||||
@@ -60,6 +60,14 @@ namespace SBBMainzReports
|
||||
{
|
||||
lblUeberschrift.Text = "Hilfe zur Erziehung gemäß § 27 ff SGB VIII i.V. m. § 30 SGB VIII - \nErziehungsbeistandschaft";
|
||||
}
|
||||
if (sip.ServiceInvoiceItems.Any(i => i.ServiceDescription != null && i.ServiceDescription.Contains("QA")))
|
||||
{
|
||||
lblUeberschrift.Text = "Qualifizierte Assistenz im Rahmen der Eingliederungshilfe \ngem. § 99 i.V.m. §§ 113-116 SGB IX";
|
||||
}
|
||||
if (sip.ServiceInvoiceItems.Any(i => i.ServiceDescription != null && i.ServiceDescription.Contains("Tagesstätte")))
|
||||
{
|
||||
lblUeberschrift.Text = "Gewährung von Eingliederungshilfe für Menschen mit Behinderung nach SGB IX";
|
||||
}
|
||||
foreach (var ii in sip.ServiceInvoiceItems)
|
||||
{
|
||||
if (!ii.ServiceDescription.ToLower().Contains("handgeld") && !ii.ServiceDescription.ToLower().Contains("hangeld"))
|
||||
|
||||
Reference in New Issue
Block a user