diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 11dc207b1..b44b598cd 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -190,7 +190,6 @@ namespace BeWo
bool isEndDateVisible = false;
bool isOnlyYearMonthVisible = false;
bool isZeiterfassDateNormal = true;
- bool isZeiterfassungInStdMin = false;
int lastSelectedStundenkontoIntervall = 3;
bool showSignatures = false;
bool showBetrag = false;
@@ -251,13 +250,17 @@ namespace BeWo
isOnlyYearMonthVisible = true;
}
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsZeiterfassungInStdMin);
- if(val != null && val.Equals("1"))
- {
- isZeiterfassungInStdMin = true;
+ AppSettings.EinheitZeiterfassung = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EinheitZeiterfassung);
+ if (String.IsNullOrEmpty(AppSettings.EinheitZeiterfassung))
+ {
+ AppSettings.EinheitZeiterfassung = "0";
}
- if(!isZeiterfassungInStdMin)
+ if (AppSettings.EinheitZeiterfassung == "1")
{
+ AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Stunden;
+ }
+ else
+ {
AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
}
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsZeiterfassDateNormal);
@@ -538,7 +541,6 @@ namespace BeWo
AppSettings.IsEndDateVisible = isEndDateVisible;
AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible;
AppSettings.IsZeiterfassDateNormal = isZeiterfassDateNormal;
- AppSettings.IsZeiterfassungInStdMin = isZeiterfassungInStdMin;
AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed;
AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl;
AppSettings.LastSelectedStundenkontoIntervall = lastSelectedStundenkontoIntervall;
diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs
index 014ed218d..ef9534d43 100644
--- a/BeWo/Core/Config/AppSettings.cs
+++ b/BeWo/Core/Config/AppSettings.cs
@@ -18,7 +18,7 @@ namespace BeWo.Core.Config
private bool misZeiterfassDateNormal = true;
- private bool misZeiterfassungInStdMin = true;
+ private String einheitZeiterfassung = "0";
private CustomerFilterEnum _CustomerFilterInZeiterfassung = CustomerFilterEnum.All;
private CustomerFilterEnum _CustomerFilterSupportConcepts = CustomerFilterEnum.All;
@@ -86,10 +86,10 @@ namespace BeWo.Core.Config
set { misZeiterfassDateNormal = value; }
}
- public bool IsZeiterfassungInStdMin
+ public String EinheitZeiterfassung
{
- get { return misZeiterfassungInStdMin; }
- set { misZeiterfassungInStdMin = value; }
+ get { return einheitZeiterfassung; }
+ set { einheitZeiterfassung = value; }
}
public ZeiterfassungsDauer LetzteZeiterfassungsDauer
diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml
index 1225c46b6..d138aaca9 100644
--- a/BeWo/View/Detail/MandatorView.xaml
+++ b/BeWo/View/Detail/MandatorView.xaml
@@ -115,9 +115,10 @@
-
-
-
+
+
+
+
diff --git a/BeWo/View/Detail/MandatorView.xaml.cs b/BeWo/View/Detail/MandatorView.xaml.cs
index f6f4c55c4..a9c3f94f6 100644
--- a/BeWo/View/Detail/MandatorView.xaml.cs
+++ b/BeWo/View/Detail/MandatorView.xaml.cs
@@ -30,6 +30,22 @@ namespace BeWo.View.Detail
GroupOwnChatSettings.Visibility = Visibility.Collapsed;
}
+ ComboZeiteinheit.ItemsSource = new List { "Minuten", "Stunden", "Stunden und Minuten" };
+
+ if (viewModel.EinheitZeiterfassung.Equals("1"))
+ {
+ ComboZeiteinheit.SelectedIndex = 1;
+ }
+ else if (viewModel.EinheitZeiterfassung.Equals("2"))
+ {
+ ComboZeiteinheit.SelectedIndex = 2;
+ }
+ else
+ {
+ ComboZeiteinheit.SelectedIndex = 0;
+ }
+
+
#if DEBUG
var url2 = ServiceFacade.DoOperationsServiceSync(s => s.GetOwnChatSettingsUrl());
HyperlinkOwnChatSettings.NavigateUri = new Uri(url2);
@@ -98,5 +114,22 @@ namespace BeWo.View.Detail
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as Hyperlink).NavigateUri.ToString()));
e.Handled = true;
}
+
+ private void ComboZeiteinheit_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ if (ComboZeiteinheit.SelectedIndex == 1)
+ {
+ ViewModel.EinheitZeiterfassung = "1";
+ }
+ else if (ComboZeiteinheit.SelectedIndex == 2)
+ {
+ ViewModel.EinheitZeiterfassung = "2";
+ }
+ else
+ {
+ ViewModel.EinheitZeiterfassung = "0";
+ }
+
+ }
}
}
\ No newline at end of file
diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml
index 067b27a6f..960a7c26f 100644
--- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml
+++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml
@@ -143,7 +143,7 @@
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
-
+
+
-
+
-
+
-
+
-
-
-
+
+
+
- Debug|Any CPU
+ Release|Any CPU
ShowAllFiles
600
MvcControllerEmptyScaffolder
diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml
index 8b54fc2cb..63fd72578 100644
--- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml
+++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml
@@ -24,28 +24,28 @@
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@*@Html.DevExpress().GetStyleSheets(
diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user
index 47b4326c0..a441248c4 100644
--- a/Host/Host.csproj.user
+++ b/Host/Host.csproj.user
@@ -3,7 +3,7 @@
BeWo2.0
true
- Debug|Any CPU
+ Release|Any CPU
false
diff --git a/Report/ReportObjects/BudgetnachweisAnhangRO.cs b/Report/ReportObjects/BudgetnachweisAnhangRO.cs
index 22e0d71c6..6ddc34e28 100644
--- a/Report/ReportObjects/BudgetnachweisAnhangRO.cs
+++ b/Report/ReportObjects/BudgetnachweisAnhangRO.cs
@@ -189,22 +189,31 @@ namespace BeWo.Report.ReportObjects
foreach (var e in this.Entgeltzeitraeume)
{
+ e.SummeFLStunden = Math.Round(e.SummeFLMinuten / 60, 2, MidpointRounding.AwayFromZero);
+ e.SummeGesamtStunden = Math.Round(((this.RateFactor + 100) / 100) * e.SummeFLStunden, 2, MidpointRounding.AwayFromZero);
+ e.SummeFaktorStunden = e.SummeGesamtStunden - e.SummeFLStunden;
- e.SummeFaktorMinuten = (this.RateFactor / 100) * e.SummeFLMinuten;
+
+
+ //e.SummeFaktorMinuten = (this.RateFactor / 100) * e.SummeFLMinuten;
+ e.SummeFaktorMinuten = e.SummeFaktorStunden * 60;
e.SummeGesamtMinuten = e.SummeFaktorMinuten + e.SummeFLMinuten;
- e.SummeFLStunden = e.SummeFLMinuten / 60;
- e.SummeFaktorStunden = e.SummeFaktorMinuten / 60;
- e.SummeGesamtStunden = e.SummeGesamtMinuten / 60;
+
+ //e.SummeFaktorStunden = e.SummeFaktorMinuten / 60;
+
+ //e.SummeGesamtStunden = e.SummeGesamtMinuten / 60;
this.SummeFLMinuten += e.SummeFLMinuten;
this.SummeFaktorMinuten += e.SummeFaktorMinuten;
this.SummeGesamtMinuten += e.SummeGesamtMinuten;
+
+
+ this.SummeFLStunden += e.SummeFLStunden;
+ this.SummeFaktorStunden += e.SummeFaktorStunden;
+ this.SummeGesamtStunden += e.SummeGesamtStunden;
}
- this.SummeFLStunden = this.SummeFLMinuten / 60;
- this.SummeFaktorStunden = this.SummeFaktorMinuten / 60;
- this.SummeGesamtStunden = this.SummeGesamtMinuten / 60;
}
diff --git a/Report/ReportObjects/ServicesOverviewRO.cs b/Report/ReportObjects/ServicesOverviewRO.cs
index 1e3a77fcc..cf6ec82dc 100644
--- a/Report/ReportObjects/ServicesOverviewRO.cs
+++ b/Report/ReportObjects/ServicesOverviewRO.cs
@@ -1132,7 +1132,7 @@ namespace BeWo.Report.ReportObjects
{
StringBuilder sb = new StringBuilder();
- foreach (AbsenceTime atDb in customer.AbsenceTimes)
+ foreach (AbsenceTime atDb in customer.AbsenceTimes.OrderBy(a => a.Start))
{
if (atDb.AbsenceSpan != null)
diff --git a/ReportImp/AkggMid/AkggMid.csproj b/ReportImp/AkggMid/AkggMid.csproj
index 5de0dadfa..328e777fe 100644
--- a/ReportImp/AkggMid/AkggMid.csproj
+++ b/ReportImp/AkggMid/AkggMid.csproj
@@ -53,6 +53,7 @@
+
Component
diff --git a/ReportImp/AkggMid/LeistungsnachweisHelper.cs b/ReportImp/AkggMid/LeistungsnachweisHelper.cs
new file mode 100644
index 000000000..72ad0d7a7
--- /dev/null
+++ b/ReportImp/AkggMid/LeistungsnachweisHelper.cs
@@ -0,0 +1,350 @@
+using BeWo.Data.Access;
+using BeWo.Report.ReportObjects;
+using BS.Shared.Core;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AkggMid
+{
+ public class LeistungsnachweisHelper
+ {
+ public static List ErstelleDummyRecords(ServicesOverviewRO pRO)
+ {
+ Dictionary day2Detail = new Dictionary();
+
+ var result = new List();
+ foreach (var sr in pRO.Services)
+ {
+ //result.Add(sr);
+
+ if (!day2Detail.ContainsKey(sr.StartDate.Day))
+ {
+ sr.StartDateString = String.Format("{0:dd}.", sr.StartDate);
+ day2Detail.Add(sr.StartDate.Day, sr);
+ result.Add(sr);
+ }
+ else
+ {
+ var dsr = day2Detail[sr.StartDate.Day];
+ dsr.Minutes += sr.Minutes;
+
+ if (!String.IsNullOrWhiteSpace(sr.Notice))
+ {
+ if (!String.IsNullOrWhiteSpace(dsr.Notice))
+ {
+ dsr.Notice += ", " + sr.Notice;
+ }
+ else
+ {
+ dsr.Notice = sr.Notice;
+ }
+
+ }
+
+ if (!String.IsNullOrWhiteSpace(sr.Notice3))
+ {
+ if (!String.IsNullOrWhiteSpace(dsr.Notice3))
+ {
+ dsr.Notice3 += ", " + sr.Notice3;
+ }
+ else
+ {
+ dsr.Notice3 = sr.Notice3;
+ }
+
+ }
+ if (!String.IsNullOrWhiteSpace(sr.Notice4))
+ {
+ if (!String.IsNullOrWhiteSpace(dsr.Notice4))
+ {
+ dsr.Notice4 += ", " + sr.Notice4;
+ }
+ else
+ {
+ dsr.Notice4 = sr.Notice4;
+ }
+
+ }
+ }
+ }
+
+ var abrAbwTagDict = GetAbrechenbareAbwesenheiten(pRO);
+
+ for (int i = 1; i <= 31; i++)
+ {
+ if (!day2Detail.ContainsKey(i))
+ {
+ var newSr = new ServicesOverviewRO.ServiceDetail();
+ if (i <= pRO.EndDate.Day)
+ {
+ newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
+ newSr.StartDateString = String.Format("{0:dd}.", newSr.StartDate);
+
+ if (abrAbwTagDict.ContainsKey(newSr.StartDate))
+ {
+ newSr.Minutes = BerechneMinutenProTag(BerechneStundenProWoche(pRO));
+ }
+ }
+ else
+ {
+ newSr.StartDateString = String.Format("{0}.", i);
+ }
+
+ result.Add(newSr);
+ day2Detail.Add(i, newSr);
+ }
+ else
+ {
+ day2Detail[i].Minutes = Rundeauf15Minuten(day2Detail[i].Minutes);
+ }
+ }
+
+ double minutenGesamt = 0;
+ foreach (var record in result)
+ {
+ if (IstAbwesend(pRO, record.StartDate))
+ {
+ record.Notice5 = "x";
+ }
+ else
+ {
+ record.Notice5 = "";
+ }
+ minutenGesamt += record.Minutes;
+ }
+ pRO.TotalFLM = minutenGesamt;
+ return result.OrderBy(r => r.StartDateString).ToList();
+ }
+
+ public static void PruefeWochenBudget(ServicesOverviewRO ro)
+ {
+ Calendar cal = CultureInfo.CurrentCulture.Calendar;
+
+ var ersterTag = new DateTime(ro.StartDate.Year, ro.StartDate.Month, 1);
+ //Laut Herr Kloss darf die Wochenbewilligung nicht überschritten werden und die letzten Einträge einer Kalenderwoche sollen entsprechend gekürzt werden.
+
+ var tempListe = new List();
+ tempListe.AddRange(HoleFehlendeWochentageVormonat(ro));
+
+
+ tempListe.AddRange(ro.Services);
+
+
+ double wochenBudget = BerechneStundenProWoche(ro);
+
+ int kwAktuelleWoche = cal.GetWeekOfYear(ersterTag, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
+ double wochenSumme = 0;
+
+ foreach (var item in tempListe)
+ {
+ // Übertrags Dummy rausfiltern
+ if (item.ServiceDescription == "Übertrag:")
+ continue;
+
+ var kwAktuellerTag = cal.GetWeekOfYear(item.StartDate, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
+ if (kwAktuelleWoche != kwAktuellerTag)
+ {
+ kwAktuelleWoche = kwAktuellerTag;
+ wochenSumme = 0;
+ }
+
+
+ wochenSumme += item.Minutes / 60;
+
+ if (wochenSumme > wochenBudget)
+ {
+ item.Minutes -= (double)(wochenSumme - wochenBudget) * 60;
+ if (item.Minutes < 0)
+ {
+ item.Minutes = 0;
+ }
+ }
+ }
+
+ double minutenGesamt = 0;
+ foreach (var record in ro.Services)
+ {
+ minutenGesamt += record.Minutes;
+ }
+ ro.TotalFLM = minutenGesamt;
+ }
+
+ private static double BerechneStundenProWoche(ServicesOverviewRO ro)
+ {
+ if (ro.SupportConceptCostBearer != null)
+ {
+ foreach (var ap in ro.SupportConceptCostBearer.ApprovalPeriodList)
+ {
+ if (ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("Schulassistenz") && ap.ApprovedBEInterval.Value == BS.Shared.SupportConceptApprovalInterval.Weekly)
+ {
+
+ var wochenBudget = ap.ApprovedBEPerInterval ?? 0;
+
+ decimal prozentualeBetreuung = 0;
+ foreach (var item in ap.SupportConceptApprovalPeriodEmployeeRelations)
+ {
+ if (!item.IsAbsolut)
+ {
+ prozentualeBetreuung += item.Betreuungsschluessel;
+ }
+ }
+
+ if (prozentualeBetreuung > 0)
+ {
+ return (double)(wochenBudget * prozentualeBetreuung / 100);
+ }
+ }
+ }
+ }
+
+ return (double)ro.ApprovedFLSPerWeek;
+ }
+
+ private static IEnumerable HoleFehlendeWochentageVormonat(ServicesOverviewRO ro)
+ {
+ var fehlendeRecords = new List();
+
+ var ersterDesMonats = new DateTime(ro.StartDate.Year, ro.StartDate.Month, 1);
+
+ if (ersterDesMonats.DayOfWeek != DayOfWeek.Monday)
+ {
+ if (ro.SupportConceptCostBearer != null && ro.SupportConceptCostBearer.CostBearer2SupportConceptOid != null)
+ {
+
+ var startDate = ersterDesMonats;
+
+ while (startDate.DayOfWeek != DayOfWeek.Monday)
+ {
+ startDate = startDate.AddDays(-1);
+ }
+
+ var span = new DateTimeSpan(startDate, ersterDesMonats);
+
+ var liste = DAOFactory.SearchDAO.FindServiceRecordsInSpan(ro.SupportConceptCostBearer.CostBearer2SupportConceptOid.Value, span);
+
+ foreach (var item in liste)
+ {
+ var newRecord = new ServicesOverviewRO.ServiceDetail();
+ newRecord.StartDate = item.Start.Value;
+ newRecord.Minutes = (double)item.RoundedDuration;
+
+ fehlendeRecords.Add(newRecord);
+ }
+
+ }
+ }
+
+ return fehlendeRecords.OrderBy(r => r.StartDate);
+
+ }
+
+ public static bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
+ {
+ foreach (var at in pRO.Abwesenheiten)
+ {
+ if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ public static Dictionary GetAbrechenbareAbwesenheiten(ServicesOverviewRO ro)
+ {
+ //Herr Kloss meint, der erste Tag einer Abwesenheit darf ein fünftel der Wochenstundenzahl abgerechnet werden, aber nur bis 5 mal im Zeitraum 01.01.2022 bis 30.06.2022 und bis 10 mal im Schuljahr ab 2023/2024
+
+ DateTime startSchuljahr = DateTime.MinValue;
+ DateTime endeSchuljahr = DateTime.MinValue;
+
+ DateTime dt;
+
+ if (DateTime.TryParse(ro.ApprovedStartDate, out dt))
+ {
+ startSchuljahr = dt;
+ }
+ if (DateTime.TryParse(ro.ApprovedEndDate, out dt))
+ {
+ endeSchuljahr = dt;
+ }
+
+
+ int maxAnzahl = 10;
+
+ if (startSchuljahr < new DateTime(2022, 6, 30))
+ {
+ startSchuljahr = new DateTime(2022, 1, 1);
+ endeSchuljahr = new DateTime(2022, 6, 30);
+
+ maxAnzahl = 5;
+ }
+
+ int gesamtAnzahl = 0;
+
+ Dictionary abrechenbareTage = new Dictionary();
+
+ DateTime lastend = DateTime.MinValue;
+ foreach (var at in ro.Abwesenheiten) //sortieren?
+ {
+ if (at.Start >= startSchuljahr && at.Start <= endeSchuljahr && (at.End == null || at.End >= startSchuljahr))
+ {
+ //Prüfe ob mindestens ein Tag zwischen zwei Abwesenheiten liegt.
+ var days = at.Start.Value.Subtract(lastend).TotalDays;
+ if (days > 1)
+ {
+
+ if (gesamtAnzahl <= maxAnzahl)
+ {
+ abrechenbareTage.Add(at.Start.Value, true);
+
+ gesamtAnzahl++;
+ }
+ }
+ }
+
+ if (at.End.HasValue)
+ {
+ lastend = at.End.Value;
+ }
+ else
+ {
+ lastend = DateTime.MaxValue;
+ }
+ }
+
+ return abrechenbareTage;
+ }
+
+ public static double BerechneMinutenProTag(double flsPerWeek)
+ {
+ var minutenProTag = flsPerWeek * 60 / 5;
+
+ //die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden
+ return Rundeauf15Minuten(minutenProTag);
+
+ }
+
+ public static double Rundeauf15Minuten(double minuten)
+ {
+ var minutenGerundet = minuten;
+
+ //die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden
+ var modulo = minutenGerundet % 15;
+ if (modulo <= 7)
+ {
+ minutenGerundet -= modulo;
+ }
+ else
+ {
+ minutenGerundet += 15 - modulo;
+ }
+ return minutenGerundet;
+ }
+ }
+}
diff --git a/ReportImp/AkggMid/LeistungsnachweisJugendamt.cs b/ReportImp/AkggMid/LeistungsnachweisJugendamt.cs
index 17d71ff85..994f53646 100644
--- a/ReportImp/AkggMid/LeistungsnachweisJugendamt.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisJugendamt.cs
@@ -7,6 +7,9 @@ using System.Data;
using BS.Shared.Core;
using System.Linq;
using System.Text;
+using System.Globalization;
+using BeWo.Data.Access;
+using BeWo.Data.Entities;
namespace AkggMid
{
@@ -22,29 +25,70 @@ namespace AkggMid
{
//SetzeAdresse(pRO); wird nur für den einen Kostenträger verwendet und muss genau so aussehen
+
+ //Ein paar Tests:
+ //var test = BerechneMinutenProTag(19.5m);
+
+ //var test2 = BerechneMinutenProTag(5.0833333333m);
+ //var test3 = BerechneMinutenProTag(5.6666666666m);
+
pRO.Services = ErstelleDummyRecords(pRO);
+ LeistungsnachweisHelper.PruefeWochenBudget(pRO);
+
+ var abrAbwTagDict = LeistungsnachweisHelper.GetAbrechenbareAbwesenheiten(pRO);
+
+ double summe1bis16 = 0;
+ double summeGesamt = 0;
+
+
+
+
foreach (var record in pRO.Services)
{
- if (IstAbwesend(pRO, record.StartDate))
+ if (record.ServiceDescription != "Übertrag:")
{
- record.Notice5 = "x";
+ if (abrAbwTagDict.ContainsKey(record.StartDate.Date))
+ {
+ if (record.Minutes == 0)
+ {
+ record.Minutes = LeistungsnachweisHelper.BerechneMinutenProTag((double)pRO.ApprovedFLSPerWeek);
+ }
+ }
+ record.Minutes = LeistungsnachweisHelper.Rundeauf15Minuten(record.Minutes);
+
+ if (record.StartDate.Day <= 16)
+ {
+ summe1bis16 += record.Minutes;
+ }
+ summeGesamt += record.Minutes;
}
else
{
- record.Notice5 = "";
+ record.Minutes = summe1bis16;
}
}
+
+
var servicesDouble = new List();
int i = 0;
-
foreach (var record in pRO.Services)
{
- ServicesOverviewRO.ServiceDoubleDetail sdd = new ServicesOverviewRO.ServiceDoubleDetail();
+ var sdd = new ServicesOverviewRO.ServiceDoubleDetail();
sdd.Minutes = record.Minutes;
sdd.FLS = sdd.Minutes / 60;
- sdd.FLSString = String.Format("{0:0.00}", sdd.FLS);
+
+ var istAbwesend = LeistungsnachweisHelper.IstAbwesend(pRO, record.StartDate);
+ if (istAbwesend)
+ {
+ sdd.FLSString = String.Format("Schüler*in abwesend {0:0.00}", sdd.FLS);
+ }
+ else
+ {
+ sdd.FLSString = String.Format("{0:0.00}", sdd.FLS);
+ }
+
sdd.ServiceDescription = record.ServiceDescription;
sdd.StartDate = record.StartDate;
@@ -58,15 +102,29 @@ namespace AkggMid
sdd = servicesDouble[i - servicesDouble.Count];
sdd.Minutes2 = record.Minutes;
sdd.FLS2 = sdd.Minutes2 / 60;
- sdd.FLSString2 = String.Format("{0:0.##}", sdd.FLS2);
+
+ if (istAbwesend)
+ {
+ sdd.FLSString2 = String.Format("Schüler*in abwesend {0:0.00}", sdd.FLS2);
+ }
+ else
+ {
+ sdd.FLSString2 = String.Format("{0:0.00}", sdd.FLS2);
+ }
+
sdd.ServiceDescription2 = record.ServiceDescription;
}
+
+
i++;
}
pRO.ServicesDouble = servicesDouble;
+ cellSumme1.Text = String.Format("{0:0.00}", summe1bis16 / 60);
+ pRO.TotalFLM = summeGesamt;
+
this.bindingSource1.DataSource = pRO;
}
@@ -112,10 +170,21 @@ namespace AkggMid
{
var dsr = day2Detail[sr.StartDate.Day];
dsr.Minutes += sr.Minutes;
- if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
- dsr.Notice += ", " + sr.Notice;
- else if (sr.Notice.Length > 0)
- dsr.Notice = sr.Notice;
+ if (!String.IsNullOrWhiteSpace(sr.Notice))
+ {
+ if (!String.IsNullOrWhiteSpace(dsr.Notice))
+ {
+ dsr.Notice += ", " + sr.Notice;
+ }
+ else
+ {
+ dsr.Notice = sr.Notice;
+ }
+
+ }
+
+
+
}
}
@@ -169,18 +238,7 @@ namespace AkggMid
return result;
}
- private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
- {
- foreach (var at in pRO.Abwesenheiten)
- {
- if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
- {
- return true;
- }
- }
-
- return false;
- }
+
}
}
diff --git a/ReportImp/AkggMid/LeistungsnachweisJugendamt.designer.cs b/ReportImp/AkggMid/LeistungsnachweisJugendamt.designer.cs
index db91b0468..86500845e 100644
--- a/ReportImp/AkggMid/LeistungsnachweisJugendamt.designer.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisJugendamt.designer.cs
@@ -81,14 +81,14 @@ namespace AkggMid
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
- this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
+ this.cellSumme1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
- this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
+ this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
@@ -137,13 +137,13 @@ namespace AkggMid
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
- new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.ServiceDescription", "{0:dd}.")});
+ new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.ServiceDescription")});
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UsePadding = false;
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
- this.xrTableCell7.Weight = 0.22758625493133233D;
+ this.xrTableCell7.Weight = 0.17931038221254292D;
//
// xrTableCell10
//
@@ -152,7 +152,7 @@ namespace AkggMid
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.StylePriority.UseTextAlignment = false;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell10.Weight = 0.22758625782670833D;
+ this.xrTableCell10.Weight = 0.27586213054549774D;
//
// xrTableCell1
//
@@ -162,17 +162,16 @@ namespace AkggMid
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "xrTableCell1";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
- this.xrTableCell1.Weight = 0.22758625782670833D;
+ this.xrTableCell1.Weight = 0.17931038510791891D;
//
// xrTableCell3
//
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
- new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.FLSString2", "{0:0.00}")});
+ new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.FLSString2")});
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.StylePriority.UseTextAlignment = false;
- this.xrTableCell3.Text = "xrTableCell3";
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell3.Weight = 0.22758625782670833D;
+ this.xrTableCell3.Weight = 0.27586213054549774D;
//
// ruleIstFerien
//
@@ -259,7 +258,7 @@ namespace AkggMid
this.lblAdresse,
this.xrLabel2,
this.xrRichText1});
- this.ReportHeader.HeightF = 451.8749F;
+ this.ReportHeader.HeightF = 451.875F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseTextAlignment = false;
this.ReportHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
@@ -267,7 +266,7 @@ namespace AkggMid
// xrLabel14
//
this.xrLabel14.Borders = DevExpress.XtraPrinting.BorderSide.None;
- this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(573.875F, 359.3749F);
+ this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(575.5416F, 348.9582F);
this.xrLabel14.Multiline = true;
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -281,7 +280,7 @@ namespace AkggMid
// xrLabel13
//
this.xrLabel13.Borders = DevExpress.XtraPrinting.BorderSide.None;
- this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(548.3333F, 359.3749F);
+ this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(550F, 348.9582F);
this.xrLabel13.Multiline = true;
this.xrLabel13.Name = "xrLabel13";
this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -295,7 +294,7 @@ namespace AkggMid
// xrLabel12
//
this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None;
- this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(308.5F, 359.3749F);
+ this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(310.1666F, 348.9582F);
this.xrLabel12.Multiline = true;
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -324,7 +323,7 @@ namespace AkggMid
// xrLabel10
//
this.xrLabel10.Borders = DevExpress.XtraPrinting.BorderSide.None;
- this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(240F, 359.3749F);
+ this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(241.6667F, 348.9582F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -338,7 +337,7 @@ namespace AkggMid
// xrLabel9
//
this.xrLabel9.Borders = DevExpress.XtraPrinting.BorderSide.Top;
- this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(573.8749F, 379.9999F);
+ this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(575.5416F, 369.5832F);
this.xrLabel9.Multiline = true;
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -351,7 +350,7 @@ namespace AkggMid
// xrLabel8
//
this.xrLabel8.Borders = DevExpress.XtraPrinting.BorderSide.Top;
- this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(308.5F, 379.9999F);
+ this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(310.1666F, 369.5832F);
this.xrLabel8.Multiline = true;
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -537,25 +536,25 @@ namespace AkggMid
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.Text = "Datum";
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
- this.xrTableCell2.Weight = 0.22758629166994071D;
+ this.xrTableCell2.Weight = 0.17931041215187443D;
//
// xrTableCell22
//
this.xrTableCell22.Name = "xrTableCell22";
this.xrTableCell22.Text = "Stundenzahl";
- this.xrTableCell22.Weight = 0.2275862878999268D;
+ this.xrTableCell22.Weight = 0.27586216741799308D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Datum";
- this.xrTableCell5.Weight = 0.22758628852826243D;
+ this.xrTableCell5.Weight = 0.17931040901019618D;
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Text = "Stundenzahl";
- this.xrTableCell4.Weight = 0.22758628852826243D;
+ this.xrTableCell4.Weight = 0.27586216804632868D;
//
// xrTableRow4
//
@@ -574,22 +573,22 @@ namespace AkggMid
this.xrTableCell6.StylePriority.UsePadding = false;
this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
- this.xrTableCell6.Weight = 0.22758629166994071D;
+ this.xrTableCell6.Weight = 0.17931041215187443D;
//
// xrTableCell8
//
this.xrTableCell8.Name = "xrTableCell8";
- this.xrTableCell8.Weight = 0.2275862878999268D;
+ this.xrTableCell8.Weight = 0.27586216741799308D;
//
// xrTableCell9
//
this.xrTableCell9.Name = "xrTableCell9";
- this.xrTableCell9.Weight = 0.22758628852826243D;
+ this.xrTableCell9.Weight = 0.17931040901019618D;
//
// xrTableCell11
//
this.xrTableCell11.Name = "xrTableCell11";
- this.xrTableCell11.Weight = 0.22758628852826243D;
+ this.xrTableCell11.Weight = 0.27586216804632868D;
//
// GroupFooter1
//
@@ -622,7 +621,7 @@ namespace AkggMid
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell12,
- this.xrTableCell13,
+ this.cellSumme1,
this.xrTableCell14,
this.xrTableCell15});
this.xrTableRow2.FormattingRules.Add(this.ruleIstFerien);
@@ -637,14 +636,15 @@ namespace AkggMid
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.Text = "Summe:";
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
- this.xrTableCell12.Weight = 0.22758625493133233D;
+ this.xrTableCell12.Weight = 0.17931038221254295D;
//
- // xrTableCell13
+ // cellSumme1
//
- this.xrTableCell13.Name = "xrTableCell13";
- this.xrTableCell13.StylePriority.UseTextAlignment = false;
- this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell13.Weight = 0.22758625782670833D;
+ this.cellSumme1.Name = "cellSumme1";
+ this.cellSumme1.StylePriority.UseTextAlignment = false;
+ this.cellSumme1.Text = "Schüler*in abwesend 0.00";
+ this.cellSumme1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+ this.cellSumme1.Weight = 0.27586213054549774D;
//
// xrTableCell14
//
@@ -654,7 +654,7 @@ namespace AkggMid
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.Text = "Gesamt:";
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
- this.xrTableCell14.Weight = 0.22758625782670833D;
+ this.xrTableCell14.Weight = 0.17931038510791891D;
//
// xrTableCell15
//
@@ -664,7 +664,7 @@ namespace AkggMid
this.xrTableCell15.StylePriority.UseTextAlignment = false;
this.xrTableCell15.Text = "xrTableCell3";
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell15.Weight = 0.22758625782670833D;
+ this.xrTableCell15.Weight = 0.27586213054549774D;
//
// xrLabel6
//
@@ -696,10 +696,6 @@ namespace AkggMid
this.xrLabel5.Text = "(Unterschrift Mitarbeiter Schulassistenz)";
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
- // bindingSource1
- //
- this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
- //
// fieldStd
//
this.fieldStd.DataMember = "Services";
@@ -713,6 +709,10 @@ namespace AkggMid
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldTotalStd.Name = "fieldTotalStd";
//
+ // bindingSource1
+ //
+ this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
+ //
// LeistungsnachweisJugendamt
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -796,7 +796,7 @@ namespace AkggMid
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
- private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
+ private DevExpress.XtraReports.UI.XRTableCell cellSumme1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs
index 632b9a1c2..8c238b026 100644
--- a/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisSozialamt.cs
@@ -37,20 +37,10 @@ namespace AkggMid
- pRO.Services = ErstelleDummyRecords(pRO);
+ pRO.Services = LeistungsnachweisHelper.ErstelleDummyRecords(pRO);
+
+ LeistungsnachweisHelper.PruefeWochenBudget(pRO);
- foreach (var record in pRO.Services)
- {
- if (IstAbwesend(pRO, record.StartDate))
- {
- record.Notice5 = "x";
- }
- else
- {
- record.Notice5 = "";
- }
-
- }
lblWegbegleitung.Text = String.Format("Kostenzusicherung: bis zu {0:0.00} Stunden pro Woche", pRO.ApprovedFLSPerWeek);
if (pRO.CustomerOid > 0)
{
@@ -75,64 +65,6 @@ namespace AkggMid
this.bindingSource1.DataSource = pRO;
}
- private List ErstelleDummyRecords(ServicesOverviewRO pRO)
- {
- Dictionary day2Detail = new Dictionary();
-
- var result = new List();
- foreach (var sr in pRO.Services)
- {
- //result.Add(sr);
-
- if (!day2Detail.ContainsKey(sr.StartDate.Day))
- {
- sr.StartDateString = String.Format("{0:dd}", sr.StartDate);
- day2Detail.Add(sr.StartDate.Day, sr);
- result.Add(sr);
- }
- else
- {
- var dsr = day2Detail[sr.StartDate.Day];
- dsr.Minutes += sr.Minutes;
- if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
- dsr.Notice += ", " + sr.Notice;
- else if (sr.Notice.Length > 0)
- dsr.Notice = sr.Notice;
- }
- }
-
- for (int i = 1; i <= 31; i++)
- {
- if (!day2Detail.ContainsKey(i))
- {
- var newSr = new ServicesOverviewRO.ServiceDetail();
- if (i <= pRO.EndDate.Day)
- {
- newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
- newSr.StartDateString = String.Format("{0:dd}", newSr.StartDate);
- }
- else
- newSr.StartDateString = String.Format("{0}.", i);
-
- result.Add(newSr);
- day2Detail.Add(i, newSr);
- }
- }
- return result.OrderBy(r => r.StartDate).ToList();
- }
-
- private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
- {
- foreach (var at in pRO.Abwesenheiten)
- {
- if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
- {
- return true;
- }
- }
-
- return false;
- }
}
}
diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs
index d23351d89..5e445e2b2 100644
--- a/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisSozialamt.designer.cs
@@ -70,9 +70,9 @@ namespace AkggMid
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
- this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
+ this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -118,7 +118,7 @@ namespace AkggMid
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
- new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString", "{0}")});
+ new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString")});
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
@@ -518,10 +518,6 @@ namespace AkggMid
this.xrLabel1.Text = "Summe der gel. Stunden: [fieldTotalStd!0.00]";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
//
- // bindingSource1
- //
- this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
- //
// fieldStd
//
this.fieldStd.DataMember = "Services";
@@ -535,6 +531,10 @@ namespace AkggMid
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldTotalStd.Name = "fieldTotalStd";
//
+ // bindingSource1
+ //
+ this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
+ //
// LeistungsnachweisSozialamt
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs
index 55a64dbf0..3c6fa6361 100644
--- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.cs
@@ -37,20 +37,10 @@ namespace AkggMid
- pRO.Services = ErstelleDummyRecords(pRO);
+ pRO.Services = LeistungsnachweisHelper.ErstelleDummyRecords(pRO);
+
+ LeistungsnachweisHelper.PruefeWochenBudget(pRO);
- foreach (var record in pRO.Services)
- {
- if (IstAbwesend(pRO, record.StartDate))
- {
- record.Notice5 = "x";
- }
- else
- {
- record.Notice5 = "";
- }
-
- }
lblWegbegleitung.Text = String.Format("Kostenzusicherung: bis zu {0:0.00} Stunden pro Woche", pRO.ApprovedFLSPerWeek);
if (pRO.CustomerOid > 0)
{
@@ -75,68 +65,6 @@ namespace AkggMid
this.bindingSource1.DataSource = pRO;
}
- private List ErstelleDummyRecords(ServicesOverviewRO pRO)
- {
- Dictionary day2Detail = new Dictionary();
-
- var result = new List();
- foreach (var sr in pRO.Services)
- {
- //result.Add(sr);
-
- if (!day2Detail.ContainsKey(sr.StartDate.Day))
- {
- sr.StartDateString = String.Format("{0:dd}", sr.StartDate);
- day2Detail.Add(sr.StartDate.Day, sr);
- result.Add(sr);
- }
- else
- {
- var dsr = day2Detail[sr.StartDate.Day];
- dsr.Minutes += sr.Minutes;
- if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
- dsr.Notice += ", " + sr.Notice;
- else if (sr.Notice.Length > 0)
- dsr.Notice = sr.Notice;
- if (dsr.Notice3 != null && dsr.Notice3.Length > 0 && sr.Notice3 != null && sr.Notice3.Length > 0)
- dsr.Notice3 += ", " + sr.Notice3;
- else if (sr.Notice3 != null && sr.Notice3.Length > 0)
- dsr.Notice3 = sr.Notice3;
- }
- }
-
- for (int i = 1; i <= 31; i++)
- {
- if (!day2Detail.ContainsKey(i))
- {
- var newSr = new ServicesOverviewRO.ServiceDetail();
- if (i <= pRO.EndDate.Day)
- {
- newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
- newSr.StartDateString = String.Format("{0:dd}", newSr.StartDate);
- }
- else
- newSr.StartDateString = String.Format("{0}.", i);
-
- result.Add(newSr);
- day2Detail.Add(i, newSr);
- }
- }
- return result.OrderBy(r => r.StartDate).ToList();
- }
-
- private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
- {
- foreach (var at in pRO.Abwesenheiten)
- {
- if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
- {
- return true;
- }
- }
-
- return false;
- }
}
}
diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs
index cc42f6734..e3e426da7 100644
--- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzucker.designer.cs
@@ -72,9 +72,9 @@ namespace AkggMid
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
- this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
+ this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -123,7 +123,7 @@ namespace AkggMid
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
- new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd}.")});
+ new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString")});
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
@@ -544,10 +544,6 @@ namespace AkggMid
this.xrLabel1.Text = "Summe der gel. Stunden: [fieldTotalStd!0.00]";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
//
- // bindingSource1
- //
- this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
- //
// fieldStd
//
this.fieldStd.DataMember = "Services";
@@ -561,6 +557,10 @@ namespace AkggMid
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldTotalStd.Name = "fieldTotalStd";
//
+ // bindingSource1
+ //
+ this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
+ //
// LeistungsnachweisSozialamtMitBlutzucker
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs
index 29fa56757..7fb88cc28 100644
--- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.cs
@@ -37,20 +37,10 @@ namespace AkggMid
- pRO.Services = ErstelleDummyRecords(pRO);
+ pRO.Services = LeistungsnachweisHelper.ErstelleDummyRecords(pRO);
+
+ LeistungsnachweisHelper.PruefeWochenBudget(pRO);
- foreach (var record in pRO.Services)
- {
- if (IstAbwesend(pRO, record.StartDate))
- {
- record.Notice5 = "x";
- }
- else
- {
- record.Notice5 = "";
- }
-
- }
lblWegbegleitung.Text = String.Format("Kostenzusicherung: bis zu {0:0.00} Stunden pro Woche", pRO.ApprovedFLSPerWeek);
if (pRO.CustomerOid > 0)
@@ -75,72 +65,8 @@ namespace AkggMid
this.bindingSource1.DataSource = pRO;
}
- private List ErstelleDummyRecords(ServicesOverviewRO pRO)
- {
- Dictionary day2Detail = new Dictionary();
+
- var result = new List();
- foreach (var sr in pRO.Services)
- {
- //result.Add(sr);
-
- if (!day2Detail.ContainsKey(sr.StartDate.Day))
- {
- sr.StartDateString = String.Format("{0:dd}", sr.StartDate);
- day2Detail.Add(sr.StartDate.Day, sr);
- result.Add(sr);
- }
- else
- {
- var dsr = day2Detail[sr.StartDate.Day];
- dsr.Minutes += sr.Minutes;
- if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
- dsr.Notice += ", " + sr.Notice;
- else if (sr.Notice.Length > 0)
- dsr.Notice = sr.Notice;
- if (dsr.Notice3.Length > 0 && sr.Notice3.Length > 0)
- dsr.Notice3 += ", " + sr.Notice3;
- else if (sr.Notice3.Length > 0)
- dsr.Notice3 = sr.Notice3;
- if (dsr.Notice4.Length > 0 && sr.Notice4.Length > 0)
- dsr.Notice4 += ", " + sr.Notice4;
- else if (sr.Notice4.Length > 0)
- dsr.Notice4 = sr.Notice4;
- }
- }
-
- for (int i = 1; i <= 31; i++)
- {
- if (!day2Detail.ContainsKey(i))
- {
- var newSr = new ServicesOverviewRO.ServiceDetail();
- if (i <= pRO.EndDate.Day)
- {
- newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
- newSr.StartDateString = String.Format("{0:dd}", newSr.StartDate);
- }
- else
- newSr.StartDateString = String.Format("{0}.", i);
-
- result.Add(newSr);
- day2Detail.Add(i, newSr);
- }
- }
- return result.OrderBy(r => r.StartDate).ToList();
- }
-
- private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
- {
- foreach (var at in pRO.Abwesenheiten)
- {
- if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
- {
- return true;
- }
- }
-
- return false;
- }
}
}
diff --git a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs
index 9ba3fd1ca..e8a0ef0de 100644
--- a/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs
+++ b/ReportImp/AkggMid/LeistungsnachweisSozialamtMitBlutzuckerPumpe.designer.cs
@@ -74,9 +74,9 @@ namespace AkggMid
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
- this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
+ this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -124,7 +124,7 @@ namespace AkggMid
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
- new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd}.")});
+ new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString")});
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
@@ -564,10 +564,6 @@ namespace AkggMid
this.xrLabel1.Text = "Summe der gel. Stunden: [fieldTotalStd!0.00]";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
//
- // bindingSource1
- //
- this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
- //
// fieldStd
//
this.fieldStd.DataMember = "Services";
@@ -581,6 +577,10 @@ namespace AkggMid
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldTotalStd.Name = "fieldTotalStd";
//
+ // bindingSource1
+ //
+ this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
+ //
// LeistungsnachweisSozialamtMitBlutzuckerPumpe
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
diff --git a/ReportImp/AkggMid/Service/ServiceRecordDurationCalculator.cs b/ReportImp/AkggMid/Service/ServiceRecordDurationCalculator.cs
index 93d179374..ff67b0940 100644
--- a/ReportImp/AkggMid/Service/ServiceRecordDurationCalculator.cs
+++ b/ReportImp/AkggMid/Service/ServiceRecordDurationCalculator.cs
@@ -8,24 +8,26 @@ namespace AkggMid.Service
{
public class CustomServiceRecordDurationCalculator : ServiceRecordDurationCalculator
{
- public override void CalculateRoundedDuration(ServiceRecord sr)
- {
- if (sr.ServiceDescription.ServiceCategory.IsBillable)
- {
- var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
+ //CB, 23.02.2023: Es soll nun doch nicht mehr gerundet werden
- sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
- }
- else
- {
- base.CalculateRoundedDuration(sr);
- }
- }
+ //public override void CalculateRoundedDuration(ServiceRecord sr)
+ //{
+ // if (sr.ServiceDescription.ServiceCategory.IsBillable)
+ // {
+ // var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
- public override void CalculateRoundedDuration(ServiceRecordDC sr)
- {
- var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
- sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
- }
+ // sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
+ // }
+ // else
+ // {
+ // base.CalculateRoundedDuration(sr);
+ // }
+ //}
+
+ //public override void CalculateRoundedDuration(ServiceRecordDC sr)
+ //{
+ // var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
+ // sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
+ //}
}
}
diff --git a/Service/Reporting/AnnualReportFactory.cs b/Service/Reporting/AnnualReportFactory.cs
index 6f349e43b..8599d5093 100644
--- a/Service/Reporting/AnnualReportFactory.cs
+++ b/Service/Reporting/AnnualReportFactory.cs
@@ -59,11 +59,11 @@ namespace BeWo.Service.Reporting
//Dictionary customer2TerminationProcessed = new Dictionary();
- Dictionary countPerTerminationReasonAll = new Dictionary();
- Dictionary> countPerTerminationReasonNames = new Dictionary>();
- Dictionary countPerTerminationReasonMale = new Dictionary();
- Dictionary countPerTerminationReasonFemale = new Dictionary();
- Dictionary countPerTerminationReasonDivers = new Dictionary();
+ Dictionary countPerTerminationReasonAll = new Dictionary();
+ Dictionary> countPerTerminationReasonNames = new Dictionary>();
+ Dictionary countPerTerminationReasonMale = new Dictionary();
+ Dictionary countPerTerminationReasonFemale = new Dictionary();
+ Dictionary countPerTerminationReasonDivers = new Dictionary();
Dictionary oid2VarfieldDef = new Dictionary();
@@ -266,43 +266,49 @@ namespace BeWo.Service.Reporting
}
- if (customer.TerminationReason != null && customer.TerminationDate.HasValue &&
- customer.TerminationDate >= reportStartDate && customer.TerminationDate < reportEndDate)
+ if (customer.TerminationDate.HasValue && customer.TerminationDate >= reportStartDate && customer.TerminationDate < reportEndDate)
{
- if (!countPerTerminationReasonAll.ContainsKey(customer.TerminationReason))
- countPerTerminationReasonAll[customer.TerminationReason] = 0;
- countPerTerminationReasonAll[customer.TerminationReason] += 1;
+ String grund = "Unbekannter Grund";
- if (!countPerTerminationReasonMale.ContainsKey(customer.TerminationReason))
- countPerTerminationReasonMale[customer.TerminationReason] = 0;
+ if (customer.TerminationReason != null)
+ {
+ grund = customer.TerminationReason.Value;
+
+ }
+ if (!countPerTerminationReasonAll.ContainsKey(grund))
+ countPerTerminationReasonAll[grund] = 0;
+ countPerTerminationReasonAll[grund] += 1;
+
+ if (!countPerTerminationReasonMale.ContainsKey(grund))
+ countPerTerminationReasonMale[grund] = 0;
if (customer.Person.Sex.HasValue && customer.Person.Sex.Value == Sex.Male)
{
- countPerTerminationReasonMale[customer.TerminationReason] += 1;
+ countPerTerminationReasonMale[grund] += 1;
}
- if (!countPerTerminationReasonFemale.ContainsKey(customer.TerminationReason))
- countPerTerminationReasonFemale[customer.TerminationReason] = 0;
+ if (!countPerTerminationReasonFemale.ContainsKey(grund))
+ countPerTerminationReasonFemale[grund] = 0;
if (customer.Person.Sex.HasValue && customer.Person.Sex.Value == Sex.Female)
{
- countPerTerminationReasonFemale[customer.TerminationReason] += 1;
+ countPerTerminationReasonFemale[grund] += 1;
}
- if (!countPerTerminationReasonDivers.ContainsKey(customer.TerminationReason))
- countPerTerminationReasonDivers[customer.TerminationReason] = 0;
+ if (!countPerTerminationReasonDivers.ContainsKey(grund))
+ countPerTerminationReasonDivers[grund] = 0;
if (customer.Person.Sex.HasValue && customer.Person.Sex.Value == Sex.Divers)
{
- countPerTerminationReasonDivers[customer.TerminationReason] += 1;
+ countPerTerminationReasonDivers[grund] += 1;
}
- if (!countPerTerminationReasonNames.ContainsKey(customer.TerminationReason))
+ if (!countPerTerminationReasonNames.ContainsKey(grund))
{
- countPerTerminationReasonNames[customer.TerminationReason] = new List();
+ countPerTerminationReasonNames[grund] = new List();
}
- countPerTerminationReasonNames[customer.TerminationReason].Add(String.Format("{0}, {1}", customer.Person.LastName, customer.Person.FirstName));
+ countPerTerminationReasonNames[grund].Add(String.Format("{0}, {1}", customer.Person.LastName, customer.Person.FirstName));
}
@@ -525,7 +531,7 @@ namespace BeWo.Service.Reporting
AnnualReportDataDC data = new AnnualReportDataDC();
report.Data.Add(data);
data.Index = index++;
- data.Name = reason.Value;
+ data.Name = reason;
data.Value = countPerTerminationReasonAll[reason];
if (countPerTerminationReasonMale.ContainsKey(reason))
diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs
index e5bfc6ab0..1015901d1 100644
--- a/Service/ServiceImplementations/OperationsServiceImp.cs
+++ b/Service/ServiceImplementations/OperationsServiceImp.cs
@@ -936,7 +936,13 @@ namespace BeWo.Service.ServiceImplementations
settingValueDict.Add("ShowDistanceFields", "1");
}
}
-
+ if (!settingValueDict.ContainsKey("EinheitZeiterfassung") && settingValueDict.ContainsKey("IsZeiterfassungInStdMin"))
+ {
+ if (settingValueDict["IsZeiterfassungInStdMin"] == "1")
+ {
+ settingValueDict.Add("EinheitZeiterfassung", "2");
+ }
+ }
manDc.Settings = "";
diff --git a/Shared/Core/SettingsKeys.cs b/Shared/Core/SettingsKeys.cs
index 1ce01aba5..8c35700b4 100644
--- a/Shared/Core/SettingsKeys.cs
+++ b/Shared/Core/SettingsKeys.cs
@@ -11,6 +11,8 @@
public static string IsServiceRecordNoticeMandatory => "IsServiceRecordNoticeMandatory";
public static string IsEndDateVisible => "IsEndDateVisible";
public static string IsZeiterfassungInStdMin => "IsZeiterfassungInStdMin";
+
+ public static string EinheitZeiterfassung => "EinheitZeiterfassung";
public static string HilfeplanAuslaufAuswahl => "HilfeplanAuslaufAuswahl";
public static string AnzTageZeiterfassErfolgt => "AnzTageZeiterfassErfolgt";
public static string MaxDaysEditServiceRecordsAllowed => "MaxDaysEditServiceRecordsAllowed";