DiakonieKKKleve/Calculations/GroupDurationCalculator für Soziotherapie
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace DiakonieKKKleve.Calculations
|
||||
{
|
||||
public class CustomGroupDurationCalculator : GroupDurationCalculator
|
||||
{
|
||||
public override void CalculateGroupDuration(ServiceRecordGroup group)
|
||||
{
|
||||
base.CalculateGroupDuration(group);
|
||||
|
||||
foreach (var sr in group.ServiceRecordList)
|
||||
{
|
||||
if (sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("therapieeinheit"))
|
||||
{
|
||||
sr.RoundedDuration = sr.GroupRoundedDuration.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,7 @@
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Calculations\GroupDurationCalculator.cs" />
|
||||
<Compile Include="DiakonieKKKleveMitarbeiterstundenkontoBerechnung.cs" />
|
||||
<Compile Include="Finanzauswertung.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList,
|
||||
DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth)
|
||||
DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc, bool summaryPerMonth)
|
||||
{
|
||||
var newlist = new List<InvoiceItem>();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
{
|
||||
public class DiakoneKKKleveDefaultInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
|
||||
{
|
||||
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
//alle Preise außer LVR werden inkl. Faktor von denen eingetragen - funktioniert natürlich nicht für Fehlkontakte :-(
|
||||
@@ -27,7 +27,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap,
|
||||
Calculations calc)
|
||||
BS.Shared.Services.Calculations calc)
|
||||
{
|
||||
return itemList;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
invoice.AmountEquityContribution = equity;
|
||||
}
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
|
||||
{
|
||||
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
return ii;
|
||||
}
|
||||
|
||||
public virtual InvoiceItem CreateInvoiceItemFactor(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
public virtual InvoiceItem CreateInvoiceItemFactor(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
|
||||
{
|
||||
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap,
|
||||
Calculations calc)
|
||||
BS.Shared.Services.Calculations calc)
|
||||
{
|
||||
var list = new List<InvoiceItem>();
|
||||
//if (scap.CostBearer2SupportConcept.CostBearer.Organisation.Name.Contains("Techniker Krankenkasse"))
|
||||
@@ -261,7 +261,7 @@ namespace DiakonieKKKleve.Invoicing
|
||||
return items;
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
|
||||
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
|
||||
{
|
||||
return base.CreateSummaryInvoiceItems(itemList, invoicePeriod, scap, calc, true, true);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace DiakonieKKKleve
|
||||
if (pRO.ServiceInvoicePeriods.Count > 0)
|
||||
{
|
||||
var c2s = pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept;
|
||||
Calculations clc = Calculations.GetInstance(c2s.CostBearer.ID);
|
||||
BS.Shared.Services.Calculations clc = BS.Shared.Services.Calculations.GetInstance(c2s.CostBearer.ID);
|
||||
var relDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(c2s);
|
||||
bewilligt = clc.GetApprovedHoursTotal(relDc, false) ?? 0;
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace DiakonieKKKleve.Reporting
|
||||
if (!customerOid2Hours.ContainsKey(customerOid))
|
||||
customerOid2Hours.Add(customerOid, 0);
|
||||
|
||||
var calc = PluginLoader.FindClass<Calculations>(c2s.CostBearer.ID) ?? Calculations.GetInstance(c2s.CostBearer.ID);
|
||||
var calc = PluginLoader.FindClass<BS.Shared.Services.Calculations>(c2s.CostBearer.ID) ?? BS.Shared.Services.Calculations.GetInstance(c2s.CostBearer.ID);
|
||||
|
||||
SupportConceptCostBearerRelDC relDC =
|
||||
MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(c2s);
|
||||
|
||||
Reference in New Issue
Block a user