2023-02-07 14:42:36 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using BeWo.Data.Entities;
|
|
|
|
|
|
using BeWo.Service.Invoicing;
|
|
|
|
|
|
using BS.Shared.DataContracts;
|
|
|
|
|
|
using BS.Shared.DataContracts.Compact;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SHKService.Invoicing
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CustomInvoiceFactory : InvoiceFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
|
|
|
|
|
{
|
2023-07-13 14:07:52 +02:00
|
|
|
|
foreach (var key in supportConcepts2ServiceRecords.Keys)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!String.IsNullOrEmpty(key.CostBearer) && key.CostBearer.Contains("LWV KAS QAS"))
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CollectiveInvoiceCreation();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!String.IsNullOrEmpty(key.CostBearer) && key.CostBearer.Contains("LWV Hessen"))
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CollectiveInvoiceCreationOld();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-02-07 14:42:36 +01:00
|
|
|
|
return new InvoiceCreation();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|