28 lines
757 B
C#
28 lines
757 B
C#
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using BeWo.Service.Invoicing;
|
|
using BS.Shared.DataContracts;
|
|
using BS.Shared.DataContracts.Compact;
|
|
|
|
namespace CaritasAichachFriedberg.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.Name.Contains("Bezirk"))
|
|
{
|
|
return new CustomInvoiceCreation();
|
|
}
|
|
}
|
|
}
|
|
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
|
|
}
|
|
}
|
|
}
|