diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 7cc283dcc..2373dc680 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -813,6 +813,7 @@ namespace BeWo UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.ZeigeNurMeineTermine, _AppSettings.ZeigeNurMeineTermine ? "1" : "0", _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastSelectedServiceRecordTimeIntervalDays, _AppSettings.LastSelectedServiceRecordTimeIntervalDays.ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastSelectedServiceRecordMonth, _AppSettings.LastSelectedServiceRecordMonth.ToString(), _LoggedOnUser.Settings); + UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastKassenSortOrder, _AppSettings.LastKassenSortOrder.ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LetzteZeiterfassungsDauer, ((int)_AppSettings.LetzteZeiterfassungsDauer).ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulerViewType, ((int) _AppSettings.SchedulerViewType).ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulerTimelineViewDayCount, (_AppSettings.SchedulerTimelineViewDayCount).ToString(), _LoggedOnUser.Settings); @@ -1015,7 +1016,12 @@ namespace BeWo { _AppSettings.LastSelectedServiceRecordMonth = Convert.ToDateTime(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastSelectedServiceRecordMonth, settings)); } - + + val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastKassenSortOrder, settings); + if (val != null) + { + _AppSettings.LastKassenSortOrder = Convert.ToInt32(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastKassenSortOrder, settings)); + } val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LetzteZeiterfassungsDauer, settings); if(val != null) diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index d83430971..df315e236 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -38,6 +38,8 @@ namespace BeWo.Core.Config private DateTime mLastSelectedServiceRecordMonth = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); + private int mLastKassenSortOrder = 1; + private ZeiterfassungsDauer mLetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten; public enum WindowStateType @@ -335,6 +337,22 @@ namespace BeWo.Core.Config } + } + + public int LastKassenSortOrder + { + get { return mLastKassenSortOrder; } + + set + { + if (mLastKassenSortOrder != value) + { + mLastKassenSortOrder = value; + IsDirty = true; + } + } + + } public int ServiceRecordAllowChangeHours diff --git a/BeWo/View/BargeldkassenView.xaml b/BeWo/View/BargeldkassenView.xaml index 2010f19e2..b46d6f045 100644 --- a/BeWo/View/BargeldkassenView.xaml +++ b/BeWo/View/BargeldkassenView.xaml @@ -52,6 +52,10 @@ + + + + @@ -153,7 +157,11 @@ - + + + diff --git a/BeWo/View/BargeldkassenView.xaml.cs b/BeWo/View/BargeldkassenView.xaml.cs index 7b46c2d4c..7d4b6b221 100644 --- a/BeWo/View/BargeldkassenView.xaml.cs +++ b/BeWo/View/BargeldkassenView.xaml.cs @@ -17,7 +17,7 @@ using BeWo.ViewModel.ListViewModel; using BS.Shared; using BS.Shared.DataContracts; using BS.Shared.Extensions; - +using BS.Shared.Translation; using DevExpress.Utils; using DevExpress.Xpf.Editors; using DevExpress.Xpf.Grid; @@ -103,6 +103,66 @@ namespace BeWo.View } } + private void SortiereKassen() + { + if (ViewModel != null && tabcontrol_bargeldkassen != null) + { + var alterIndex = tabcontrol_bargeldkassen.SelectedIndex; + tabcontrol_bargeldkassen.ItemsSource = null; + //var sorted = + if (SortComboBox.SelectedIndex == 0) + { + ViewModel.VMList.Sort((a, b) => Comparer.Default.Compare(a.Kassenname, b.Kassenname)); + //sorted = r.OrderBy(k => k.Kassenname).ToList(); + } + else if (SortComboBox.SelectedIndex == 1) + { + ViewModel.VMList.Sort((a, b) => Comparer.Default.Compare(a.DataContract.BargeldkassenOid, b.DataContract.BargeldkassenOid)); + //sorted = r.OrderBy(k => k.BargeldkassenOid).ToList(); + } + else + { + ViewModel.VMList.Sort((a, b) => Comparer.Default.Compare(a.DataContract.BargeldkassenOid, b.DataContract.BargeldkassenOid) * -1); + //sorted = r.OrderByDescending(k => k.BargeldkassenOid).ToList(); + } + tabcontrol_bargeldkassen.ItemsSource = ViewModel.VMList; + if (alterIndex == -1) + { + alterIndex = 0; + } + else + { + while (alterIndex > ViewModel.VMList.Count) + { + alterIndex--; + } + } + tabcontrol_bargeldkassen.SelectedIndex = alterIndex; + + + } + } + + private void SelektiereKasse(String kassenname) + { + if (!String.IsNullOrEmpty(kassenname)) + { + var index = tabcontrol_bargeldkassen.SelectedIndex; + int idx = 0; + foreach (var item in tabcontrol_bargeldkassen.Items) + { + var vm = item as BargeldkassenVM; + if (vm?.Kassenname == kassenname) + { + index = idx; + } + idx++; + } + tabcontrol_bargeldkassen.SelectedIndex = index; + + } + } + private readonly TableID currentObjectTid; private readonly long currentObjectOid; @@ -117,7 +177,8 @@ namespace BeWo.View public BargeldkassenView(TableID objectTid, long objectOid) { InitializeComponent(); - + InitSortCombos(); + _JahresComboBoxSource = new List(); for (var i = 9; i >= 0; i--) { @@ -133,7 +194,7 @@ namespace BeWo.View InitRights(); - ReloadViewModel(); + ReloadViewModel(true, null); if (tabcontrol_bargeldkassen != null && tabcontrol_bargeldkassen.SelectedIndex == -1) @@ -142,6 +203,26 @@ namespace BeWo.View } + } + + private void InitSortCombos() + { + var list = new List(); + + list.Add(new KassenSortOrderItem(KassenSortOrderEnum.NachName)); + list.Add(new KassenSortOrderItem(KassenSortOrderEnum.NachDatumAufsteigend)); + list.Add(new KassenSortOrderItem(KassenSortOrderEnum.NachDatumAbsteigend)); + + + SortComboBox.DisplayMemberPath = "Name"; + SortComboBox.ItemsSource = list; + + if (BeWoApp.AppSettings.LastKassenSortOrder < list.Count) + { + SortComboBox.SelectedIndex = BeWoApp.AppSettings.LastKassenSortOrder; + } + + } private void InitRights() @@ -175,7 +256,17 @@ namespace BeWo.View } - private void ReloadViewModel() + private void ReloadViewModelMitSortierung() + { + ReloadViewModel(true, null); + } + + private void ReloadViewModelOhneSortierung() + { + ReloadViewModel(false, null); + } + + private void ReloadViewModel(bool sortiereKassen, String selectedKassenname) { var previouslySelectedTab = tabcontrol_bargeldkassen.SelectedIndex; @@ -184,30 +275,15 @@ namespace BeWo.View { if (r.Any()) { - int? alteAnzahl = null; - - if (ViewModel != null) - { - alteAnzahl = ViewModel.VMList.Count; - } - + ViewModel = new BargeldkassenListVM(r); - var neueAnzahl = ViewModel.VMList.Count; + //if (sortiereKassen) + //{ + SortiereKassen(); + //} - if (alteAnzahl != null && neueAnzahl > alteAnzahl) - { - tabcontrol_bargeldkassen.SelectedIndex = neueAnzahl - 1; - } - else if (previouslySelectedTab > -1) - { - tabcontrol_bargeldkassen.SelectedIndex = previouslySelectedTab; - } - else - { - tabcontrol_bargeldkassen.SelectedIndex = 0; - } - + SelektiereKasse(selectedKassenname); ViewModel.VMList.DoForEach(d => d.Bargeldtransaktionen.VMList.ListChanged += (sender, args) => { @@ -231,7 +307,8 @@ namespace BeWo.View { bargeldkasse.RecalculateTransaktionsbestaende(); - ServiceFacade.DoOperationsServiceAsync(s => s.UpdateBargeldkasse(bargeldkasse.CommitToDataContract()), r2 => this.Dispatch(ReloadViewModel)); + ServiceFacade.DoOperationsServiceAsync(s => s.UpdateBargeldkasse(bargeldkasse.CommitToDataContract()), r2 => this.Dispatch(ReloadViewModelOhneSortierung)); + } } }); @@ -299,7 +376,7 @@ namespace BeWo.View selectedBargeldkasse.RecalculateTransaktionsbestaende(); var kb = selectedBargeldkasse.Kassenbestand; - ServiceFacade.DoOperationsServiceAsync(s => s.UpdateBargeldkasse(selectedBargeldkasse.CommitToDataContract()), r => this.Dispatch(ReloadViewModel)); + ServiceFacade.DoOperationsServiceAsync(s => s.UpdateBargeldkasse(selectedBargeldkasse.CommitToDataContract()), r => this.Dispatch(ReloadViewModelOhneSortierung)); } private void LinkZahlungsbelegDruckenClick(object sender, RoutedEventArgs e) @@ -324,6 +401,7 @@ namespace BeWo.View var neu = ViewModel.NewVM; neu.ObjectOid = currentObjectOid; neu.ObjectTid = currentObjectTid; + String name = neu.Kassenname; ServiceFacade.DoOperationsServiceAsync(s => s.InsertNewBargeldkasse(neu.CommitToDataContract()), r => this.Dispatch(delegate { @@ -331,7 +409,7 @@ namespace BeWo.View ViewModel.NewVM = new BargeldkassenVM(new BargeldkassenDC()); - ReloadViewModel(); + ReloadViewModel(true, name); })); } @@ -401,7 +479,7 @@ namespace BeWo.View OnPropertyChanged("NewBargeldtransaktion"); OnPropertyChanged("SelectedBargeldkasse"); - ReloadViewModel(); + ReloadViewModel(false, null); })); } @@ -444,7 +522,7 @@ namespace BeWo.View ViewModel.VMList.Remove(selectedBargeldkasse); - ServiceFacade.DoOperationsServiceAsync(s => s.DeactivateBargeldkasse(selectedBargeldkasse.DataContract.BargeldkassenOid.Value, selectedBargeldkasse.DataContract.BargeldkassenVersion.Value), () => this.Dispatch(ReloadViewModel)); + ServiceFacade.DoOperationsServiceAsync(s => s.DeactivateBargeldkasse(selectedBargeldkasse.DataContract.BargeldkassenOid.Value, selectedBargeldkasse.DataContract.BargeldkassenVersion.Value), () => this.Dispatch(ReloadViewModelOhneSortierung)); } private void AuszahlungsIntervallCBEditValueChanged(object sender, EditValueChangedEventArgs e) @@ -461,7 +539,7 @@ namespace BeWo.View return; } - ServiceFacade.DoOperationsServiceAsync(s => s.UpdateBargeldkasse(bargeldkasse.CommitToDataContract()), r => this.Dispatch(ReloadViewModel)); + ServiceFacade.DoOperationsServiceAsync(s => s.UpdateBargeldkasse(bargeldkasse.CommitToDataContract()), r => this.Dispatch(ReloadViewModelOhneSortierung)); } public event PropertyChangedEventHandler PropertyChanged; @@ -506,8 +584,52 @@ namespace BeWo.View { popup.IsOpen = false; - ReloadViewModel(); + ReloadViewModel(false, null); })); } + + private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + BargeldkassenVM selectedVM = tabcontrol_bargeldkassen.SelectedItem as BargeldkassenVM; + String lastName = null; + if (selectedVM != null) + { + lastName = selectedVM.Kassenname; + } + SortiereKassen(); + SelektiereKasse(lastName); + + BeWoApp.AppSettings.LastKassenSortOrder = SortComboBox.SelectedIndex; + BeWoApp.SaveAppSettings(); + } + } + + public class KassenSortOrderItem + { + public KassenSortOrderItem(KassenSortOrderEnum e) + { + SortOrderEnum = e; + } + + public KassenSortOrderEnum SortOrderEnum { get; set; } + + public String Name + { + get + { + switch (SortOrderEnum) + { + case KassenSortOrderEnum.NachName: + return Translator.Translate("Nach Name"); + case KassenSortOrderEnum.NachDatumAufsteigend: + return Translator.Translate("Nach Datum (aufsteigend)"); + case KassenSortOrderEnum.NachDatumAbsteigend: + return Translator.Translate("Nach Datum (absteigend)"); + + } + + return ""; + } + } } } diff --git a/BeWo/View/Detail/EmployeeView.xaml b/BeWo/View/Detail/EmployeeView.xaml index f936213d5..47aa162cd 100644 --- a/BeWo/View/Detail/EmployeeView.xaml +++ b/BeWo/View/Detail/EmployeeView.xaml @@ -469,10 +469,10 @@ - - - - + + + + diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml index cacd6e092..786c6d75f 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View" xmlns:localViewControls="clr-namespace:BeWo.View.Controls" + xmlns:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup" xmlns:localSearchView="clr-namespace:BeWo.View.Search" xmlns:val="clr-namespace:BeWo.Validation" @@ -61,58 +62,190 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + - + - + @@ -170,7 +303,7 @@ - + @@ -276,7 +409,7 @@ - + @@ -295,7 +428,7 @@ - + diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml.cs b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml.cs index 613040f7e..62c73098e 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml.cs +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml.cs @@ -25,6 +25,7 @@ using BS.Shared.Translation; using DevExpress.Xpf.Editors; using DevExpress.Xpf.RichEdit; using SupportConceptService = BeWo.Core.Service.SupportConceptService; +using System.Windows.Media; namespace BeWo.View.Detail.Zeiterfassung { @@ -157,8 +158,9 @@ namespace BeWo.View.Detail.Zeiterfassung _OldServiceDescription = _ServiceRecordVM.ServiceDescription; //_SelectedEmployee = clone.Employee; - - DataContext = _ServiceRecordVM; + _ServiceRecordVM.Statistics = pListViewModel.Statistics; + + DataContext = _ServiceRecordVM; if(_ServiceRecordVM.Employee != null) { @@ -187,6 +189,7 @@ namespace BeWo.View.Detail.Zeiterfassung } ViewModel = pListViewModel; + CreateCustomStatistic(); Focus(); TextboxNotice.Focus(); @@ -1040,5 +1043,124 @@ namespace BeWo.View.Detail.Zeiterfassung } } + + private void CreateCustomStatistic() + { + + if (ViewModel.RecordStatisticsDC != null) + { + var info = ViewModel.RecordStatisticsDC; + + StatisticInfoGrid.Children.Clear(); + StatisticInfoGrid.ColumnDefinitions.Clear(); + StatisticInfoGrid.RowDefinitions.Clear(); + + if (info.Header != null) + { + StatisticInfoGrid.ColumnDefinitions.Add(new ColumnDefinition + { + Width = new GridLength(1, GridUnitType.Auto) + }); + + + foreach (var header in info.Header) + { + StatisticInfoGrid.RowDefinitions.Add(new RowDefinition()); + } + int rowIndex = 0; + foreach (var header in info.Header) + { + var txt = new TextBlock(); + txt.SetValue(Grid.ColumnProperty, 0); + txt.SetValue(Grid.RowProperty, rowIndex); + txt.Foreground = + new SolidColorBrush( + (Color)ColorConverter.ConvertFromString(info.ForegroundColor[rowIndex])); + txt.Height = 14; + txt.Text = header; + + StatisticInfoGrid.Children.Add(txt); + + rowIndex++; + } + + if (info.PeriodStatisticInfos != null) + { + foreach (var periodInfo in info.PeriodStatisticInfos) + { + StatisticInfoGrid.ColumnDefinitions.Add(new ColumnDefinition + { + Width = new GridLength(1, GridUnitType.Auto) + }); + StatisticInfoGrid.ColumnDefinitions.Add(new ColumnDefinition + { + Width = new GridLength(1, GridUnitType.Auto) + }); + } + + int colIndex = 1; + foreach (var periodInfo in info.PeriodStatisticInfos) + { + rowIndex = 0; + foreach (var lv in periodInfo.LeftValues) + { + if (!String.IsNullOrEmpty(lv)) + { + var txt = new TextBlock(); + txt.SetValue(Grid.ColumnProperty, colIndex); + txt.SetValue(Grid.RowProperty, rowIndex); + txt.Foreground = new SolidColorBrush( + (Color)ColorConverter.ConvertFromString(periodInfo.LeftValueColors[rowIndex])); + txt.Height = 12; + txt.FontWeight = FontWeights.Bold; + txt.Text = lv; + txt.HorizontalAlignment = HorizontalAlignment.Right; + txt.Margin = new Thickness(10, 0, 0, 0); + txt.Padding = new Thickness(1, 0, 1, 0); + if (String.IsNullOrEmpty(periodInfo.RightValues[rowIndex])) + { + txt.SetValue(Grid.ColumnSpanProperty, 2); + } + + StatisticInfoGrid.Children.Add(txt); + + + // + } + if (!String.IsNullOrEmpty(periodInfo.RightValues[rowIndex])) + { + var txt = new TextBlock(); + txt.SetValue(Grid.ColumnProperty, colIndex + 1); + txt.SetValue(Grid.RowProperty, rowIndex); + txt.Foreground = + new SolidColorBrush( + (Color)ColorConverter.ConvertFromString( + periodInfo.RightValueColors[rowIndex])); + txt.Height = 12; + txt.FontWeight = FontWeights.Bold; + txt.Text = periodInfo.RightValues[rowIndex]; + txt.HorizontalAlignment = HorizontalAlignment.Right; + txt.Margin = new Thickness(10, 0, 0, 0); + txt.Padding = new Thickness(1, 0, 1, 0); + StatisticInfoGrid.Children.Add(txt); + + + // + } + + + rowIndex++; + } + + colIndex += 2; + } + } + } + } + } } } \ No newline at end of file diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs index 7516aa895..50415137e 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs @@ -1188,7 +1188,7 @@ namespace BeWo.View.Detail.Zeiterfassung double height = MainControl.ActualHeight * 0.8; - double width = 710; + double width = 810; if (BeWoApp.AppSettings.ShowRtfTextfield) { diff --git a/BeWo/View/Navigation/Sorter/CustomerSorter.cs b/BeWo/View/Navigation/Sorter/CustomerSorter.cs index c5d15f779..59fd8b598 100644 --- a/BeWo/View/Navigation/Sorter/CustomerSorter.cs +++ b/BeWo/View/Navigation/Sorter/CustomerSorter.cs @@ -11,12 +11,13 @@ namespace BeWo.View.Navigation.Sorter get { List list = new List(); - list.Add(new SortItem("Nachname", "LastName")); + list.Add(new SortItem("Nachname", "LastNameFirstName")); list.Add(new SortItem("Vorname", "FirstName")); list.Add(new SortItem("Geburtsdatum", "DateOfBirth")); list.Add(new SortItem("Strasse", "Street")); list.Add(new SortItem("PLZ", "PostalCode")); list.Add(new SortItem("Ort", "Town")); + list.Add(new SortItem("Team", "Teams")); return list; } diff --git a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs index 0d6fbc306..6017d8fd6 100644 --- a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs +++ b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs @@ -211,6 +211,18 @@ namespace BeWo.ViewModel.ListViewModel public static List AllDosageForms { get; private set; } + internal void FetchStatistics(long costBearer2SupportConceptOid) + { + DateTime stichtag = DateTime.Now; + + var recordStats = ServiceFacade.DoOperationsServiceSync(s => s.GetServiceRecordStatisticInfo(costBearer2SupportConceptOid, stichtag)); + var scStats = ServiceFacade.DoOperationsServiceSync(s => s.CreateSupportConceptStatistics(costBearer2SupportConceptOid, stichtag)); + + RecordStatisticsDC = recordStats; + StatisticsDC = scStats; + Statistics = CreateStatisticVMList(scStats); + } + //CB EINKOMMENTIEREN //public WohnheimbuchungsVM SelectedWohnheimbuchung //{ @@ -1169,6 +1181,8 @@ namespace BeWo.ViewModel.ListViewModel r => DispatcherObject.Dispatch(delegate { StatisticsDC = r; + RecordStatisticsDC = stinf; + if (stinf != null && StatisticInfosLoaded != null) { StatisticInfosLoaded(stinf, new EventArgs()); @@ -1631,6 +1645,7 @@ namespace BeWo.ViewModel.ListViewModel return 0; } + public ServiceRecordStatisticsInfoDC RecordStatisticsDC { get; set; } public SupportConceptStatisticsDC StatisticsDC { get; set; } internal static GroupDurationDC CalculateGroupDuration(int personCount, int employeeCount, decimal totalDuration, List costBearer2SupportConceptList) diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs index b4e6912b3..21905d222 100644 --- a/BeWo/ViewModel/ServiceRecordVM.cs +++ b/BeWo/ViewModel/ServiceRecordVM.cs @@ -216,6 +216,7 @@ namespace BeWo.ViewModel private string _EndTimeString; + private List _Statistics; private string[] _MonateBinden = { @@ -2034,9 +2035,25 @@ namespace BeWo.ViewModel } } } - + #endregion + public List Statistics + { + get { return _Statistics; } + set + { + _Statistics = value; + FirePropertyChanged("Statistics"); + FirePropertyChanged("HasStatistics"); + } + } + + public bool HasStatistics + { + get { return _Statistics != null && _Statistics.Count > 0; } + } + #region Public Methods public void ChangeGoalTree(List goalCats, List goals) //, List goalsAndCats) diff --git a/BeWo/ownChat/ChatDokumentationsView.xaml.cs b/BeWo/ownChat/ChatDokumentationsView.xaml.cs index 4f30fdd9a..065070cb0 100644 --- a/BeWo/ownChat/ChatDokumentationsView.xaml.cs +++ b/BeWo/ownChat/ChatDokumentationsView.xaml.cs @@ -204,6 +204,12 @@ namespace BeWo.ownChat _ServiceRecord.SetInsertedOn(DateTime.Now); var hideCustomerCombo = _ServiceRecord.SupportConcept == null; + if (cb2ScOid.HasValue) + { + vm.FetchStatistics(cb2ScOid.Value); + } + + serviceRecordEditView.InitView(vm, _ServiceRecord, hideCustomerCombo); serviceRecordEditView.SetSearchText(customerCompact != null ? customerCompact.LastName : ""); diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index f361f78af..5ef28c91b 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU ShowAllFiles 600 MvcControllerEmptyScaffolder diff --git a/Data/Entities/ArbeitszeitEintrag.cs b/Data/Entities/ArbeitszeitEintrag.cs index 16af93d2c..c919791f6 100644 --- a/Data/Entities/ArbeitszeitEintrag.cs +++ b/Data/Entities/ArbeitszeitEintrag.cs @@ -150,5 +150,24 @@ namespace BeWo.Data.Entities } return false; } + + public virtual decimal BerechneStunden() + { + DateTime dt = DateTime.Now; + + String dateStr1 = String.Format("{0:dd.MM.yyyy} {1}", dt, UhrzeitVon); + String dateStr2 = String.Format("{0:dd.MM.yyyy} {1}", dt, UhrzeitBis); + + DateTime date1; + DateTime date2; + + if (DateTime.TryParse(dateStr1, out date1) && DateTime.TryParse(dateStr2, out date2)) + { + + return (decimal)date2.Subtract(date1).TotalHours; + } + + return 0; + } } } \ No newline at end of file diff --git a/Report/DefaultReports/LwlPruefliste.Designer.cs b/Report/DefaultReports/LwlPruefliste.Designer.cs index 90e46a7b9..c561173d0 100644 --- a/Report/DefaultReports/LwlPruefliste.Designer.cs +++ b/Report/DefaultReports/LwlPruefliste.Designer.cs @@ -268,7 +268,7 @@ namespace BeWo.Report.DefaultReports // xrTableCell22 // this.xrTableCell22.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { - new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ServiceRecordNotice]")}); + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ServiceRecordNotice2]")}); this.xrTableCell22.Multiline = true; this.xrTableCell22.Name = "xrTableCell22"; this.xrTableCell22.Text = "Angabe zum Inhalt der Kontaktzeit"; @@ -482,28 +482,24 @@ namespace BeWo.Report.DefaultReports // // formattingRuleStartDate // - this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; this.formattingRuleStartDate.DataMember = "ServicesDouble"; this.formattingRuleStartDate.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; this.formattingRuleStartDate.Name = "formattingRuleStartDate"; // // formattingRuleServiceDesc // - this.formattingRuleServiceDesc.Condition = "[StartDate2] < [StartDate]"; this.formattingRuleServiceDesc.DataMember = "ServicesDouble"; this.formattingRuleServiceDesc.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; this.formattingRuleServiceDesc.Name = "formattingRuleServiceDesc"; // // formattingRuleCostBearer // - this.formattingRuleCostBearer.Condition = "[StartDate2] < [StartDate]"; this.formattingRuleCostBearer.DataMember = "ServicesDouble"; this.formattingRuleCostBearer.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; this.formattingRuleCostBearer.Name = "formattingRuleCostBearer"; // // formattingRuleEmployeeName // - this.formattingRuleEmployeeName.Condition = "[StartDate2] < [StartDate]"; this.formattingRuleEmployeeName.DataMember = "ServicesDouble"; this.formattingRuleEmployeeName.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; this.formattingRuleEmployeeName.Name = "formattingRuleEmployeeName"; @@ -525,7 +521,7 @@ namespace BeWo.Report.DefaultReports this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldKontaktArt.Name = "fieldKontaktArt"; // - // LwlPruefprotokoll + // LwlPruefliste // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, diff --git a/Report/ReportObjects/LwlPrueflisteRO.cs b/Report/ReportObjects/LwlPrueflisteRO.cs index 5175e4d68..58098cd17 100644 --- a/Report/ReportObjects/LwlPrueflisteRO.cs +++ b/Report/ReportObjects/LwlPrueflisteRO.cs @@ -15,7 +15,7 @@ namespace BeWo.Report.ReportObjects public DateTime ReportEndDate { get; set; } public IList ServiceRecords { get; set; } - public static LwlPrueflisteRO Create(DateTime startDate, DateTime endDate, String zadNummer, String kostentraeger = "LWL") + public static LwlPrueflisteRO Create(DateTime startDate, DateTime endDate, String zadNummer, long? customerOid, String kostentraeger = "LWL") { var ro = new LwlPrueflisteRO(); ro.ServiceRecords = new List(); @@ -30,6 +30,12 @@ namespace BeWo.Report.ReportObjects } endDate = endDate.Date.AddDays(1); + String customerFilter = ""; + if (customerOid.HasValue && customerOid.Value > 0) + { + customerFilter = String.Format("and c.Oid = {0}", customerOid); + } + String sql = String.Format(@" SELECT sr.Oid, @@ -57,8 +63,9 @@ JOIN costbearer cb on cb.oid = c2s.costbeareroid JOIN organisation o on o.costbeareroid = cb.oid where (o.Name = '{2}') and sr.startdate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{1:yyyy-MM-dd}' -order by p.Firstname, p.lastname, sr.startdate -", startDate, endDate, kostentraeger); +{3} +order by p.lastname, p.Firstname, sr.startdate +", startDate, endDate, kostentraeger, customerFilter); var sqlresult = DAOFactory.SearchDAO.GetSqlResult(sql); // //update customer set debitornumber = '5' + debitornumber where debitornumber is not null diff --git a/ReportImp/AkggMid/Translation/TranslationDictionary.cs b/ReportImp/AkggMid/Translation/TranslationDictionary.cs new file mode 100644 index 000000000..4dc5cba21 --- /dev/null +++ b/ReportImp/AkggMid/Translation/TranslationDictionary.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts.Compact; +using BS.Shared.Extensions; + +namespace HPHBersenbrueck.Translation +{ + public class CustomTranslationDictionary : TranslationDictionary + { + public override Dictionary GetTranslationDictionary() + { + var dict = base.GetTranslationDictionary(); + AddOrReplaceTranslation(dict, "Probezeit (Monate)", "tats. Mindestarbeitszeit"); + return dict; + } + } +} diff --git a/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs index b83ca2dd2..f5cf08970 100644 --- a/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/SHKServiceSBD/CustomMitarbeiterstundenkontoBerechnung.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Report.ReportObjects; using BS.Shared; @@ -10,13 +11,24 @@ namespace SHKServiceSBD { public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung { + private Dictionary _SollStundenProTagDict = new Dictionary(); //Speicher die Sollstunden aus den Betreuungszeiten des Kindes pro EmployeeOid und Tag (Key = {oid}_{datum]) + private Organisation _Martinsschule = null; protected override void StarteBerechnung(DateTime berichtsAnfang, DateTime berichtsEnde, MitarbeiterstundenkontoRO.EmployeeDetail empDetail) { + SucheMartinsschule(); SetzeBundesland(empDetail); - BerechneKindGesamtSollZeit(empDetail, berichtsAnfang, berichtsEnde); + BerechneBewilligteSollZeitProWoche(empDetail, berichtsAnfang); + BerechneAlleSollZeiten(empDetail, berichtsAnfang, berichtsEnde); - BerechneSollZeiten(empDetail, berichtsAnfang, berichtsEnde); + } + + private void SucheMartinsschule() + { + if (_Martinsschule == null) + { + _Martinsschule = DAOFactory.SearchDAO.FindOrganisation("Martinsschule", false).FirstOrDefault(); + } } private void SetzeBundesland(MitarbeiterstundenkontoRO.EmployeeDetail empDetail) @@ -52,74 +64,120 @@ namespace SHKServiceSBD this.vacationService.Bundesland = bundesland; } - private void BerechneSollZeiten(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, DateTime berichtsAnfang, DateTime berichtsEnde) + private bool IstTeamMartinsschule(MitarbeiterstundenkontoRO.EmployeeDetail empDetail) + { + return empDetail.Teams != null && empDetail.Teams.Any(t => t.Name == "Martinsschule"); + } + + private IList GetSollArbeitszeiten(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, Customer customer) + { + //Prüfe ob Mitarbeiter zu Team Martinsschule gehört, dann nehme die Betreuungszeiten (Stundenplan) der Schule, sonst den des betreuten Klienten + if (IstTeamMartinsschule(empDetail) && _Martinsschule != null) + { + return _Martinsschule.Arbeitszeiten; + } + else + { + return customer.Arbeitszeiten; + } + + } + + private void BerechneAlleSollZeiten(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, DateTime berichtsAnfang, DateTime berichtsEnde) { - //Ermittle hier folgendes und speicher es in Custom2: //Abesenheit "MA krank in der Schulzeit": //Wenn ein Kind zugeordnet ist, dann wird die Zeit von dem entsprechenden Tag aus der Betreuungszeit genommen und bei Krank eingetragen //Wenn ein die Ma der Martinschule zugeordnet sind, dann wird die Zeit genommen, die in der Organisation Martinschule hinterlegt ist und bei Krank eingetragen //Wenn kein Kind zugeordnet ist, dann Vertragliche Arbeitszeit, und bei Krank eingetragen - + //Prüfe Team Martinsschule + bool istTeamMartinsschule = empDetail.Teams != null && empDetail.Teams.Any(t => t.Name == "Martinsschule"); - + if (istTeamMartinsschule && _Martinsschule != null) + { + BerechneSollZeitenDictionary(_Martinsschule.Arbeitszeiten, empDetail, berichtsAnfang, berichtsEnde); + } foreach (var e2c in empDetail.Employee.Employee2CustomerList) { var kind = e2c.Customer; - BerechneKindSollZeit(empDetail, kind, berichtsAnfang, berichtsEnde); + BerechneSollZeitenDictionary(kind.Arbeitszeiten, empDetail, berichtsAnfang, berichtsEnde); } } - private void BerechneKindGesamtSollZeit(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, DateTime berichtsAnfang, DateTime berichtsEnde) + private void BerechneBewilligteSollZeitProWoche(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, DateTime datum) { - + decimal sollProWoche = 0; + if (IstTeamMartinsschule(empDetail) && _Martinsschule != null) + { + sollProWoche = BerechneSollZeitFuerWoche(empDetail.Employee, _Martinsschule.Arbeitszeiten, datum); + } foreach (var e2c in empDetail.Employee.Employee2CustomerList) { var kind = e2c.Customer; - - BerechneKindSollZeit(empDetail, kind, berichtsAnfang, berichtsEnde); + sollProWoche += BerechneSollZeitFuerWoche(empDetail.Employee, kind.Arbeitszeiten, datum); } + empDetail.Custom1 = sollProWoche; } - private void BerechneKindSollZeit(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, Customer kind, DateTime start, DateTime ende) + private decimal BerechneSollZeitFuerWoche(Employee e, IList arbeitszeiten, DateTime datum) { decimal soll = 0; - if (kind.Arbeitszeiten != null && kind.Arbeitszeiten.Count > 0) - { - - foreach (var az in kind.Arbeitszeiten) + if (arbeitszeiten != null) + { + foreach (var az in arbeitszeiten) { - if ((!az.GueltigVon.HasValue || az.GueltigVon.Value <= ende) && - (!az.GueltigBis.HasValue || az.GueltigBis.Value >= start)) + if ((!az.GueltigVon.HasValue || az.GueltigVon.Value <= datum) && (!az.GueltigBis.HasValue || az.GueltigBis.Value >= datum)) { foreach (var ae in az.ArbeitszeitEintraege) { - if (ae.Employee == null || ae.Employee.Oid == empDetail.Employee.Oid) + if (ae.Employee == null || ae.Employee.Oid == e.Oid) { - String dateStr1 = String.Format("{0:dd.MM.yyyy} {1}", DateTime.Now, ae.UhrzeitVon); - String dateStr2 = String.Format("{0:dd.MM.yyyy} {1}", DateTime.Now, ae.UhrzeitBis); - - DateTime date1; - DateTime date2; - - if (DateTime.TryParse(dateStr1, out date1) && DateTime.TryParse(dateStr2, out date2)) - { - - soll += (decimal)date2.Subtract(date1).TotalHours; - } + soll += ae.BerechneStunden(); } } } } } + return soll; + + } + + private void BerechneSollZeitenDictionary(IList arbeitszeiten, MitarbeiterstundenkontoRO.EmployeeDetail empDetail, DateTime start, DateTime ende) + { + + DateTime dt = start; + while (dt <= ende) + { + String key = String.Format("{0}_{1:yyyyMMdd}", empDetail.Employee.Oid, dt); + if (!_SollStundenProTagDict.ContainsKey(key)) + { + decimal soll = 0; + foreach (var az in arbeitszeiten) + { + if ((!az.GueltigVon.HasValue || az.GueltigVon.Value <= dt) && (!az.GueltigBis.HasValue || az.GueltigBis.Value >= dt)) + { + foreach (var ae in az.ArbeitszeitEintraege) + { + if (ae.Employee == null || ae.Employee.Oid == empDetail.Employee.Oid) + { + if (ae.IstAmGleichenWochentag(dt)) + { + soll += ae.BerechneStunden(); + } + } + } + } + } + _SollStundenProTagDict[key] = soll; + } + } - empDetail.Custom1 += soll; } @@ -288,6 +346,7 @@ namespace SHKServiceSBD at.AbsenceReason.Description.ToLower().Contains("ohne lohnfortzahlung") || at.AbsenceReason.Description.ToLower().Contains("elternzeit") || at.AbsenceReason.Description.ToLower().Contains("mutterschutz") || + at.AbsenceReason.Description.ToLower().Contains("krankengeld") || at.AbsenceReason.Description.ToLower().Contains("unbezahlter urlaub")) { dd.Custom1 = "x"; // String.Format("{0:0.00}", ed.SollProTag * 60); @@ -387,7 +446,7 @@ namespace SHKServiceSBD public override decimal? GetSollStundenForAbsenceTime(MitarbeiterstundenkontoRO.EmployeeDetail ed, AbsenceTime at, DateTime datum) { - if (at.AbsenceReason.Description.Contains("krank in der Schulzeit") || at.AbsenceReason.Description.Contains("eigenes Kind krank")) + if (at.AbsenceReason.Description.Contains("krank in der Schulzeit") || at.AbsenceReason.Description.Contains("eigenes Kind krank") || at.AbsenceReason.Description.Contains("Beschäftigungsverbot")) { return BerechneSollStundenFuerTag(ed, datum); } diff --git a/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.cs b/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.cs index 1d2d2ea4d..004aab1e1 100644 --- a/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.cs +++ b/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.cs @@ -31,7 +31,7 @@ namespace SHKServiceSBD var c = ed.Employee.GetValidContractForDate(pRO.ReportStartDate); if (c != null) { - if (c.MonthlyTotalHours.HasValue) + if (c.MonthlyTotalHours.HasValue && c.MonthlyTotalHours.Value > 0) { ed.Regelarbeitszeit = String.Format("{0:0.00} Stunden im Monat", c.MonthlyTotalHours); } diff --git a/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.designer.cs b/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.designer.cs index 403172bc0..0f6b23ac5 100644 --- a/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.designer.cs +++ b/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.designer.cs @@ -108,6 +108,7 @@ namespace SHKServiceSBD this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); @@ -128,7 +129,6 @@ namespace SHKServiceSBD this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldPause = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldSummeUrlaubKrankArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); @@ -146,7 +146,8 @@ namespace SHKServiceSBD // // Detail1 // - this.Detail1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.Detail1.HeightF = 0F; this.Detail1.Name = "Detail1"; this.Detail1.StylePriority.UseFont = false; @@ -155,7 +156,8 @@ namespace SHKServiceSBD // this.xrTableDetail.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableDetail.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTableDetail.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.xrTableDetail.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.xrTableDetail.Name = "xrTableDetail"; this.xrTableDetail.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -248,7 +250,7 @@ namespace SHKServiceSBD new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom1")}); this.xrTableCell30.Name = "xrTableCell30"; this.xrTableCell30.StylePriority.UseTextAlignment = false; - this.xrTableCell30.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell30.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell30.Weight = 0.067628480462697108D; // // ruleIstFeiertagOderWE @@ -284,7 +286,7 @@ namespace SHKServiceSBD // this.Detail2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTableDetail}); - this.Detail2.Font = new System.Drawing.Font("Arial", 8F); + this.Detail2.Font = new DevExpress.Drawing.DXFont("Arial", 8F); this.Detail2.HeightF = 22F; this.Detail2.Name = "Detail2"; this.Detail2.StylePriority.UseFont = false; @@ -293,7 +295,7 @@ namespace SHKServiceSBD // this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTableHeader}); - this.GroupHeader2.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.GroupHeader2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.GroupHeader2.HeightF = 30F; this.GroupHeader2.Name = "GroupHeader2"; this.GroupHeader2.StylePriority.UseFont = false; @@ -393,7 +395,7 @@ namespace SHKServiceSBD this.GroupHeader3.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.lblMonat, this.xrTable2}); - this.GroupHeader3.Font = new System.Drawing.Font("Arial", 10F); + this.GroupHeader3.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.GroupHeader3.HeightF = 128.3334F; this.GroupHeader3.Level = 1; this.GroupHeader3.Name = "GroupHeader3"; @@ -404,7 +406,7 @@ namespace SHKServiceSBD // this.lblMonat.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReportStartDate", "Stundenkonto {0:MMMM yy}")}); - this.lblMonat.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold); + this.lblMonat.Font = new DevExpress.Drawing.DXFont("Arial", 14F, DevExpress.Drawing.DXFontStyle.Bold); this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); this.lblMonat.Multiline = true; this.lblMonat.Name = "lblMonat"; @@ -442,7 +444,7 @@ namespace SHKServiceSBD // // xrTableCell1 // - this.xrTableCell1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTableCell1.StylePriority.UseFont = false; @@ -456,7 +458,7 @@ namespace SHKServiceSBD // this.xrTableCell25.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.FullName")}); - this.xrTableCell25.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell25.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell25.Multiline = true; this.xrTableCell25.Name = "xrTableCell25"; this.xrTableCell25.StylePriority.UseFont = false; @@ -466,7 +468,7 @@ namespace SHKServiceSBD // // xrTableCell11 // - this.xrTableCell11.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell11.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell11.Name = "xrTableCell11"; this.xrTableCell11.StylePriority.UseFont = false; this.xrTableCell11.StylePriority.UseTextAlignment = false; @@ -478,7 +480,7 @@ namespace SHKServiceSBD // this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.FirstName")}); - this.xrTableCell12.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell12.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell12.Name = "xrTableCell12"; this.xrTableCell12.StylePriority.UseFont = false; this.xrTableCell12.StylePriority.UseTextAlignment = false; @@ -498,7 +500,7 @@ namespace SHKServiceSBD // // xrTableCell6 // - this.xrTableCell6.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell6.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTableCell6.StylePriority.UseFont = false; @@ -521,7 +523,7 @@ namespace SHKServiceSBD // // xrTableCell13 // - this.xrTableCell13.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell13.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell13.Name = "xrTableCell13"; this.xrTableCell13.StylePriority.UseFont = false; this.xrTableCell13.StylePriority.UseTextAlignment = false; @@ -550,7 +552,7 @@ namespace SHKServiceSBD // // xrTableCell21 // - this.xrTableCell21.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell21.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell21.Name = "xrTableCell21"; this.xrTableCell21.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTableCell21.StylePriority.UseFont = false; @@ -571,7 +573,7 @@ namespace SHKServiceSBD // // xrTableCell28 // - this.xrTableCell28.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableCell28.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableCell28.Name = "xrTableCell28"; this.xrTableCell28.StylePriority.UseFont = false; this.xrTableCell28.StylePriority.UseTextAlignment = false; @@ -594,7 +596,7 @@ namespace SHKServiceSBD this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable4, this.xrTable1}); - this.GroupFooter2.Font = new System.Drawing.Font("Arial", 10F); + this.GroupFooter2.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.GroupFooter2.HeightF = 116.6667F; this.GroupFooter2.KeepTogether = true; this.GroupFooter2.Name = "GroupFooter2"; @@ -629,7 +631,8 @@ namespace SHKServiceSBD // // xrTableCell64 // - this.xrTableCell64.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTableCell64.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.xrTableCell64.Name = "xrTableCell64"; this.xrTableCell64.StylePriority.UseFont = false; this.xrTableCell64.StylePriority.UseTextAlignment = false; @@ -902,7 +905,7 @@ namespace SHKServiceSBD this.xrTableCell57, this.xrTableCell58, this.xrTableCell26}); - this.xrTableRow6.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTableRow6.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.xrTableRow6.Name = "xrTableRow6"; this.xrTableRow6.StylePriority.UseFont = false; this.xrTableRow6.Weight = 0.8D; @@ -910,7 +913,7 @@ namespace SHKServiceSBD // xrTableCell48 // this.xrTableCell48.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableCell48.Font = new System.Drawing.Font("Arial", 10F); + this.xrTableCell48.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrTableCell48.Name = "xrTableCell48"; this.xrTableCell48.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 8, 0, 0, 100F); this.xrTableCell48.StylePriority.UseBorders = false; @@ -926,7 +929,7 @@ namespace SHKServiceSBD this.xrTableCell57.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; this.xrTableCell57.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.fieldSummeUrlaubKrankArbeitszeit", "{0:0.00}")}); - this.xrTableCell57.Font = new System.Drawing.Font("Arial", 10F); + this.xrTableCell57.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.xrTableCell57.Name = "xrTableCell57"; this.xrTableCell57.StylePriority.UseBorders = false; this.xrTableCell57.StylePriority.UseFont = false; @@ -959,13 +962,17 @@ namespace SHKServiceSBD this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell26.Weight = 0.11143081848591821D; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); + // // Title // this.Title.BackColor = System.Drawing.Color.White; this.Title.BorderColor = System.Drawing.SystemColors.ControlText; this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; this.Title.BorderWidth = 1F; - this.Title.Font = new System.Drawing.Font("Times New Roman", 24F); + this.Title.Font = new DevExpress.Drawing.DXFont("Times New Roman", 24F); this.Title.ForeColor = System.Drawing.Color.Black; this.Title.Name = "Title"; // @@ -975,7 +982,7 @@ namespace SHKServiceSBD this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText; this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None; this.FieldCaption.BorderWidth = 1F; - this.FieldCaption.Font = new System.Drawing.Font("Times New Roman", 10F, System.Drawing.FontStyle.Bold); + this.FieldCaption.Font = new DevExpress.Drawing.DXFont("Times New Roman", 10F, DevExpress.Drawing.DXFontStyle.Bold); this.FieldCaption.ForeColor = System.Drawing.Color.Black; this.FieldCaption.Name = "FieldCaption"; // @@ -985,7 +992,7 @@ namespace SHKServiceSBD this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText; this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None; this.PageInfo.BorderWidth = 1F; - this.PageInfo.Font = new System.Drawing.Font("Times New Roman", 8F); + this.PageInfo.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F); this.PageInfo.ForeColor = System.Drawing.Color.Black; this.PageInfo.Name = "PageInfo"; // @@ -995,7 +1002,7 @@ namespace SHKServiceSBD this.DataField.BorderColor = System.Drawing.SystemColors.ControlText; this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None; this.DataField.BorderWidth = 1F; - this.DataField.Font = new System.Drawing.Font("Times New Roman", 8F); + this.DataField.Font = new DevExpress.Drawing.DXFont("Times New Roman", 8F); this.DataField.ForeColor = System.Drawing.SystemColors.ControlText; this.DataField.Name = "DataField"; // @@ -1013,8 +1020,7 @@ namespace SHKServiceSBD // // xrPageInfo1 // - this.xrPageInfo1.Font = new System.Drawing.Font("Arial", 8F); - this.xrPageInfo1.Format = "erstellt am {0:dd.MM.yyyy HH:mm}"; + this.xrPageInfo1.Font = new DevExpress.Drawing.DXFont("Arial", 8F); this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(474.9999F, 6.999974F); this.xrPageInfo1.Name = "xrPageInfo1"; this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; @@ -1023,6 +1029,7 @@ namespace SHKServiceSBD this.xrPageInfo1.StylePriority.UseFont = false; this.xrPageInfo1.StylePriority.UseTextAlignment = false; this.xrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrPageInfo1.TextFormatString = "erstellt am {0:dd.MM.yyyy HH:mm}"; // // fieldSumSpecial // @@ -1117,10 +1124,6 @@ namespace SHKServiceSBD this.fieldSummeUrlaubKrankArbeitszeit.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldSummeUrlaubKrankArbeitszeit.Name = "fieldSummeUrlaubKrankArbeitszeit"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); - // // Mitarbeiterarbeitszeitkonto // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -1144,10 +1147,10 @@ namespace SHKServiceSBD this.fieldSummeUrlaubKrankArbeitszeit}); this.DataSource = this.bindingSource1; this.DisplayName = "Mitarbeiterstundenkonto"; - this.Font = new System.Drawing.Font("Arial", 8F); + this.Font = new DevExpress.Drawing.DXFont("Arial", 8F); this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { this.ruleIstFeiertagOderWE}); - this.Margins = new System.Drawing.Printing.Margins(40, 40, 50, 50); + this.Margins = new DevExpress.Drawing.DXMargins(40F, 40F, 50F, 50F); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; @@ -1156,7 +1159,7 @@ namespace SHKServiceSBD this.FieldCaption, this.PageInfo, this.DataField}); - this.Version = "17.1"; + this.Version = "23.2"; ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); diff --git a/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.resx b/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.resx index 0f60e7858..c7e0d4bdf 100644 --- a/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.resx +++ b/ReportImp/SHKServiceSBD/Mitarbeiterarbeitszeitkonto.resx @@ -117,7 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - \ No newline at end of file diff --git a/ReportImp/SynpraxReports/SynpraxReportCreator.cs b/ReportImp/SynpraxReports/SynpraxReportCreator.cs index f3968fc73..854325868 100644 --- a/ReportImp/SynpraxReports/SynpraxReportCreator.cs +++ b/ReportImp/SynpraxReports/SynpraxReportCreator.cs @@ -41,8 +41,15 @@ namespace SynpraxReports { DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out end); } - - var ro = LwlPrueflisteRO.Create(start, end, "60‐33/01‐13/40 N23"); + long? customerOid = null; + if (queryRo.Rows[0].Field3 != null) + { + if (Int64.TryParse(queryRo.Rows[0].Field3.ToString(), out var oidOut)) + { + customerOid = oidOut; + } + } + var ro = LwlPrueflisteRO.Create(start, end, "60‐33/01‐13/40 N23", customerOid); liste.SetReportDataSource(ro); } diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 84d8afa46..919658cad 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -100,7 +100,7 @@ namespace BeWo.Service.Plugins //t = "3830114427"; // FiZ Familie im Zentrum Hof //t = "7138297573"; // Tagwerk betreutes wohnen //t = "1008896531"; // BeWo Auxilio - t = "9383760246"; // Die Kette + //t = "9383760246"; // Die Kette //t = "5915565037"; // Lebenshilfe Remscheid //t = "3350425974"; // BeWo Rückenwind //t = "9447917179"; // LH Rodenkirchen diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs index 0e905b726..7fbf1d51f 100644 --- a/Shared/BeWoEntityEnums.cs +++ b/Shared/BeWoEntityEnums.cs @@ -1141,6 +1141,13 @@ namespace BS.Shared NachTeam } + public enum KassenSortOrderEnum + { + NachName, + NachDatumAufsteigend, + NachDatumAbsteigend + } + public enum Platzhaltergruppen { Anschrift, diff --git a/Shared/Core/SettingsKeys.cs b/Shared/Core/SettingsKeys.cs index 0f15b177f..d52806435 100644 --- a/Shared/Core/SettingsKeys.cs +++ b/Shared/Core/SettingsKeys.cs @@ -28,6 +28,8 @@ public static string LastSelectedServiceRecordTimeIntervalDays => "LastSelectedServiceRecordTimeIntervalDays"; public static string LastSelectedServiceRecordMonth => "LastSelectedServiceRecordMonth"; + public static string LastKassenSortOrder => "LastKassenSortOrder"; + public static string ServiceRecordAllowChangeHours => "ServiceRecordAllowChangeHours"; public static string LetzteZeiterfassungsDauer => "LetzteZeiterfassungsDauer";