Files
BeWoPlaner/ReportImp/AlzeyTeilhabe/Invoicing/CustomInvoiceFactory.cs
2021-05-24 21:40:02 +02:00

37 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace AlzeyTeilhabe.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
// foreach (var item in supportConcepts2ServiceRecords)
// {
// var csc = item.Key;
// var cb2sc = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(csc.CostBearerRelOids[0]);
// var org = cb2sc.CostBearer.Organisation;
// if (org.Name != null && (org.Name.Contains("Jugendamt") || org.Name.Contains("Amt für Soziales, Pflege und Wohnen")))
// {
// return new JugendamtInvoiceCreation();
// }
// }
return new DefaultInvoiceCreation();
}
}
}