2023-04-05 19:20:56 +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 MobileEV.Invoicing
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CustomInvoiceFactory : InvoiceFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var sc2sr in supportConcepts2ServiceRecords)
|
|
|
|
|
|
{
|
2023-10-17 13:32:44 +02:00
|
|
|
|
if (sc2sr.Key.CostBearer.Contains("Stadt Dortmund") || sc2sr.Key.CostBearer.Contains("Stadt Bergkamen"))
|
2024-02-01 10:33:54 +01:00
|
|
|
|
{
|
2023-04-05 19:20:56 +02:00
|
|
|
|
return new CustomInvoiceCreation();
|
2024-02-01 10:33:54 +01:00
|
|
|
|
}
|
2023-04-05 19:20:56 +02:00
|
|
|
|
}
|
2024-02-01 10:33:54 +01:00
|
|
|
|
foreach (var list in supportConcepts2ServiceRecords.Values)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var sr in list)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sr.CostBearer != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sr.CostBearer.Name.Contains("Selbstzahler"))
|
|
|
|
|
|
{
|
|
|
|
|
|
return new SelbstzahlerInvoiceCreation();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return new InvoiceCreation();
|
2023-04-05 19:20:56 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|