diff --git a/ReportImp/AidshilfeEssen/AidshilfeEssen.csproj b/ReportImp/AidshilfeEssen/AidshilfeEssen.csproj index b1b6354d2..07643356e 100644 --- a/ReportImp/AidshilfeEssen/AidshilfeEssen.csproj +++ b/ReportImp/AidshilfeEssen/AidshilfeEssen.csproj @@ -63,6 +63,7 @@ ServiceInvoiceReport.cs + Component diff --git a/ReportImp/AidshilfeEssen/Service/CustomGroupDurationCalculator.cs b/ReportImp/AidshilfeEssen/Service/CustomGroupDurationCalculator.cs new file mode 100644 index 000000000..c58de2fbe --- /dev/null +++ b/ReportImp/AidshilfeEssen/Service/CustomGroupDurationCalculator.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using BeWo.Data.Entities; +using BeWo.Service.Plugins; +using BS.Shared.Core; +using BS.Shared.DataContracts; + +namespace AidshilfeEssen.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("67") && (sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("lvr") || sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("lwl"))) + { + sr.RoundedDuration = Math.Floor(sr.RoundedDuration / 10) * 10; + } + } + } + } +}