2021-04-28 22:50:08 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using BeWo.Data.Entities;
|
|
|
|
|
|
using BeWo.Service.Invoicing;
|
|
|
|
|
|
using BS.Shared.DataContracts;
|
|
|
|
|
|
using BS.Shared.DataContracts.Compact;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TeamPfeil.Invoicing
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CustomInvoiceFactory : InvoiceFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
|
|
|
|
|
{
|
2023-05-16 10:37:26 +02:00
|
|
|
|
foreach (var list in supportConcepts2ServiceRecords.Values)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var sr in list)
|
|
|
|
|
|
{
|
2023-11-29 11:00:41 +01:00
|
|
|
|
if (sr.CostBearer.Name.Contains("Modellprojekt") || (sr.CostBearer.Name.Contains("Schwaben") || sr.CostBearer.Name.Contains("Berkmann") && sr.Start >= new DateTime(2023, 6, 1)))
|
2023-05-16 10:37:26 +02:00
|
|
|
|
{
|
|
|
|
|
|
return new CustomInvoiceCreation();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-04-28 22:50:08 +02:00
|
|
|
|
return new DefaultInvoiceCreation();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|