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

24 lines
689 B
C#

using System;
using System.Collections.Generic;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace LyvieKupfer.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("Erstkontakt"))
{
return new CollectiveInvoiceCreation();
}
}
return new CustomInvoiceCreation();
}
}
}