Files
2026-08-05 12:57:23 +02:00

37 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace VereinZurIntegrationChemnitz.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
foreach (var list in supportConcepts2ServiceRecords.Values)
{
foreach (var sr in list)
{
var cat = sr.ServiceDescription.Category;
if (sr.CostBearer != null && !sr.CostBearer.Name.Contains("LWL") && !sr.CostBearer.Name.Contains("LVR") &&
!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("soziotherapie"))
{
return new SoziotherapieInvoiceCreation();
}
else if (cat.Name.ToLower().Contains("einfache pauschale") || cat.Name.ToLower().Contains("doppelte pauschale"))
return new WBWInvoiceCreation();
else if (cat.Name.ToLower().Contains("bw 67-69"))
return new ABW67InvoiceCreation();
}
}
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
}
}
}