diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index a68b345e8..1d398b0bf 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -43,12 +43,12 @@ de-DE BeWoPlaner beyondSoft GmbH - 2.0.1.194 + 2.0.1.197 true publish.htm false true - 195 + 198 2.0.1.%2a false true diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 0823c6862..06ecb73a2 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -239,7 +239,7 @@ namespace BeWo val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "SetStartTimeToEndTimeAfterSave"); AppSettings.SetStartTimeToEndTimeAfterSave = val != null && val.Equals("1"); - + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsServiceRecordNoticeMandatory"); if (val != null && val.Equals("0")) { @@ -372,8 +372,8 @@ namespace BeWo { showDienstplanung = true; } - - val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowMarker"); + + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowMarker"); if (val != null && val.Equals("1")) { showMarker = true; diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index 88981e246..edce76ea7 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -1681,50 +1681,6 @@ namespace BeWo.Core dc.SupportConcept = scDc; dc.CostBearer = cbDc; - if(vm.ServiceRecordFormat != ServiceRecordFormate.ZeiterfassungMitMonatJahr && vm.Date.HasValue && vm.DateAndTime.HasValue && vm.StartDate.HasValue) { - - dc.Start = new DateTime(vm.Date.Value.Year, - vm.Date.Value.Month, - vm.Date.Value.Day, - vm.StartTime == null ? vm.DateAndTime.Value.Hour : vm.StartDate.Value.Hour, - vm.StartTime == null ? vm.DateAndTime.Value.Minute : vm.StartDate.Value.Minute, - vm.StartTime == null ? vm.DateAndTime.Value.Second : vm.StartDate.Value.Second); - - - - if(vm.DurationInStunden == ZeiterfassungsDauer.Minuten) - { - if (vm.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitEndDatum) - { - dc.End = dc.Start.Value.AddMinutes(Convert.ToDouble(vm.DurationSTD)); - } - else - { - dc.End = dc.Start.Value.AddMinutes(Convert.ToDouble(vm.Duration)); - } - } - else - { - if (vm.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitEndDatum) - { - dc.End = dc.Start.Value.AddHours(Convert.ToDouble(vm.DurationSTD)); - } - else - { - dc.End = dc.Start.Value.AddHours(Convert.ToDouble(vm.Duration)); - } - } - - } - else - { - var dates = DateTime.Parse("1." + vm.OnlyMonth + vm.OnlyYear); - - var StartDatetime = new DateTime(dates.Year, dates.Month, 1, 0, 0, 0); - - dc.Start = StartDatetime; - dc.End = StartDatetime.AddHours((double)vm.DurationMonthYearGes); - } if (relDc != null) @@ -1740,8 +1696,6 @@ namespace BeWo.Core if (BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth)) maxdays = -1; - var test = dc.Start; - var test2 = vm.DateAndTime; ServiceFacade.DoOperationsServiceSync(o => r = o.ValidateServiceRecord(dc, statistics, maxdays, employeeOids, cb2ScOids)); @@ -1755,12 +1709,12 @@ namespace BeWo.Core switch (result.ResultType) { case ServiceRecordValidationResult.OutsideOfSupportConcept: - MessageBox.Show("Das gewählte Datum '" + vm.DateAndTime.Value.ToShortDateString() + "' liegt außerhalb des Zeitraums des gewählten Hilfeplans (" + relDc.DateRangeString + ").\nDas Speichern ist nicht möglich.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Das gewählte Datum '" + vm.StartDate.ToShortDateString() + "' liegt außerhalb des Zeitraums des gewählten Hilfeplans (" + relDc.DateRangeString + ").\nDas Speichern ist nicht möglich.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); lValid = false; exitLoop = true; break; case ServiceRecordValidationResult.OutOfEditLimit: - MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da bereits der " + BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.StartDate.ToShortDateString() + " dokumentieren, da bereits der " + BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); lValid = false; exitLoop = true; break; @@ -1769,11 +1723,11 @@ namespace BeWo.Core { if (BeWoApp.AppSettings.AnzTageZeiterfassErfolgt == 1) { - MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von einem Tag erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.StartDate.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von einem Tag erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); } else { - MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von " + BeWoApp.AppSettings.AnzTageZeiterfassErfolgt + " Tagen erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.StartDate.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von " + BeWoApp.AppSettings.AnzTageZeiterfassErfolgt + " Tagen erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); } lValid = false; @@ -1789,10 +1743,10 @@ namespace BeWo.Core case ServiceRecordValidationResult.ServiceRecordOverlapping: if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLS)) { - MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ") .\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ") .\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information); lValid = false; } - else if (MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ").\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) + else if (MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ").\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) { lValid = false; exitLoop = true; @@ -1802,10 +1756,10 @@ namespace BeWo.Core if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLSForEmployee)) { - MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information); lValid = false; } - else if (MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\n\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) + else if (MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\n\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) { lValid = false; exitLoop = true; diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs index 22411cb58..a71c8f277 100644 --- a/BeWo/LoginControl.xaml.cs +++ b/BeWo/LoginControl.xaml.cs @@ -1395,13 +1395,17 @@ namespace BeWo private void PinEinblenden() { - PINTextBox.Visibility = Visibility.Visible; - lblPin.Visibility = Visibility.Visible; + if (PINTextBox.Visibility != Visibility.Visible) + { + PINTextBox.Visibility = Visibility.Visible; + lblPin.Visibility = Visibility.Visible; - linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right, linkLine.Margin.Bottom); - gridLogin.Height += 25; + linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right, + linkLine.Margin.Bottom); + gridLogin.Height += 25; - PINTextBox.Focus(); + PINTextBox.Focus(); + } } } diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml b/BeWo/Scheduler/View/NewSchedulerView.xaml index 070ab0fbd..a758c8c81 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml @@ -594,7 +594,7 @@ - + diff --git a/BeWo/View/Detail/AccountingTransactionBookingView.xaml.cs b/BeWo/View/Detail/AccountingTransactionBookingView.xaml.cs index 158b44428..2b8854707 100644 --- a/BeWo/View/Detail/AccountingTransactionBookingView.xaml.cs +++ b/BeWo/View/Detail/AccountingTransactionBookingView.xaml.cs @@ -449,6 +449,17 @@ namespace BeWo.View.Detail if (lValid) { + if (chkWithClient.IsChecked.HasValue && chkWithClient.IsChecked.Value) + { + if (ViewModel.SelectedCustomerNode == null || ViewModel.SelectedCustomerNode.SupportConceptTreeNodeDC == null) + { + MessageBox.Show(Translator.Translate("Bitte wählen Sie einen Hilfeplan aus."), "Speichern", + MessageBoxButton.OK, MessageBoxImage.Exclamation); + return; + } + } + + var atvm = ViewModel.CreateFromPrototype(); ViewModel.AccountingTransactionVMList.Add(atvm); diff --git a/BeWo/View/Detail/AdditionalServiceView.xaml b/BeWo/View/Detail/AdditionalServiceView.xaml index ed68f2c6f..d6e9b9cbc 100644 --- a/BeWo/View/Detail/AdditionalServiceView.xaml +++ b/BeWo/View/Detail/AdditionalServiceView.xaml @@ -310,7 +310,7 @@ Height="23" Grid.Column="1" Grid.Row="1" SelectionChanged="AngebotsComboboxChange" />