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

31 lines
842 B
C#

using System;
using System.Collections.Generic;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace SkmKrefeld.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)
{
var cat = sr.ServiceDescription.Category;
if (!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("dienstleistungsstunde"))
{
return new BeWo67InvoiceCreation();
}
}
}
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
}
}
}