_TemplateNeuKunde/Invoicing/SettlementInvoiceCreation - noch geaddet

This commit is contained in:
2026-01-23 10:10:07 +01:00
parent 5d3ce0dd67
commit f8bae09558
2 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
//using BeWo.Data.Entities;
//using BeWo.Service.Invoicing;
//using BS.Shared.DataContracts;
//using BS.Shared.Services;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//namespace TemplateNeuKunde.Invoicing
//{
// public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation
// {
// public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s)
// {
// return false;
// }
//public override bool IsServiceRecordBillable(ServiceRecord iRecord)
//{
// if (iRecord.ServiceDescription.ServiceCategory.Name.Contains("Assistenz"))
// {
// return false;
// }
// return true;
//}
//public override void CalculateSettlementInvoiceApprovedAmounts(Settlement2DC si, SupportConceptCostBearerRelDC relDC, Calculations calc)
//{
// si.ApprovedFLSWeekly = 0;
// si.ApprovedFLS = 0;
// foreach (var sp in relDC.ApprovalPeriodList)
// {
// if (sp.ServiceCategory == null || !sp.ServiceCategory.Name.Contains("Assistenz"))
// {
// si.ApprovedFLSWeekly += calc.GetApprovedHoursPerWeek(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
// decimal flsTotal = calc.GetApprovedHoursTotal(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
// flsTotal = Math.Round(flsTotal, 2, MidpointRounding.AwayFromZero);
// si.ApprovedFLS += flsTotal;
// }
// }
//}
//public override IList<ServiceRecord> GetBillableServiceRecords(CostBearer2SupportConcept c2s)
//{
// return c2s.ServiceRecords.OrderBy(s => s.Start).Where(s => !s.ServiceDescription.ServiceCategory.Name.ToLower().Contains("assistenz")).ToList();
//}
// }
//}

View File

@@ -61,6 +61,7 @@
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\CustomLWLDiggaBerechnung.cs" />
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reporting\CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="Reporting\CustomReportCreator.cs" />