Files
BeWoPlaner/ReportImp/Wabe/Invoicing/CustomInvoiceFactory.cs

33 lines
895 B
C#
Raw Normal View History

2024-06-19 16:54:35 +02:00
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") || sr.CostBearer.Name.Contains("Oberpfalz") ||
sr.CostBearer.Name.Contains("Oberfranken"))
2024-06-19 16:54:35 +02:00
{
2024-07-31 08:27:02 +02:00
return new CollectiveInvoiceCreation();
2024-06-19 16:54:35 +02:00
}
}
}
2024-07-31 08:27:02 +02:00
return new DefaultInvoiceCreation();
2024-06-19 16:54:35 +02:00
}
}
}