Files
BeWoPlaner/ReportImp/Wabe/Invoicing/CustomInvoiceFactory.cs
2024-06-19 16:54:35 +02:00

32 lines
795 B
C#

using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace Wabe.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)
{
if (sr.CostBearer != null && sr.CostBearer.Name.Contains("Bezirk Mittelfranken"))
{
return new StationaerInvoiceCreation();
}
}
}
return new AbwInvoiceCreation();
}
}
}