29 lines
856 B
C#
29 lines
856 B
C#
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)
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
return new InvoiceCreation();
|
|
}
|
|
}
|
|
}
|