2022-08-02 13:08:53 +02:00
|
|
|
|
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 Akgg.Invoicing
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CustomInvoiceFactory : InvoiceFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
|
|
|
|
|
{
|
2022-08-08 11:06:14 +02:00
|
|
|
|
foreach (var list in supportConcepts2ServiceRecords.Values)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var sr in list)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sr.CostBearer != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sr.CostBearer.Name.Contains("(PK)"))
|
|
|
|
|
|
{
|
2022-09-02 13:34:16 +02:00
|
|
|
|
return new CustomInvoiceCreationPK();
|
2022-08-08 11:06:14 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-09-06 13:27:08 +02:00
|
|
|
|
return new CustomInvoiceCreation();
|
2022-08-02 13:08:53 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|