From 7d66251ad990df61ed7a3fc19a7159bb561c977c Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 28 Feb 2023 17:16:54 +0100 Subject: [PATCH] Todo Stunden/Minuten Auswahl erledigt + diverse Berichte (Akgg, IBP) --- BeWo/BeWoApp.xaml.cs | 16 +- BeWo/Core/Config/AppSettings.cs | 8 +- BeWo/View/Detail/MandatorView.xaml | 7 +- BeWo/View/Detail/MandatorView.xaml.cs | 33 ++ .../Zeiterfassung/ServiceRecordEditView.xaml | 4 +- .../ServiceRecordEditView.xaml.cs | 71 ++-- .../ServiceRecordGroupEditView.xaml | 4 +- .../ServiceRecordGroupEditView.xaml.cs | 81 ++-- .../Zeiterfassung/ServiceRecordView2.xaml | 8 +- .../Zeiterfassung/ServiceRecordView2.xaml.cs | 70 ++-- BeWo/View/HomeView.xaml.cs | 2 + BeWo/ViewModel/MandatorVM.cs | 10 +- BeWoPlanerMobil/BeWoPlanerMobil.csproj.user | 2 +- BeWoPlanerMobil/Views/Shared/_Layout.cshtml | 38 +- Host/Host.csproj.user | 2 +- .../ReportObjects/BudgetnachweisAnhangRO.cs | 23 +- Report/ReportObjects/ServicesOverviewRO.cs | 2 +- ReportImp/AkggMid/AkggMid.csproj | 1 + ReportImp/AkggMid/LeistungsnachweisHelper.cs | 350 ++++++++++++++++++ .../AkggMid/LeistungsnachweisJugendamt.cs | 104 ++++-- .../LeistungsnachweisJugendamt.designer.cs | 76 ++-- .../AkggMid/LeistungsnachweisSozialamt.cs | 74 +--- .../LeistungsnachweisSozialamt.designer.cs | 12 +- ...LeistungsnachweisSozialamtMitBlutzucker.cs | 78 +--- ...nachweisSozialamtMitBlutzucker.designer.cs | 12 +- ...ungsnachweisSozialamtMitBlutzuckerPumpe.cs | 82 +--- ...eisSozialamtMitBlutzuckerPumpe.designer.cs | 12 +- .../ServiceRecordDurationCalculator.cs | 36 +- Service/Reporting/AnnualReportFactory.cs | 52 +-- .../OperationsServiceImp.cs | 8 +- Shared/Core/SettingsKeys.cs | 2 + 31 files changed, 785 insertions(+), 495 deletions(-) create mode 100644 ReportImp/AkggMid/LeistungsnachweisHelper.cs 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"/> -