diff --git a/BeWo/AI/View/AiChatView.xaml.cs b/BeWo/AI/View/AiChatView.xaml.cs
index 344b919b3..535d21ed6 100644
--- a/BeWo/AI/View/AiChatView.xaml.cs
+++ b/BeWo/AI/View/AiChatView.xaml.cs
@@ -31,21 +31,41 @@ namespace BeWo.AI.View
{
public partial class AiChatView : BeWoView
{
-
public event Action CloseButtonClicked;
+
+ int type = 0; //0 = ServiceRecordQuery, 1 = SingleCustomerQuery, 2 = AllCustomerQuery
+
private long cb2scOid;
+ private long customerOid;
+ private TableID tableID;
private DateTime startDate;
private DateTime endDate;
- public AiChatView(long c2sOid, DateTime start, DateTime end)
+ public AiChatView()
{
InitializeComponent();
+
+ }
+
+ public void InitServiceRecordQuery(long c2sOid, DateTime start, DateTime end)
+ {
+ type = 0;
this.cb2scOid = c2sOid;
this.startDate = start;
this.endDate = end;
}
-
-
+
+ public void InitSingleCustomerQuery(long customerOid)
+ {
+ type = 1;
+ this.customerOid = customerOid;
+ }
+
+ public void InitObjectQuery(TableID tableId)
+ {
+ type = 2;
+ tableID = tableId;
+ }
private void ReloadViewModel(AiChatDC dc)
{
@@ -57,14 +77,39 @@ namespace BeWo.AI.View
var acdc = new AiChatDC();
acdc.Prompt = TextBoxAnfrage.Text;
- ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate),
- dc =>
- {
- this.Dispatch(delegate
+ if (type == 1)
+ {
+ ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForSingleCustomer(acdc, customerOid),
+ dc =>
{
- ReloadViewModel(dc);
+ this.Dispatch(delegate
+ {
+ ReloadViewModel(dc);
+ });
});
- });
+ }
+ else if (type == 2)
+ {
+ ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForObjects(acdc, (int)tableID),
+ dc =>
+ {
+ this.Dispatch(delegate
+ {
+ ReloadViewModel(dc);
+ });
+ });
+ }
+ else
+ {
+ ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate),
+ dc =>
+ {
+ this.Dispatch(delegate
+ {
+ ReloadViewModel(dc);
+ });
+ });
+ }
}
private void btnClose_Click(object sender, RoutedEventArgs e)
{
diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 79227a577..8e898f11b 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -39,16 +39,16 @@
false
true
false
- https://app.ownsoft.de/
+ https://app.ownsoft.de/test/
de-DE
BeWoPlaner
ownSoft GmbH
- 2.0.1.240
+ 2.0.1.242
true
publish.htm
false
true
- 241
+ 243
2.0.1.%2a
false
true
@@ -826,6 +826,7 @@
MSBuild:Compile
Designer
+
AiChatView.xaml
diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user
index 3eff8c8d2..5b9016668 100644
--- a/BeWo/BeWo.csproj.user
+++ b/BeWo/BeWo.csproj.user
@@ -2,7 +2,7 @@
D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\
- https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/
+ https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/
https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 072729246..761d0808d 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -50,7 +50,7 @@ namespace BeWo
public static MainControl MainControl;
public static string ShortVersion = "3.21";
- public static string Version = "Version 3.21";
+ public static string Version = "Version 3.21 (GKV Test)";
public static int RenderTier = 0;
@@ -368,10 +368,10 @@ namespace BeWo
showDienstplanung = true;
}
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.Arbeitszeiterfassung);
+ val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowWorktime);
if (val != null && val.Equals("1"))
{
- AppSettings.Arbeitszeiterfassung = true;
+ AppSettings.ShowWorktime = true;
}
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EnableArbeitszeiterfassung);
if (val != null && val.Equals("1"))
@@ -508,6 +508,9 @@ namespace BeWo
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAI);
AppSettings.ShowAI = val != null && val.Equals("1");
+ val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAIInternal);
+ AppSettings.ShowAIInternal = val != null && val.Equals("1");
+
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.MoKSessionTimeout);
if(int.TryParse(val, out var sessionTimeout))
{
@@ -592,6 +595,7 @@ namespace BeWo
showHilfeplanBezeichnung = true;
AppSettings.AllowStorno = true;
AppSettings.ShowAI = true;
+ AppSettings.ShowAIInternal = true;
//showInfoButtonInCalender = true;
#endif
diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs
index 8256fc352..3126d116d 100644
--- a/BeWo/Core/Config/AppSettings.cs
+++ b/BeWo/Core/Config/AppSettings.cs
@@ -425,7 +425,7 @@ namespace BeWo.Core.Config
public bool DontShowSpitzabrechnung { get; set; }
public bool ShowDienstplanung { get; set; }
- public bool Arbeitszeiterfassung { get; set; }
+ public bool ShowWorktime { get; set; }
public bool EnableArbeitszeiterfassung { get; set; }
public bool EnableAutomaticPauses { get; set; }
public bool EnableRestTimeWarning { get; set; }
@@ -447,6 +447,8 @@ namespace BeWo.Core.Config
public bool ShowAI { get; set; }
+ public bool ShowAIInternal { get; set; }
+
public bool AllowGkvAbrechnung { get; set; }
public bool ShowImportAbschlagszahlungen { get; set; }
diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs
index 39df78623..166e1bb66 100644
--- a/BeWo/LoginControl.xaml.cs
+++ b/BeWo/LoginControl.xaml.cs
@@ -924,6 +924,8 @@ namespace BeWo
{
if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded)
{
+ Translator t = new Translator(new MultiLanguage.ServiceTranslator());
+
grid_root.Children.Remove(lWaitLayer);
var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword);
var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich");
diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index 00fc5a290..1a7b9c55a 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -5465,6 +5465,15 @@ namespace BeWo.ServiceProxy
"t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.AiChatDC CreateAiQueryForServiceRecords(BS.Shared.DataContracts.AiChatDC acdc, long cb2scOid, System.DateTime startdate, System.DateTime enddate);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomer", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerBeWoFaultFaul" +
+ "t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjects", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTable", ReplyAction="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableRespons" +
"e")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableBeWoFau" +
@@ -7475,6 +7484,16 @@ namespace BeWo.ServiceProxy
return base.Channel.CreateAiQueryForServiceRecords(acdc, cb2scOid, startdate, enddate);
}
+ public BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid)
+ {
+ return base.Channel.CreateAiQueryForSingleCustomer(acdc, customerOid);
+ }
+
+ public BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid)
+ {
+ return base.Channel.CreateAiQueryForObjects(acdc, objectTid);
+ }
+
public void DeleteCertainDienstEintragOutOfTable(long dienstEintragOid)
{
base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid);
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml
index 082070e1e..22c2af212 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml
@@ -68,8 +68,11 @@
-
-
+
+
+
+
+
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml.cs b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml.cs
index 69f700742..1d4cd7ecd 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml.cs
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml.cs
@@ -55,6 +55,35 @@ namespace BeWo.View.Detail.Accounting
}
}
+ private void btn_SelectAllNeu(object sender, RoutedEventArgs e)
+ {
+ SetAllRowsSelection(true, false);
+ }
+
+ private void btn_SelectAllDiff(object sender, RoutedEventArgs e)
+ {
+ SetAllRowsSelection(false, true);
+ }
+
+ private void btn_DeselectAll(object sender, RoutedEventArgs e)
+ {
+ SetAllRowsSelection(false, false);
+ }
+
+ private void SetAllRowsSelection(bool selectNew, bool selectDiff)
+ {
+ var list = this.grid_newInvoices.ItemsSource as BindingList;
+ if (list != null)
+ {
+ foreach (var item in list)
+ {
+ item.InvoiceBase.NeuErstellen = selectNew;
+ item.InvoiceBase.DiffErstellen = selectDiff;
+ }
+ grid_newInvoices.RefreshData();
+ }
+ }
+
private void Fire()
{
if (this.Closed != null)
diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml
index 485ea1435..c40c4f076 100644
--- a/BeWo/View/Detail/CustomerView.xaml
+++ b/BeWo/View/Detail/CustomerView.xaml
@@ -517,7 +517,17 @@
Grid.Column="1" Grid.Row="4"
Height="23" Margin="3"/>
-
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs
index 56758ee1d..ae98f4139 100644
--- a/BeWo/View/Detail/CustomerView.xaml.cs
+++ b/BeWo/View/Detail/CustomerView.xaml.cs
@@ -49,7 +49,7 @@ using HorizontalAlignment = System.Windows.HorizontalAlignment;
using Hyperlink = System.Windows.Documents.Hyperlink;
using MessageBox = System.Windows.MessageBox;
using VerticalAlignment = System.Windows.VerticalAlignment;
-
+using BeWo.AI;
namespace BeWo.View.Detail
{
@@ -160,6 +160,14 @@ namespace BeWo.View.Detail
}
+ if (BeWoApp.AppSettings.ShowAIInternal)
+ {
+ ButtonOpenAiChat.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ ButtonOpenAiChat.Visibility = Visibility.Collapsed;
+ }
#if DEBUG
tabitem_stundenplan.Visibility = Visibility.Visible;
#endif
@@ -1845,6 +1853,13 @@ namespace BeWo.View.Detail
BeWoUtils.ShowImageForm(Img.Source);
}
+ private void OpenAiChat(object sender, MouseButtonEventArgs e)
+ {
+
+ AiChatController.ShowAiChatViewForSingleCustomer(ViewModel.DataContract.CustomerOid.Value, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
+
+ }
+
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
diff --git a/BeWo/View/Detail/MandatorView.xaml.cs b/BeWo/View/Detail/MandatorView.xaml.cs
index fc8a4d925..f3f795f07 100644
--- a/BeWo/View/Detail/MandatorView.xaml.cs
+++ b/BeWo/View/Detail/MandatorView.xaml.cs
@@ -30,7 +30,7 @@ namespace BeWo.View.Detail
GroupOwnChatSettings.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.AppSettings.Arbeitszeiterfassung)
+ if (!BeWoApp.AppSettings.ShowWorktime)
{
EnableArbeitszeiterfassung.Visibility = Visibility.Collapsed;
EnableAutomaticPauses.Visibility = Visibility.Collapsed;
diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml
index 41ee3ea08..79d7813e8 100644
--- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml
+++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml
@@ -1410,7 +1410,7 @@
beWoWindow.Close();
-
- beWoWindow.ShowDialog();
+ AiChatController.ShowAiChatViewForServiceRecords(c2sOid, earliestStartDate, latestEndDate, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth));
}
private void multiSupportConceptControl_ListChanged(object sender, EventArgs> e)
diff --git a/BeWo/View/Navigation/CustomerNavigationView.xaml b/BeWo/View/Navigation/CustomerNavigationView.xaml
index c35972a2e..a414d2a2e 100644
--- a/BeWo/View/Navigation/CustomerNavigationView.xaml
+++ b/BeWo/View/Navigation/CustomerNavigationView.xaml
@@ -167,6 +167,7 @@
OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject"
ArchiveObject="mainNavigationView_ArchiveObject"
+ OpenAiChat="MainNavigationView_OpenAiChat"
ExcelExport="mainNavigationView_ExcelExport"
Print="mainNavigationView_Print"
DeleteDemands="DeleteAll, CustomerView_Delete"
diff --git a/BeWo/View/Navigation/CustomerNavigationView.xaml.cs b/BeWo/View/Navigation/CustomerNavigationView.xaml.cs
index d9a41ad80..39ed79d67 100644
--- a/BeWo/View/Navigation/CustomerNavigationView.xaml.cs
+++ b/BeWo/View/Navigation/CustomerNavigationView.xaml.cs
@@ -23,7 +23,7 @@ using BS.Shared.Extensions;
using BS.Shared.Translation;
using Microsoft.Win32;
-
+using BeWo.AI;
namespace BeWo.View.Navigation
{
@@ -59,9 +59,13 @@ namespace BeWo.View.Navigation
//supportConceptFilterComboBox.DisplayMemberPath = "DisplayName";
//supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged";
supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style;
-
- if(BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
+ if (BeWoApp.AppSettings.ShowAIInternal)
+ {
+ mainNavigationView.btnOpenAi.Visibility = Visibility.Visible;
+ }
+
+ if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All));
}
@@ -467,5 +471,10 @@ namespace BeWo.View.Navigation
});
});
}
+
+ private void MainNavigationView_OpenAiChat()
+ {
+ AiChatController.ShowAiChatViewForObjects(TableID.Customer, 800, 1200);
+ }
}
}
\ No newline at end of file
diff --git a/BeWo/View/Navigation/MainNavigationView.xaml b/BeWo/View/Navigation/MainNavigationView.xaml
index 79d58ef1d..c3783df33 100644
--- a/BeWo/View/Navigation/MainNavigationView.xaml
+++ b/BeWo/View/Navigation/MainNavigationView.xaml
@@ -103,6 +103,7 @@
+
Excel Export
diff --git a/BeWo/View/Navigation/MainNavigationView.xaml.cs b/BeWo/View/Navigation/MainNavigationView.xaml.cs
index 7edd6f3e7..bb07ba110 100644
--- a/BeWo/View/Navigation/MainNavigationView.xaml.cs
+++ b/BeWo/View/Navigation/MainNavigationView.xaml.cs
@@ -92,6 +92,8 @@ namespace BeWo.View.Navigation
public delegate void ImportObjectsDelegate();
+ public delegate void OpenAiChatDelegate();
+
public delegate bool DeleteObjectDelegate(IFilterableDC obj);
public delegate void OpenObjectDelegate(IFilterableDC obj);
@@ -108,6 +110,8 @@ namespace BeWo.View.Navigation
public event ImportObjectsDelegate ImportObjects;
+ public event OpenAiChatDelegate OpenAiChat;
+
public event DeleteObjectDelegate DeleteObject;
public event EventHandler>> ExcelExport;
@@ -214,6 +218,19 @@ namespace BeWo.View.Navigation
}
}
+ public bool OpenAiButtonVisible
+ {
+ get
+ {
+ return btnOpenAi.Visibility == Visibility.Visible;
+ }
+
+ set
+ {
+ btnOpenAi.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
+ }
+ }
+
//[TypeConverter(typeof(UserRightTypeArrayConverter))]
//public UserRightType[] ImportDemands
//{
@@ -601,6 +618,14 @@ namespace BeWo.View.Navigation
}
}
+ private void btnOpenAi_Click(object sender, RoutedEventArgs e)
+ {
+ if (OpenAiChat != null)
+ {
+ OpenAiChat();
+ }
+ }
+
private void btnCopy_Click(object sender, RoutedEventArgs e)
{
if (CopyObject != null)
diff --git a/BeWo/View/TwoFactorAuthMessageDialog.xaml.cs b/BeWo/View/TwoFactorAuthMessageDialog.xaml.cs
index 90777bb63..5e7046da2 100644
--- a/BeWo/View/TwoFactorAuthMessageDialog.xaml.cs
+++ b/BeWo/View/TwoFactorAuthMessageDialog.xaml.cs
@@ -62,7 +62,7 @@ namespace BeWo.View
private void OkayButton_OnClick(object sender, RoutedEventArgs e)
{
- var result = ServiceFacade.DoUserServiceSync(u => u.IsUserValidTwoFactor(this.username, this.password, null, textbox.Text));
+ var result = ServiceFacade.DoUserServiceSync(u => u.IsUserValidTwoFactor(this.username, this.password, textbox.Text, null));
if (result == UserValidationResult.UserValid)
{
BeWoApp.TwoFactorPin = textbox.Text;
diff --git a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
index e2c9ec31d..dbacbcad9 100644
--- a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
+++ b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
@@ -736,7 +736,7 @@ namespace BeWo.ViewModel.ListViewModel
else
{
var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals);
-
+ SetDocTypes(newVM);
// newVM.RoundedDuration = newVM.GroupRoundedDuration.Value;
groupVMs.Add(key, newVM);
@@ -752,7 +752,7 @@ namespace BeWo.ViewModel.ListViewModel
{
// ###AddServiceRecord
var newVM = new ServiceRecordVM(dc, _Category2Services, goalCats, goals);
-
+ SetDocTypes(newVM);
if (dc.GroupOid != null)
{
// newVM.RoundedDuration = newVM.GroupRoundedDuration.Value;
@@ -763,6 +763,33 @@ namespace BeWo.ViewModel.ListViewModel
}
}
+ private void SetDocTypes(ServiceRecordVM newVM)
+ {
+ if (AllDocTypes != null)
+ {
+ if (AllDocTypes.Count > 0)
+ {
+ newVM.DocField1 = AllDocTypes[0].TypeDescription;
+ }
+ if (AllDocTypes.Count > 1)
+ {
+ newVM.DocField2 = AllDocTypes[1].TypeDescription;
+ }
+ if (AllDocTypes.Count > 2)
+ {
+ newVM.DocField3 = AllDocTypes[2].TypeDescription;
+ }
+ if (AllDocTypes.Count > 3)
+ {
+ newVM.DocField4 = AllDocTypes[3].TypeDescription;
+ }
+ if (AllDocTypes.Count > 4)
+ {
+ newVM.DocField5 = AllDocTypes[4].TypeDescription;
+ }
+ }
+ }
+
private static void InitNewDC(ServiceRecordDC newDc, FlatSupportConceptTreeNodeDC selectedCustomerNode)
{
if (selectedCustomerNode != null && selectedCustomerNode.SupportConceptTreeNodeDC != null)
diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs
index 16804e5b5..09b59deb7 100644
--- a/BeWo/ViewModel/ServiceRecordVM.cs
+++ b/BeWo/ViewModel/ServiceRecordVM.cs
@@ -1417,6 +1417,66 @@ namespace BeWo.ViewModel
}
}
+ public string DocField1 { get; set; }
+ public string DocField2 { get; set; }
+ public string DocField3 { get; set; }
+ public string DocField4 { get; set; }
+ public string DocField5 { get; set; }
+
+ public string AllNotices
+ {
+ get
+ {
+
+ if (String.IsNullOrEmpty(DocField2)) // Nur ein Dokufeld vorhanden
+ {
+ return Notice;
+ }
+ String all = "";
+ if (!String.IsNullOrEmpty(Notice))
+ {
+ all = String.Format("{0}:\n{1}", DocField1, Notice);
+ }
+
+ if (!String.IsNullOrEmpty(Notice2))
+ {
+ if (all.Length > 0)
+ {
+ all += "\n\n";
+ }
+ all += String.Format("{0}:\n{1}", DocField2, Notice2);
+ }
+
+ if (!String.IsNullOrEmpty(Notice3))
+ {
+ if (all.Length > 0)
+ {
+ all += "\n\n";
+ }
+ all += String.Format("{0}:\n{1}", DocField3, Notice3);
+ }
+ if (!String.IsNullOrEmpty(Notice4))
+ {
+ if (all.Length > 0)
+ {
+ all += "\n\n";
+ }
+ all += String.Format("{0}:\n{1}", DocField4, Notice4);
+ }
+ if (!String.IsNullOrEmpty(Notice5))
+ {
+ if (all.Length > 0)
+ {
+ all += "\n\n";
+ }
+ all += String.Format("{0}:\n{1}", DocField5, Notice5);
+ }
+ return all;
+ }
+ set { }
+ }
+
+
public string RTFNotice
{
get { return _RTFNotice; }
@@ -1718,6 +1778,7 @@ namespace BeWo.ViewModel
return name;
}
+
public ObservableSortCollection SelectedGoals
{
get
diff --git a/BeWo/app.config b/BeWo/app.config
index 566c145c9..86dd5294a 100644
--- a/BeWo/app.config
+++ b/BeWo/app.config
@@ -13,17 +13,17 @@
-
+
-
+
-
+
diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user
index 6e756bfa4..a0002e9f5 100644
--- a/Host/Host.csproj.user
+++ b/Host/Host.csproj.user
@@ -3,7 +3,7 @@
BeWo2.0
true
- Release|Any CPU
+ Debug|Any CPU
false
@@ -12,5 +12,29 @@
ShowAllFiles
-
+
+
+
+
+
+
+ NoStartPage
+ True
+ False
+ False
+ False
+
+
+
+
+
+
+
+
+ False
+ True
+
+
+
+
\ No newline at end of file
diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs
index 48a43d70d..ba2b610dd 100644
--- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs
+++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs
@@ -35,6 +35,15 @@ namespace BeWo.Report.ReportObjects
vacationService = PluginLoader.FindClass();
}
+ protected AppSettings Settings
+ {
+ get
+ {
+ return appSettings;
+ }
+
+ }
+
public MitarbeiterstundenkontoBerechnung(decimal maxWochenstunden) : this()
{
this.maxWochenstunden = maxWochenstunden;
@@ -951,6 +960,9 @@ namespace BeWo.Report.ReportObjects
protected virtual ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList groupFilteredRecords, DateTime berichtsAnfang, DateTime berichtsEnde)
{
+ decimal flsGesamt = 0;
+ decimal arbeitszeit = 0;
+
var sum = new ServiceRecordSummary();
sum.RecordsImBerichtszeitraum = new List();
@@ -965,17 +977,33 @@ namespace BeWo.Report.ReportObjects
//String test = String.Format("{0:dd.MM.yyyy HH:mm}, {1:0} Minuten, {2}, {3}", item.Start, item.RoundedDuration, item.ServiceDescription.Name, item.Notice);
HandleServiceRecord(empDetail, item);
- if (AddServiceRecordToDuration(item))
+
+ if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
{
empDetail.ServiceRecordsInSelectedTimeSpan.Add(item);
- String test = String.Format("{0:dd.MM. HH:mm} - {1:HH:mm}, {2}", item.Start, item.End, item.RoundedDuration);
+ decimal duration = GetDuration(item, empDetail);
+
+ if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
+ {
+ if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
+ {
+ arbeitszeit += duration;
+ }
+ else if (item.ServiceDescription.ServiceCategory.IsBillable)
+ {
+ flsGesamt += duration;
+ }
+
+ }
+
+ }
+ else if (AddServiceRecordToDuration(item))
+ {
+ empDetail.ServiceRecordsInSelectedTimeSpan.Add(item);
decimal duration = GetDuration(item, empDetail);
-
-
- //System.Diagnostics.Debug.WriteLine("{0:0.##}", duration);
if (item.ServiceDescription != null &&
item.ServiceDescription.ServiceCategory != null &&
item.ServiceDescription.ServiceCategory.IsBillable)
@@ -988,7 +1016,11 @@ namespace BeWo.Report.ReportObjects
}
}
}
-
+ if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
+ {
+ sum.IstAbrechenbar = flsGesamt;
+ sum.IstNichtAbrechenbar = arbeitszeit - flsGesamt;
+ }
return sum;
}
@@ -1290,6 +1322,10 @@ namespace BeWo.Report.ReportObjects
public virtual bool ShouldCreateDayDetails()
{
+ if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
+ {
+ return true;
+ }
return false;
}
@@ -1670,16 +1706,11 @@ namespace BeWo.Report.ReportObjects
{
MitarbeiterstundenkontoRO.DayDetail dd = new MitarbeiterstundenkontoRO.DayDetail();
dd.ZusammenhaengendeZeitraeume = new List();
-
dd.Date = date.Date;
dd.NightStart = 20;
dd.NightEnd = 6;
- dd.MaxHoursUntilBreak = 6;
- dd.BreakMinutes = 30;
- if (date.Year == 2022 && date.Month == 12 && date.Day == 27)
- {
- int test = 0;
- }
+ ConfigurePauseSettings(dd);
+
CalculateAbsenceTimesForDay(dd, ed);
dd.Feiertag = vacationService.GetFeiertag(date);
@@ -1697,6 +1728,26 @@ namespace BeWo.Report.ReportObjects
return dd;
}
+ public virtual void ConfigurePauseSettings(MitarbeiterstundenkontoRO.DayDetail dd)
+ {
+ if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
+ {
+ if (Settings.EnableAutomaticPauses)
+ {
+ dd.MaxHoursUntilBreak = 6;
+ dd.BreakMinutes = 30;
+ dd.MaxHoursUntilBreak2 = 9;
+ dd.BreakMinutes2 = 15;
+ }
+ }
+ else
+ {
+ //Alter Default
+ dd.MaxHoursUntilBreak = 6;
+ dd.BreakMinutes = 30;
+ }
+ }
+
public virtual void BerechneSollStundenFuerDayDetail(MitarbeiterstundenkontoRO.EmployeeDetail ed, MitarbeiterstundenkontoRO.DayDetail dd)
{
var sollMax = BerechneSollStundenFuerTag(ed, dd.Date);
@@ -2002,6 +2053,18 @@ namespace BeWo.Report.ReportObjects
public virtual bool AddServiceRecordToDuration(ServiceRecord item)
{
+ if (Settings.ShowWorktime && Settings.EnableArbeitszeiterfassung)
+ {
+ if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
+ {
+ if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
return true;
}
diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnungTagesansicht.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnungTagesansicht.cs
index d995dc8fb..272d44eab 100644
--- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnungTagesansicht.cs
+++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnungTagesansicht.cs
@@ -29,6 +29,7 @@ namespace BeWo.Report.ReportObjects
public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed)
{
var dd = base.CreateDayDetail(date, ed);
+
dd.MaxHoursUntilBreak = null;
dd.MaxHoursUntilBreak2 = null;
dd.BreakMinutes = null;
diff --git a/ReportImp/PariSozial/AssistenzstundenReport.Designer.cs b/ReportImp/PariSozial/AssistenzstundenReport.Designer.cs
index 1231ef1c9..f108dc6f0 100644
--- a/ReportImp/PariSozial/AssistenzstundenReport.Designer.cs
+++ b/ReportImp/PariSozial/AssistenzstundenReport.Designer.cs
@@ -37,6 +37,8 @@ namespace PariSozial
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
+ this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
+ this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
@@ -45,6 +47,8 @@ namespace PariSozial
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
+ this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
+ this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.ruleRowVisible = new DevExpress.XtraReports.UI.FormattingRule();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
@@ -78,10 +82,6 @@ namespace PariSozial
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
- this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
- this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
- this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
- this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -137,7 +137,7 @@ namespace PariSozial
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "Datum";
- this.xrTableCell3.Weight = 0.20524816333368198D;
+ this.xrTableCell3.Weight = 0.2194732505113928D;
//
// xrTableCell4
//
@@ -147,7 +147,7 @@ namespace PariSozial
this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.Text = "Uhrzeit\r\nvon ..... bis";
- this.xrTableCell4.Weight = 0.25401997956299693D;
+ this.xrTableCell4.Weight = 0.24873635183344678D;
//
// xrTableCell11
//
@@ -157,7 +157,7 @@ namespace PariSozial
this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.StylePriority.UseTextAlignment = false;
this.xrTableCell11.Text = "Anzahl Minuten";
- this.xrTableCell11.Weight = 0.21661999388924277D;
+ this.xrTableCell11.Weight = 0.20767853444108209D;
//
// xrTableCell1
//
@@ -166,6 +166,20 @@ namespace PariSozial
this.xrTableCell1.Text = "Tätigkeitszweck";
this.xrTableCell1.Weight = 0.365788748861114D;
//
+ // xrTableCell7
+ //
+ this.xrTableCell7.Multiline = true;
+ this.xrTableCell7.Name = "xrTableCell7";
+ this.xrTableCell7.Text = "Einsatzkraft";
+ this.xrTableCell7.Weight = 0.23166620596447055D;
+ //
+ // xrTableCell5
+ //
+ this.xrTableCell5.Multiline = true;
+ this.xrTableCell5.Name = "xrTableCell5";
+ this.xrTableCell5.Text = "Unterschrift\r\nKlient/in";
+ this.xrTableCell5.Weight = 0.31174150625791663D;
+ //
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -222,39 +236,36 @@ namespace PariSozial
this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd.MM.yyyy}")});
this.xrTableCell13.Name = "xrTableCell13";
- this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell13.StylePriority.UseFont = false;
this.xrTableCell13.StylePriority.UsePadding = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "xrTableCell13";
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell13.Weight = 0.10627102845134587D;
+ this.xrTableCell13.Weight = 0.11363633041512793D;
//
// xrTableCell14
//
this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.TimeRangeString")});
this.xrTableCell14.Name = "xrTableCell14";
- this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell14.StylePriority.UseFont = false;
this.xrTableCell14.StylePriority.UsePadding = false;
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.Text = "xrTableCell14";
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell14.Weight = 0.13152356364414533D;
+ this.xrTableCell14.Weight = 0.1287878484060771D;
//
// xrTableCell15
//
this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0:0.##}")});
this.xrTableCell15.Name = "xrTableCell15";
- this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F);
this.xrTableCell15.StylePriority.UseFont = false;
this.xrTableCell15.StylePriority.UsePadding = false;
this.xrTableCell15.StylePriority.UseTextAlignment = false;
this.xrTableCell15.Text = "xrTableCell15";
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell15.Weight = 0.11215893165550706D;
+ this.xrTableCell15.Weight = 0.10752934492979321D;
//
// xrTableCell2
//
@@ -265,6 +276,23 @@ namespace PariSozial
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell2.Weight = 0.18939389467655621D;
//
+ // xrTableCell8
+ //
+ this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
+ new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
+ this.xrTableCell8.Multiline = true;
+ this.xrTableCell8.Name = "xrTableCell8";
+ this.xrTableCell8.StylePriority.UseTextAlignment = false;
+ this.xrTableCell8.Text = "xrTableCell8";
+ this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+ this.xrTableCell8.Weight = 0.11994946282466618D;
+ //
+ // xrTableCell6
+ //
+ this.xrTableCell6.Multiline = true;
+ this.xrTableCell6.Name = "xrTableCell6";
+ this.xrTableCell6.Weight = 0.16140998371105708D;
+ //
// ruleRowVisible
//
this.ruleRowVisible.Condition = "(Not Contains([ServiceCategory], \'Assistenz\')) And (Not Contains([ServiceDescript" +
@@ -559,10 +587,9 @@ namespace PariSozial
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.lblSummeMinuten.BorderWidth = 1F;
this.lblSummeMinuten.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
- this.lblSummeMinuten.LocationFloat = new DevExpress.Utils.PointFloat(229.5001F, 0F);
+ this.lblSummeMinuten.LocationFloat = new DevExpress.Utils.PointFloat(232.0001F, 0F);
this.lblSummeMinuten.Name = "lblSummeMinuten";
- this.lblSummeMinuten.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
- this.lblSummeMinuten.SizeF = new System.Drawing.SizeF(88.83F, 30F);
+ this.lblSummeMinuten.SizeF = new System.Drawing.SizeF(86.32974F, 30F);
this.lblSummeMinuten.StylePriority.UseBorders = false;
this.lblSummeMinuten.StylePriority.UseBorderWidth = false;
this.lblSummeMinuten.StylePriority.UseFont = false;
@@ -581,7 +608,7 @@ namespace PariSozial
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Summe";
- this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
+ this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// fieldAbrechenbareMinuten
//
@@ -602,37 +629,6 @@ namespace PariSozial
this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS";
//
- // xrTableCell5
- //
- this.xrTableCell5.Multiline = true;
- this.xrTableCell5.Name = "xrTableCell5";
- this.xrTableCell5.Text = "Unterschrift\r\nKlient/in";
- this.xrTableCell5.Weight = 0.31174150625791663D;
- //
- // xrTableCell6
- //
- this.xrTableCell6.Multiline = true;
- this.xrTableCell6.Name = "xrTableCell6";
- this.xrTableCell6.Weight = 0.16140998371105708D;
- //
- // xrTableCell7
- //
- this.xrTableCell7.Multiline = true;
- this.xrTableCell7.Name = "xrTableCell7";
- this.xrTableCell7.Text = "Einsatzkraft";
- this.xrTableCell7.Weight = 0.23166620596447055D;
- //
- // xrTableCell8
- //
- this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
- new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
- this.xrTableCell8.Multiline = true;
- this.xrTableCell8.Name = "xrTableCell8";
- this.xrTableCell8.StylePriority.UseTextAlignment = false;
- this.xrTableCell8.Text = "xrTableCell8";
- this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
- this.xrTableCell8.Weight = 0.11994946282466618D;
- //
// AssistenzstundenReport
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -647,6 +643,7 @@ namespace PariSozial
this.fieldBillableFLS,
this.fieldAbrechenbareFLS});
this.DataSource = this.bindingSource1;
+ this.DisplayName = "AssistenzstundenBeleg";
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.formattingRuleStartDate,
this.formattingRuleServiceDesc,
diff --git a/ReportImp/PariSozial/AssistenzstundenReport.cs b/ReportImp/PariSozial/AssistenzstundenReport.cs
index 92f46defc..2c48da748 100644
--- a/ReportImp/PariSozial/AssistenzstundenReport.cs
+++ b/ReportImp/PariSozial/AssistenzstundenReport.cs
@@ -10,8 +10,8 @@ using System.Collections.Generic;
namespace PariSozial
{
- public partial class AssistenzstundenReport : XtraReport
- {
+ public partial class AssistenzstundenReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport
+ {
public AssistenzstundenReport()
{
InitializeComponent();
@@ -23,15 +23,10 @@ namespace PariSozial
if (pRO.Services != null)
{
- List servicesBillable = new List();
-
+
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
- if (s.ServiceCategory.Contains("Assistenz") || s.ServiceDescription.Contains("Assistenz"))
- {
- minTotal += s.Minutes;
-
- }
+ minTotal += s.Minutes;
}
@@ -41,44 +36,32 @@ namespace PariSozial
lblSummeMinuten.Text = string.Format("{0:0.##}", minTotal);
- var approved = pRO.ApprovedFLSPerWeek;
+ SetApprovedPerWeek(pRO);
- //var stats = GetStatistics(pRO);
- //if (stats != null)
- //{
- // approved = stats.MinutesApprovedPerWeek / 60;
- //}
}
- private SupportConceptPeriodStatisticsDC GetStatistics(ServicesOverviewRO ro)
+ private void SetApprovedPerWeek(ServicesOverviewRO ro)
{
if (ro.CostBearer2SupportConceptList != null && ro.CostBearer2SupportConceptList.Count > 0)
{
- var service = new OperationsServiceImp();
-
+
foreach (var cb2sc in ro.CostBearer2SupportConceptList)
{
- long cb2scOid = cb2sc.Oid.Value;
-
-
- var stats = service.CreateSupportConceptStatistics(cb2scOid, ro.EndDate);
-
- if (stats.PeriodStatistics != null && stats.PeriodStatistics.Count > 0)
- {
- foreach (var ps in stats.PeriodStatistics)
- {
- if (ps.SupportConceptApprovalPeriod != null && ps.SupportConceptApprovalPeriod.ServiceCategory != null &&
- ps.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("Assistenz"))
- {
- return ps;
- }
- }
- }
- }
+ foreach (var scap in cb2sc.ApprovalPeriodList)
+ {
+ if (scap.ServiceCategory != null && scap.ServiceCategory.Name.Contains("Assistenz"))
+ {
+ if (scap.ApprovedBEPerInterval.HasValue)
+ {
+ ro.ApprovedFLSPerWeek = scap.ApprovedBEPerInterval.Value;
+ }
+ }
+ }
+
+ }
}
- return null;
}
}
}
diff --git a/ReportImp/PariSozial/PariSozial.csproj b/ReportImp/PariSozial/PariSozial.csproj
index dc1d4647c..57cfe2c8f 100644
--- a/ReportImp/PariSozial/PariSozial.csproj
+++ b/ReportImp/PariSozial/PariSozial.csproj
@@ -61,6 +61,7 @@
AssistenzstundenReport.cs
+
diff --git a/ReportImp/PariSozial/QuittierungsbelegMitDatum.Designer.cs b/ReportImp/PariSozial/QuittierungsbelegMitDatum.Designer.cs
index 0865175d6..07b308082 100644
--- a/ReportImp/PariSozial/QuittierungsbelegMitDatum.Designer.cs
+++ b/ReportImp/PariSozial/QuittierungsbelegMitDatum.Designer.cs
@@ -65,6 +65,7 @@ namespace PariSozial
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
+ this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
@@ -122,13 +123,12 @@ namespace PariSozial
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
- this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -592,6 +592,10 @@ namespace PariSozial
this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell49.Weight = 0.44692737430167606D;
//
+ // bindingSource1
+ //
+ this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
+ //
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -645,10 +649,10 @@ namespace PariSozial
this.xrLabel8.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
- this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(535.6389F, 77.6111F);
+ this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(535.6389F, 77.61108F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
- this.xrLabel8.SizeF = new System.Drawing.SizeF(158.3612F, 30.50001F);
+ this.xrLabel8.SizeF = new System.Drawing.SizeF(199.361F, 30.50001F);
this.xrLabel8.StylePriority.UseBackColor = false;
this.xrLabel8.StylePriority.UseBorders = false;
this.xrLabel8.StylePriority.UseFont = false;
@@ -662,10 +666,10 @@ namespace PariSozial
this.xrLabel6.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
- this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(170F, 77.6111F);
+ this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(140.8333F, 77.61108F);
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
- this.xrLabel6.SizeF = new System.Drawing.SizeF(209.3611F, 30.50001F);
+ this.xrLabel6.SizeF = new System.Drawing.SizeF(238.5278F, 30.50001F);
this.xrLabel6.StylePriority.UseBackColor = false;
this.xrLabel6.StylePriority.UseBorders = false;
this.xrLabel6.StylePriority.UseFont = false;
@@ -678,10 +682,10 @@ namespace PariSozial
//
this.xrLabel5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)));
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
- this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(170F, 47.11109F);
+ this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(140.8333F, 47.1111F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
- this.xrLabel5.SizeF = new System.Drawing.SizeF(158.3612F, 30.50001F);
+ this.xrLabel5.SizeF = new System.Drawing.SizeF(187.5279F, 30.5F);
this.xrLabel5.StylePriority.UseBackColor = false;
this.xrLabel5.StylePriority.UseBorders = false;
this.xrLabel5.StylePriority.UseFont = false;
@@ -697,10 +701,10 @@ namespace PariSozial
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
- this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(49.36111F, 77.6111F);
+ this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 77.61108F);
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
- this.xrLabel4.SizeF = new System.Drawing.SizeF(120.6389F, 30.50001F);
+ this.xrLabel4.SizeF = new System.Drawing.SizeF(140.8333F, 30.50001F);
this.xrLabel4.StylePriority.UseBackColor = false;
this.xrLabel4.StylePriority.UseBorders = false;
this.xrLabel4.StylePriority.UseFont = false;
@@ -715,10 +719,10 @@ namespace PariSozial
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)));
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
- this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(49.3611F, 47.11109F);
+ this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 47.1111F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
- this.xrLabel3.SizeF = new System.Drawing.SizeF(120.6389F, 30.50001F);
+ this.xrLabel3.SizeF = new System.Drawing.SizeF(140.8333F, 30.5F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
@@ -1304,10 +1308,6 @@ namespace PariSozial
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldKontaktArt.Name = "fieldKontaktArt";
//
- // bindingSource1
- //
- this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
- //
// Quittierungsbeleg
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1336,10 +1336,10 @@ namespace PariSozial
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
diff --git a/Service/Configuration/AppSettings.cs b/Service/Configuration/AppSettings.cs
index 3202b91ef..e4128d86d 100644
--- a/Service/Configuration/AppSettings.cs
+++ b/Service/Configuration/AppSettings.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared;
+using BS.Shared.Core;
namespace BeWo.Service.Configuration
{
@@ -63,6 +64,12 @@ namespace BeWo.Service.Configuration
public int DienstplanungStandardZeilenAnzahl { get; set; }
+ public bool ShowWorktime { get; set; }
+ public bool EnableArbeitszeiterfassung { get; set; }
+ public bool EnableAutomaticPauses { get; set; }
+ public bool EnableRestTimeWarning { get; set; }
+ public int MaxWorkTimeHoursBeforeWarning { get; set; }
+
public static AppSettings CreateSettings()
{
@@ -98,134 +105,167 @@ namespace BeWo.Service.Configuration
if (mandator != null)
{
- string val = GetSettingValue(mandator.Settings, "IsServiceRecordNoticeMandatory");
+ string settingsString = mandator.Settings;
+
+ if (!String.IsNullOrEmpty(mandator.LastModules))
+ {
+ settingsString += ";" + mandator.LastModules;
+ }
+ string val = GetSettingValue(settingsString, "IsServiceRecordNoticeMandatory");
if (val != null && val.Equals("0"))
{
isServiceRecordNoticeMandatory = false;
}
- val = GetSettingValue(mandator.Settings, "IsPasswordSecurityActiv");
+ val = GetSettingValue(settingsString, "IsPasswordSecurityActiv");
if (val != null && val.Equals("1"))
{
isPasswordSecurityActiv = true;
}
settings.UseTwoFactorAuth = false;
- val = GetSettingValue(mandator.Settings, "UseTwoFactorAuth");
+ val = GetSettingValue(settingsString, "UseTwoFactorAuth");
if (val != null && val.Equals("1"))
{
settings.UseTwoFactorAuth = true;
}
- val = GetSettingValue(mandator.Settings, "IsEndDateVisible");
+ val = GetSettingValue(settingsString, "IsEndDateVisible");
if (val != null && val.Equals("0"))
{
isEndDateVisible = false;
}
- val = GetSettingValue(mandator.Settings, "IsOnlyYearMonthVisible");
+ val = GetSettingValue(settingsString, "IsOnlyYearMonthVisible");
if (val != null && val.Equals("0"))
{
isOnlyYearMonthVisible = false;
}
- val = GetSettingValue(mandator.Settings, "IsZeiterfassDateNormal");
+ val = GetSettingValue(settingsString, "IsZeiterfassDateNormal");
if (val != null && val.Equals("0"))
{
isZeiterfassDateNormal = false;
}
- val = GetSettingValue(mandator.Settings, "IsZeiterfassungInStdMin");
+ val = GetSettingValue(settingsString, "IsZeiterfassungInStdMin");
if (val != null && val.Equals("0"))
{
isZeiterfassungInStdMin = false;
}
- val = GetSettingValue(mandator.Settings, "MaxDaysEditServiceRecordsAllowed");
+ val = GetSettingValue(settingsString, "MaxDaysEditServiceRecordsAllowed");
if(int.TryParse(val, out var result))
{
maxDaysEditServiceRecordsAllowed = result;
}
- val = GetSettingValue(mandator.Settings, "hilfeplanAuslaufAuswahl");
+ val = GetSettingValue(settingsString, "hilfeplanAuslaufAuswahl");
if (int.TryParse(val, out var resulthilf))
{
hilfeplanAuslaufAuswahl = resulthilf;
}
- val = GetSettingValue(mandator.Settings, "AnzTageZeiterfassErfolgt");
+ val = GetSettingValue(settingsString, "AnzTageZeiterfassErfolgt");
if (int.TryParse(val, out var resultanzeit))
{
anzTageZeiterfassErfolgt = resultanzeit;
}
- val = GetSettingValue(mandator.Settings, "ZeiterfassungsSchwellwert");
+ val = GetSettingValue(settingsString, "ZeiterfassungsSchwellwert");
if (int.TryParse(val, out var resultschwell))
{
zeiterfassungsSchwellwert = resultschwell;
}
- val = GetSettingValue(mandator.Settings, "DienstplanungStandardZeilenAnzahl");
+ val = GetSettingValue(settingsString, "DienstplanungStandardZeilenAnzahl");
if (int.TryParse(val, out var zeilenanzahl))
{
settings.DienstplanungStandardZeilenAnzahl = zeilenanzahl;
}
- val = GetSettingValue(mandator.Settings, "ShowDistanceFields");
+ val = GetSettingValue(settingsString, "ShowDistanceFields");
if (val != null && val.Equals("1"))
{
showServiceRecordsDistanceFields = true;
}
- val = GetSettingValue(mandator.Settings, "ShowCustomerDistanceFields");
+ val = GetSettingValue(settingsString, "ShowCustomerDistanceFields");
if (val != null && val.Equals("1"))
{
showCustomerDistanceFields = true;
}
- val = GetSettingValue(mandator.Settings, "ShowAdditionalService");
+ val = GetSettingValue(settingsString, "ShowAdditionalService");
if (val != null && val.Equals("1"))
{
showAdditionalService = true;
}
- val = GetSettingValue(mandator.Settings, "ShowRoundedDurationInEmployeeAnalysis");
+ val = GetSettingValue(settingsString, "ShowRoundedDurationInEmployeeAnalysis");
if (val != null && val.Equals("0"))
{
showRoundedDurationInEmployeeAnalysis = false;
}
- val = GetSettingValue(mandator.Settings, "SortServiceDescriptionAlphabetically");
+ val = GetSettingValue(settingsString, "ShowWorktime");
+ if (val != null && val.Equals("1"))
+ {
+ settings.ShowWorktime = true;
+ }
+ val = GetSettingValue(settingsString, SettingsKeys.EnableArbeitszeiterfassung);
+ if (val != null && val.Equals("1"))
+ {
+ settings.EnableArbeitszeiterfassung = true;
+ }
+ val = GetSettingValue(settingsString, SettingsKeys.EnableAutomaticPauses);
+ if (val != null && val.Equals("1"))
+ {
+ settings.EnableAutomaticPauses = true;
+ }
+ val = GetSettingValue(settingsString, SettingsKeys.EnableRestTimeWarning);
+ if (val != null && val.Equals("1"))
+ {
+ settings.EnableRestTimeWarning = true;
+ }
+ val = GetSettingValue(settingsString, SettingsKeys.MaxWorkTimeHoursBeforeWarning);
+ int hours;
+ if (Int32.TryParse(val, out hours))
+ {
+ settings.MaxWorkTimeHoursBeforeWarning = hours;
+ }
+
+ val = GetSettingValue(settingsString, "SortServiceDescriptionAlphabetically");
if (val != null && val.Equals("1"))
{
sortServiceDescriptionAlphabetically = true;
}
- val = GetSettingValue(mandator.Settings, "PrinterSettingsUseLandscape");
+ val = GetSettingValue(settingsString, "PrinterSettingsUseLandscape");
if (val != null && val.Equals("1"))
{
printerSettingsUseLandscape = true;
}
- val = GetSettingValue(mandator.Settings, "PrinterSettingsUseMargins");
+ val = GetSettingValue(settingsString, "PrinterSettingsUseMargins");
if (val != null && val.Equals("1"))
{
printerSettingsUseMargins = true;
}
- val = GetSettingValue(mandator.Settings, "PrinterSettingsUsePaperKind");
+ val = GetSettingValue(settingsString, "PrinterSettingsUsePaperKind");
if (val != null && val.Equals("1"))
{
printerSettingsUsePaperKind = true;
}
- val = GetSettingValue(mandator.Settings, "ShowSignature");
+ val = GetSettingValue(settingsString, "ShowSignature");
if (val != null && val.Equals("1"))
{
showSignatures = true;
}
- val = GetSettingValue(mandator.Settings, "ShowRtfTextfeld");
+ val = GetSettingValue(settingsString, "ShowRtfTextfeld");
if (val != null && val.Equals("1"))
{
showRtfTextfeld = true;
}
- val = GetSettingValue(mandator.Settings, "ShowChat");
+ val = GetSettingValue(settingsString, "ShowChat");
if (val != null && val.Equals("1"))
{
settings.ShowChat = true;
diff --git a/Service/Import/Perseh/PersehReader.cs b/Service/Import/Perseh/PersehReader.cs
index f5a64e291..aa368b766 100644
--- a/Service/Import/Perseh/PersehReader.cs
+++ b/Service/Import/Perseh/PersehReader.cs
@@ -17,47 +17,49 @@ namespace BeWo.Service.Import.Perseh
HilfeplanImportDC result = new HilfeplanImportDC();
result.Gruppen = new List();
- using (var processor = new PdfDocumentProcessor())
- {
- using (var ms = new MemoryStream(daten))
- {
- processor.LoadDocument(ms);
+ var gruppe1 = new HilfeplanImportItemDC { Label = "Leistungssuchende oder leistungsberechtigte Person", Items = new List() };
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
- var pdfText = processor.Text;
+ result.Gruppen.Add(gruppe1);
- var gruppe1 = new HilfeplanImportItemDC { Label = "Leistungssuchende oder leistungsberechtigte Person", Items = new List() };
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch"});
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
+ gruppe1 = new HilfeplanImportItemDC { Label = "Gruppe 2", Items = new List() };
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
+ gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
- result.Gruppen.Add(gruppe1);
+ result.Gruppen.Add(gruppe1);
- gruppe1 = new HilfeplanImportItemDC { Label = "Gruppe 2", Items = new List() };
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Name", Content = "Bäurle", FieldName = "LastName" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Vorname", Content = "Christian", FieldName = "FirstName" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Geburtsdatum", Content = "08.04.1972", FieldName = "Birthdate" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Nationalität", Content = "deutsch" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Beruf", Content = "Wirt" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "GP-Nummer/Az", Content = "73.20-2100009313-01" });
- gruppe1.Items.Add(new HilfeplanImportItemDC { Label = "Erstellt von der\nleistungssuchenden oder\nleistungsberechtigten Person\nmit Behinderung unter", Content = "Max Mustermann (Bezugsbetreuer)\nMaria Musterfrau (Sozialarbeiterin)" });
- result.Gruppen.Add(gruppe1);
+
+ result.Ziele = new List();
+
+ result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
+ result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
+
+ result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
+ result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
+
+ //using (var processor = new PdfDocumentProcessor())
+ //{
+ // using (var ms = new MemoryStream(daten))
+ // {
+ // processor.LoadDocument(ms);
+
+ // var pdfText = processor.Text;
-
- result.Ziele = new List();
-
- result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
- result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Lernen und Wissensanwendung", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
-
- result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 1", ZielBeschreibung = "Herr Sowieso hat eine seinen Bedürfnissen entsprechende und ihn stabilisierende Tagesstruktur mit einer regelmäßigen, genesungsfördernden Beschäftigung(z.B.Ergotherapie) entwickelt." });
- result.Ziele.Add(new HilfeplanImportZielDC { Bereich = "Allgemeine Aufgaben und Anforderungen", ZielName = "Ziel 2", ZielBeschreibung = "Herr Sowieso hat Angstbewältigungsstrategien sowie Stabilisierungstechniken erlernt und kann diese in Alltagssituationen anwenden" });
- }
- }
+ // }
+ //}
return result;
}
diff --git a/Service/Plugins/AiService.cs b/Service/Plugins/AiService.cs
index 9f6bdfeaa..0894ec703 100644
--- a/Service/Plugins/AiService.cs
+++ b/Service/Plugins/AiService.cs
@@ -24,7 +24,26 @@ namespace BeWo.Service.Plugins
{
public AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate)
{
-
+ String context = CreateContextForServiceRecords(cb2scOid, startdate, enddate);
+ return CreateWebRequest(acdc, context);
+
+ }
+
+ public AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid)
+ {
+ String context = "";
+ return CreateWebRequest(acdc, context);
+ }
+
+ public AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid)
+ {
+ String context = "";
+ return CreateWebRequest(acdc, context);
+ }
+
+ public AiChatDC CreateWebRequest(AiChatDC acdc, String context)
+ {
+
using (WebClient client = new WebClient())
{
String url = "https://ai1.ownsoft.de/osaiquery.php";
@@ -33,11 +52,11 @@ namespace BeWo.Service.Plugins
//stm = Der Kontext->Auf welcher Datenbasis soll eure Frage beantwortet werden.Kann auch leer sein.
//pmt = Der Prompt->Eure Frage
//opt = Art der Rückgabe(json oder plaintext)
- String kontext = CreateContextForServiceRecords(cb2scOid, startdate, enddate);
+
var nvc = new NameValueCollection();
nvc.Add("mel", "llama3-gradient");
- nvc.Add("stm", kontext);
+ nvc.Add("stm", context);
nvc.Add("pmt", acdc.Prompt);
nvc.Add("opt", "json");
@@ -51,9 +70,8 @@ namespace BeWo.Service.Plugins
}
return new AiChatDC { Result = "Das kann ich leider nicht beantworten:)" };
-
- }
+ }
public virtual string CreateContextForServiceRecords(long cb2scOid, DateTime startdate, DateTime enddate)
{
var c2s = DAOFactory.GenericDAO.LoadByID(cb2scOid);
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs
index a1d83822c..575dc1529 100644
--- a/Service/Plugins/PluginLoader.cs
+++ b/Service/Plugins/PluginLoader.cs
@@ -20,7 +20,7 @@ namespace BeWo.Service.Plugins
#if DEBUG
var t = "demo";
- //t = "irgendwaswasesnichtgibt";
+ t = "irgendwaswasesnichtgibt";
//t = "5473568546"; //Interner Chat
//t = "2356097460"; // Lebenshilfe Würzburg
//t = "1234567890"; // Präsentationsdatenbank
@@ -70,7 +70,7 @@ namespace BeWo.Service.Plugins
//t = "5351926758"; // Viva a Vida
//t = "2215396183"; // Diakonie Remscheid Lennep
//t = "5157599087"; // SHG Schwerte
- //t = "4526293996"; // Fortis
+ t = "4526293996"; // Fortis
//t = "3647969417"; // Caritas Bottrop
//t = "3057313346"; // SSB Mainz
//t = "6246287823"; // BeWo Alsdorf
@@ -82,7 +82,7 @@ namespace BeWo.Service.Plugins
//t = "8001550599"; // Biallas BeWo
//t = "7282396774"; // Caritas Unna
//t = "6884855402"; // IBP
- t = "4867997795"; // ADiK Kleve
+ //t = "4867997795"; // ADiK Kleve
//t = "3184859776"; // Sergej Becker
//t = "7752610643"; // BWK Gbr
//t = "3785623125"; // Betreuwo
@@ -386,7 +386,7 @@ namespace BeWo.Service.Plugins
//t = "7113513872"; // Verein für Beratung und Therapie - LOK
//t = "1676990640"; // Perspektive - Selbständiges Leben
//t = "2544632712"; // Wabe gGmbH
- //t = "7077286353"; // PariSozial
+ t = "7077286353"; // PariSozial
//t = "5000000000";
return t;
diff --git a/Service/Plugins/TranslationDictionary.cs b/Service/Plugins/TranslationDictionary.cs
index 1c3044114..9667348e4 100644
--- a/Service/Plugins/TranslationDictionary.cs
+++ b/Service/Plugins/TranslationDictionary.cs
@@ -94,7 +94,7 @@ namespace BeWo.Service.Plugins
AddOrReplaceTranslation(dict, "EmployeeSchutzstufe", "Schutzstufe");
AddOrReplaceTranslation(dict, "EmployeeBemerkungenSbd", "Allgemeine Bemerkungen");
- AddOrReplaceTranslation(dict, "Zwei Faktor Authentifizierung erforderlich", "Es wurde ein Code an Ihre E-Mail Adresse gesendet.\n\nBitte geben Sie den Code hier ein:");
+ AddOrReplaceTranslation(dict, "Zwei Faktor Authentifizierung erforderlich", "Zwei Faktor Authentifizierung erforderlich.\nEs wurde ein Code an ownChat gesendet.\n\nBitte geben Sie hier den Code ein:");
AddOrReplaceTranslation(dict, "Neue Mitarbeiterlizenz bestellen", "Neue Lizenz bestellen");
diff --git a/Service/Security/SecurityContextInitializer.cs b/Service/Security/SecurityContextInitializer.cs
index 361362b8d..eaac00332 100644
--- a/Service/Security/SecurityContextInitializer.cs
+++ b/Service/Security/SecurityContextInitializer.cs
@@ -38,7 +38,7 @@ namespace BeWo.Service.Security
// TODO Hier kann man jetzt etwas bauen wer sich für welchen service autorisieren muss...
var skip = new string[] { "Download", "Download2", "DownloadInfo", "GetUpdatePlan", "GetUpdateFile", "ResetAllTenants" };
- if (lMethodName == "IsUserValid" || lMethodName == "IsUserValidTwoFactor" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenant" || lMethodName == "GetEmailForUserName")
+ if (lMethodName == "IsUserValid" || lMethodName == "IsUserValidTwoFactor" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenant" || lMethodName == "GetEmailForUserName" || lMethodName == "GetTranslationDictionary")
{
return null;
}
diff --git a/Service/ServiceContracts/IOperationsService.cs b/Service/ServiceContracts/IOperationsService.cs
index b4b5ee39f..f87cc6f3b 100644
--- a/Service/ServiceContracts/IOperationsService.cs
+++ b/Service/ServiceContracts/IOperationsService.cs
@@ -1371,5 +1371,13 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid);
}
}
\ No newline at end of file
diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs
index ead531f51..769c1098d 100644
--- a/Service/ServiceImplementations/OperationsServiceImp.cs
+++ b/Service/ServiceImplementations/OperationsServiceImp.cs
@@ -975,13 +975,13 @@ namespace BeWo.Service.ServiceImplementations
}
}
- if (!settingValueDict.ContainsKey("Arbeitszeiterfassung") && settingValueDict.ContainsKey("ShowWorktime"))
- {
- if (settingValueDict["ShowWorktime"] != "0")
- {
- settingValueDict.Add("Arbeitszeiterfassung", "1");
- }
- }
+ //if (!settingValueDict.ContainsKey("Arbeitszeiterfassung") && settingValueDict.ContainsKey("ShowWorktime"))
+ //{
+ // if (settingValueDict["ShowWorktime"] != "0")
+ // {
+ // settingValueDict.Add("Arbeitszeiterfassung", "1");
+ // }
+ //}
if (!settingValueDict.ContainsKey("ShowScheduler") && man.IsSchedulerAllowed)
{
@@ -8910,6 +8910,36 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
+
+ public AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid)
+ {
+ try
+ {
+ var s = PluginLoader.FindClass();
+
+ return s.CreateAiQueryForSingleCustomer(acdc, customerOid);
+
+ }
+ catch (Exception e)
+ {
+ throw Utils.CreateBeWoFaultException(e);
+ }
+ }
+
+ public AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid)
+ {
+ try
+ {
+ var s = PluginLoader.FindClass();
+
+ return s.CreateAiQueryForObjects(acdc, objectTid);
+
+ }
+ catch (Exception e)
+ {
+ throw Utils.CreateBeWoFaultException(e);
+ }
+ }
}
public class ServiceRecord2SignatureStates
diff --git a/Shared/Core/SettingsKeys.cs b/Shared/Core/SettingsKeys.cs
index e0ac88ac2..8dcf1dfc3 100644
--- a/Shared/Core/SettingsKeys.cs
+++ b/Shared/Core/SettingsKeys.cs
@@ -55,7 +55,7 @@
public static string DontShowSpitzabrechnung => "DontShowSpitzabrechnung";
public static string ShowDienstplanung => "ShowDienstplanung";
- public static string Arbeitszeiterfassung => "Arbeitszeiterfassung";
+ public static string ShowWorktime => "ShowWorktime";
public static string EnableArbeitszeiterfassung => "EnableArbeitszeiterfassung";
public static string EnableAutomaticPauses => "EnableAutomaticPauses";
public static string EnableRestTimeWarning => "EnableRestTimeWarning";
@@ -88,6 +88,7 @@
public static string ShowInfoButtonInCalender => "ShowInfoButtonInCalender";
public static string ShowHilfeplanStatistikReport => "ShowHilfeplanStatistikReport";
public static string ShowAI => "ShowAI";
+ public static string ShowAIInternal => "ShowAIInternal";
public static string MoKSessionTimeout => "MoKSessionTimeout";
diff --git a/Shared/DataContracts/Compact/ClientPartials/CompactPersonDC.cs b/Shared/DataContracts/Compact/ClientPartials/CompactPersonDC.cs
index 331674ee5..595e4cc6f 100644
--- a/Shared/DataContracts/Compact/ClientPartials/CompactPersonDC.cs
+++ b/Shared/DataContracts/Compact/ClientPartials/CompactPersonDC.cs
@@ -76,6 +76,37 @@ namespace BS.Shared.DataContracts.Compact
set { }
}
+ public string CommunicationString
+ {
+ get
+ {
+ string info = string.Empty;
+
+ if (!string.IsNullOrEmpty(this.Communication1))
+ info = this.Communication1;
+ if (!string.IsNullOrEmpty(this.Communication2))
+ {
+ if (info.Length > 0)
+ info += " ";
+ info += this.Communication2;
+ }
+ if (!string.IsNullOrEmpty(this.Communication3))
+ {
+ if (info.Length > 0)
+ info += " ";
+ info += this.Communication3;
+ }
+ if (!string.IsNullOrEmpty(this.Communication4))
+ {
+ if (info.Length > 0)
+ info += " ";
+ info += this.Communication4;
+ }
+ return info;
+ }
+ set { }
+ }
+
public string Birthday
{
get
@@ -102,8 +133,7 @@ namespace BS.Shared.DataContracts.Compact
{
get
{
- return this.Title + " " + this.FirstName + " " + this.LastName + " " + this.Function + " " + this.AddressString +
- this.Organisation;
+ return this.Title + " " + this.FirstName + " " + this.LastName + " " + this.Function + " " + this.AddressString + " " + this.CommunicationString + " " + this.Organisation;
}
}