Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2024-12-23 16:10:31 +01:00
43 changed files with 1443 additions and 306 deletions

View File

@@ -43,12 +43,12 @@
<TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName>
<PublisherName>ownSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.255</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.256</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>256</ApplicationRevision>
<ApplicationRevision>257</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@@ -51,7 +51,7 @@ namespace BeWo
public static MainControl MainControl;
public static string ShortVersion = "3.22";
public static string Version = "Version 3.23 TEST";
public static string Version = "Version 3.23.2 TEST";
public static int RenderTier = 0;
@@ -868,6 +868,7 @@ namespace BeWo
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.LastBewilligungSortOrder, _AppSettings.LastBewilligungSortOrder.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);
@@ -1181,6 +1182,11 @@ namespace BeWo
_AppSettings.LastKassenSortOrder = Convert.ToInt32(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastKassenSortOrder, settings));
}
val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastBewilligungSortOrder, settings);
if (val != null)
{
_AppSettings.LastBewilligungSortOrder = Convert.ToInt32(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastBewilligungSortOrder, settings));
}
val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LetzteZeiterfassungsDauer, settings);
if (val != null)
{

View File

@@ -42,6 +42,8 @@ namespace BeWo.Core.Config
private int mLastKassenSortOrder = 1;
private int mLastBewilligungSortOrder = 0;
private ZeiterfassungsDauer mLetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
public enum WindowStateType
@@ -353,6 +355,20 @@ namespace BeWo.Core.Config
IsDirty = true;
}
}
}
public int LastBewilligungSortOrder
{
get { return mLastBewilligungSortOrder; }
set
{
if (mLastBewilligungSortOrder != value)
{
mLastBewilligungSortOrder = value;
IsDirty = true;
}
}
}

View File

@@ -420,7 +420,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="23" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<TextBlock Text="Details" Margin="0 1"
VerticalAlignment="Bottom"
@@ -522,9 +522,10 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="23" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<TextBlock Text="{markup:Translate Bewilligungen}" TextElement.FontSize="16"
VerticalAlignment="Bottom"
@@ -532,9 +533,13 @@
TextElement.FontFamily="Microsoft Sans Serif"
Margin="0 1"
/>
<Button Margin="5,0,0,0" x:Name="button_addApprovalPeriod" Tag="{Binding}"
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Stretch" Margin="5,0,3,0">
<Label Content="Sortierung:" />
<ComboBox Height="23" Loaded="SortComboBox_Loaded" Tag="{Binding}" VerticalAlignment="Top" MinWidth="180" ItemsSource="{Binding SortItems}" SelectedIndex="{Binding SelectedSortIndex}" SelectionChanged="SortComboBox_SelectionChanged"/>
</StackPanel>
<Button Margin="5,0,0,0" x:Name="button_addApprovalPeriod" Tag="{Binding}"
Click="button_addApprovalPeriod_Click"
HorizontalAlignment="Center" Grid.Column="1"
HorizontalAlignment="Center" Grid.Column="2"
Width="21" Height="21" VerticalAlignment="Top">
<Grid Width="18" HorizontalAlignment="Center"
VerticalAlignment="Center">
@@ -560,7 +565,7 @@
</GroupBox.Header>
<ListView x:Name="listViewCostBearer" Grid.Row="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsSource="{Binding ApprovalPeriodList.VMList}"
ItemsSource="{Binding SortedVMList}"
Background="Transparent" BorderBrush="Transparent"
HorizontalAlignment="Left">
<ListView.ItemContainerStyle>

View File

@@ -246,6 +246,20 @@ namespace BeWo.View.Detail
#region Public Methods
//private void InitSortCombo(ComboBox cb)
//{
// var list = new List<String>();
// list.Add("aufsteigend");
// list.Add("absteigend");
// cb.ItemsSource = list;
// cb.SelectedIndex = BeWoApp.AppSettings.LastBewilligungSortOrder;
//}
public override void ModalPopUpCloseInvoked()
{
this.MainControl.CloseCurrentPopUp();
@@ -2023,6 +2037,63 @@ namespace BeWo.View.Detail
}
return null;
}
private void SortComboBox_Loaded(object sender, RoutedEventArgs e)
{
var cb = sender as ComboBox;
if (cb != null)
{
//InitSortCombo(cb);
}
}
private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var cb = sender as ComboBox;
//if (cb != null)
//{
var cb2 = e.OriginalSource as DependencyObject;
var sp2 = VisualTreeHelper.GetParent(cb2);
//Finde ListView
var sp = cb.Parent as StackPanel;
if (sp2 == sp)
{
int test = 0;
}
var g = sp.Parent as Grid;
var gb = g.Parent as GroupBox;
var lv = gb.Content as ListView;
//lv.ItemsSource = null;
var c2s = cb.Tag as SupportConceptCostBearerRelVM;
//var list = lv.ItemsSource as BindingList<SupportConceptApprovalPeriodVM>;
//lv.ItemsSource = null;
//if (cb.SelectedIndex == 0)
//{
// list.Sort((a, b) => a.StartDate.HasValue ? a.StartDate.Value.CompareTo(b.StartDate) : 0);
//}
//else
//{
// list.Sort((a, b) => b.StartDate.HasValue ? b.StartDate.Value.CompareTo(a.StartDate) : 0);
//}
//list.Sort((a, b) => b.StartDate.HasValue ? b.StartDate.Value.CompareTo(a.StartDate) : 0);
//lv.Items.SortDescriptions.Add(new SortDescription { PropertyName = "StartDate", Direction = ListSortDirection.Descending });
//lv.ItemsSource = c2s.ApprovalPeriodList.VMList;
//lv.ItemsSource.RaisePropertyChanged
//BeWoApp.AppSettings.LastBewilligungSortOrder = cb.SelectedIndex;
BeWoApp.SaveAppSettings();
//}
}
}
public class ValueListEntryTypeToColorConverter : IValueConverter
@@ -2044,4 +2115,6 @@ namespace BeWo.View.Detail
throw new NotImplementedException();
}
}
}

View File

@@ -1,5 +1,8 @@
using BeWo.ViewModel;
using BeWo.ServiceProxy;
using BeWo.ViewModel;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Translation;
using DevExpress.Utils;
using DevExpress.Xpf.Grid;
using System;
@@ -13,7 +16,33 @@ namespace BeWo.View.Document
{
public class DokumentViewHelper
{
public static void CreateTemplateTreeViewItems(TreeListControl treeControl, IList<VorlagentabelleDC> vorlagentabellen)
public static void OpenTemplateSelectionDialog(List<DokumentvorlageDC> alleVorlagen, TableID objectTid, long objectOid)
{
var alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
var tabelle = alleVorlagenTabellen.FirstOrDefault(v => v.VorlagentabelleObjectTid.HasValue && v.VorlagentabelleObjectTid.Value == (int)objectTid);
if (tabelle != null)
{
var view = new SingleTemplateSelectionView();
var customerFolderList = VMFactory.CreateFolderList(objectTid, objectOid);
var templateFolderList = VMFactory.CreateFolderList(TableID.Vorlagentabelle, tabelle.VorlagentabelleOid.Value);
view.InitView(tabelle, alleVorlagen, templateFolderList, customerFolderList, true, false);
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Vorlage auswählen"), view, 500, 500);
view.ButtonCancelClicked += () => beWoWindow.Close();
view.ButtonCreateForSelectionClicked += () =>
{
beWoWindow.Close();
};
beWoWindow.ShowDialog();
}
}
public static void CreateTemplateTreeViewItems(TreeListControl treeControl, IList<VorlagentabelleDC> vorlagentabellen, List<BeWoFolderDC> allFolder, bool expandItems)
{
treeControl.BeginDataUpdate();
@@ -34,67 +63,146 @@ namespace BeWo.View.Document
node.Content = vm;
treeControl.View.Nodes.Add(node);
node.IsExpandButtonVisible = DefaultBoolean.True;
node.IsExpanded = expandItems;
node.Image = LoadImage(table.ImageName);
}
if (allFolder != null && allFolder.Count > 0)
{
AddFolderToTreeView(treeControl, allFolder, expandItems);
}
treeControl.EndDataUpdate();
}
public static void AddFolderToTemplateTreeView(TreeListControl treeControl, List<BeWoFolderDC> folders)
public static void AddTemplatesToTreeView(TreeListControl treeControl, List<DokumentvorlageDC> allTemplates, bool expandItems)
{
treeControl.BeginDataUpdate();
foreach (var folder in folders)
foreach (var template in allTemplates)
{
TreeListNode parentNode = null;
DocumentTreeItemVM parentVm = null;
foreach (var node in treeControl.View.Nodes)
{
var item = node.Content as DocumentTreeItemVM;
if (item != null && item.DocTreeItemOid == folder.BeWoFolderOid)
{
parentNode = node;
parentVm = item;
}
}
if (parentVm != null)
TreeListNode parentNode = FindParentNodeForTemplate(treeControl.View.Nodes, template);
if (parentNode != null)
{
parentNode.IsExpandButtonVisible = DefaultBoolean.True;
var parentVm = parentNode.Content as DocumentTreeItemVM;
DocumentTreeItemDC dc = new DocumentTreeItemDC()
{
DocTreeItemOid = folder.BeWoFolderOid,
DocTreeItemOid = template.DokumentvorlageOid,
ParentOid = parentVm.DocTreeItemOid,
Name = folder.Name,
FilesInFolder = new List<FileAttachmentDC>(),
BeWoFolderDC = folder,
Table = parentVm.DataContract.Table,
ObjectOid = parentVm.DataContract.ObjectOid
Name = template.Name,
Dokumentvorlage = template,
Table = TableID.Dokumentvorlage
};
if (folder.Files.Count != 0)
{
foreach (var file in folder.Files)
{
dc.FilesInFolder.Add(file);
}
}
DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(dc);
var newFolderNode = new TreeListNode()
{
Content = folder_vm,
IsExpandButtonVisible = DefaultBoolean.True,
Tag = false,
Image = LoadFolderImage()
IsExpandButtonVisible = DefaultBoolean.False,
Tag = template,
IsExpanded = expandItems,
Image = LoadDocumentImage()
};
dc.Node = newFolderNode;
parentNode.Nodes.Add(newFolderNode);
}
}
treeControl.EndDataUpdate();
}
private static TreeListNode FindParentNodeForTemplate(TreeListNodeCollection nodes, DokumentvorlageDC template)
{
foreach (TreeListNode node in nodes)
{
var docVm = node.Content as DocumentTreeItemVM;
if (docVm != null && docVm.DocTreeItemOid.HasValue && docVm.DocTreeItemOid == template.Parent)
{
return node;
}
var childNode = FindParentNodeForTemplate(node.Nodes, template);
if (childNode != null)
{
return childNode;
}
}
return null;
}
public static void AddFolderToTreeView(TreeListControl treeControl, List<BeWoFolderDC> folders, bool expandItems)
{
treeControl.BeginDataUpdate();
foreach (var node in treeControl.View.Nodes)
{
AddFolderToNode(node, folders, expandItems);
}
treeControl.EndDataUpdate();
}
private static void AddFolderToNode(TreeListNode parentNode, List<BeWoFolderDC> folders, bool expandItems)
{
if (parentNode != null && folders != null)
{
var parentVm = parentNode.Content as DocumentTreeItemVM;
foreach (var folder in folders)
{
if (folder.BeWoFolderOid.HasValue)
{
//if (parentVm != null && parentVm.DocTreeItemOid == folder.ObjectOid)
//{
DocumentTreeItemDC dc = new DocumentTreeItemDC()
{
DocTreeItemOid = folder.BeWoFolderOid,
ParentOid = parentVm.DocTreeItemOid,
Name = folder.Name,
FilesInFolder = new List<FileAttachmentDC>(),
BeWoFolderDC = folder,
Table = parentVm.DataContract.Table,
ObjectOid = parentVm.DataContract.ObjectOid
};
if (folder.Files.Count != 0)
{
foreach (var file in folder.Files)
{
dc.FilesInFolder.Add(file);
}
}
DocumentTreeItemVM folder_vm = new DocumentTreeItemVM(dc);
var newFolderNode = new TreeListNode()
{
Content = folder_vm,
IsExpandButtonVisible = folder.SubFolders != null && folder.SubFolders.Count > 0 ? DefaultBoolean.True : DefaultBoolean.False,
IsExpanded = expandItems,
Tag = false,
Image = LoadFolderImage()
};
dc.Node = newFolderNode;
parentNode.Nodes.Add(newFolderNode);
AddFolderToNode(newFolderNode, folder.SubFolders, expandItems);
//}
}
else
{
if (folder.ObjectOid.HasValue && folder.ObjectOid == parentVm.DocTreeItemOid)
{
AddFolderToNode(parentNode, folder.SubFolders, expandItems);
}
}
}
}
}
private static void GenerateFolderStructureForSelectedNode(TreeListNode node, List<BeWoFolderDC> folderDCs, bool hideAlleOrdner)
{
if (node.Nodes.Count == 0)
@@ -127,7 +235,7 @@ namespace BeWo.View.Document
newNode_folder = new TreeListNode()
{
Content = folder_vm,
IsExpandButtonVisible = DefaultBoolean.True,
IsExpandButtonVisible = folder.SubFolders != null && folder.SubFolders.Count > 0 ? DefaultBoolean.True : DefaultBoolean.False,
Tag = false,
Image = LoadFolderImage()
};
@@ -164,8 +272,12 @@ namespace BeWo.View.Document
private static BitmapImage LoadFolderImage()
{
return LoadImage("Folder.png");
return LoadImage("Folder");
}
private static BitmapImage LoadDocumentImage()
{
return LoadImage("Document48");
}
}
}

View File

@@ -612,8 +612,7 @@
x:Name="datagrid_templates"
Grid.Row="0"
Grid.Column="1"
Margin="2,3,5,5"
DataSource="{Binding SelectedItem.Files, ElementName=treeview}">
Margin="2,3,5,5">
<dxg:GridControl.Columns>
<dxg:GridColumn
Width="24"
@@ -638,7 +637,7 @@
Width="*"
AllowEditing="False"
FieldName="Name"
Header="Dateiname" />
Header="Name" />
<dxg:GridColumn
Width="*"
AllowEditing="False"
@@ -683,7 +682,7 @@
<dxg:TableView
x:Name="TemplateTableView"
AutoWidth="false"
NavigationStyle="Cell"
NavigationStyle="Row"
ShowGroupPanel="False"
ShowGroupedColumns="false"
ShowTotalSummary="False" />

View File

@@ -40,6 +40,7 @@ using System.Text;
using BS.Shared.Translation;
using System.Windows.Data;
using System.Globalization;
using System.ComponentModel;
namespace BeWo.View.Document
{
@@ -1270,7 +1271,7 @@ namespace BeWo.View.Document
{
alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
DokumentViewHelper.CreateTemplateTreeViewItems(template_treeview_control, alleVorlagenTabellen);
DokumentViewHelper.CreateTemplateTreeViewItems(template_treeview_control, alleVorlagenTabellen, null, false);
@@ -1307,13 +1308,12 @@ namespace BeWo.View.Document
//if (vm.Name.Equals("Hilfepläne") || vm.Name.Equals("Klienten") || vm.Name.Equals("Mitarbeiter"))
//{
List<BeWoFolderDC> folderDCs = new List<BeWoFolderDC>();
if (vm.DocTreeItemOid.HasValue)
//List<BeWoFolderDC> folderDCs = new List<BeWoFolderDC>();
if (node.Nodes.Count == 0 && vm.DocTreeItemOid.HasValue)
{
folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid);
GenerateFolderStructureForSelectedNode(node, folderDCs, true);
var folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid);
DokumentViewHelper.AddFolderToTreeView(template_treeview_control, folderDCs, false);
//GenerateFolderStructureForSelectedNode(node, folderDCs, true);
}
//}
@@ -1387,13 +1387,26 @@ namespace BeWo.View.Document
{
if (e.OriginalSource is MenuItem)
{
var row = TemplateTreeView.SelectedRows[0] as DocumentTreeItemVM;
var twi = e.OriginalSource as MenuItem;
DocumentTreeItemVM row = null;
TreeListNode selectedNode = null;
var selection = template_treeview_control.GetSelectedNodes();
if (selection != null && selection.Length > 0)
{
selectedNode = selection[0];
row = selectedNode.Content as DocumentTreeItemVM;
}
if (selectedNode == null || row == null)
{
return;
}
if (twi.Header.Equals("Neuer Ordner"))
{
TreeListNode node = new TreeListNode();
node.IsExpandButtonVisible = DefaultBoolean.True;
node.IsExpandButtonVisible = DefaultBoolean.False;
node.Image = LoadFolderImage();
BeWoFolderDC folderDC = new BeWoFolderDC()
@@ -1424,6 +1437,7 @@ namespace BeWo.View.Document
dc.Node.Content = vm;
row.DataContract.Node.Nodes.Add(dc.Node);
row.DataContract.Node.IsExpanded = true;
row.DataContract.Node.IsExpandButtonVisible = DefaultBoolean.True;
}
else if (twi.Header.Equals("Umbenennen"))
{
@@ -1436,20 +1450,20 @@ namespace BeWo.View.Document
else if (twi.Header.Equals("Neue Vorlage"))
{
var vm = new DokumentvorlageVM(new DokumentvorlageDC());
VorlagentabelleDC tabelle = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleById((long)row.DataContract.BeWoFolderDC.ObjectOid));
vm.Tabellenzugehoerigkeit = (long)tabelle.VorlagentabelleObjectTid;
vm.Parent = row.DataContract.BeWoFolderDC.BeWoFolderOid;
var savedTemplate = EditTemplate(vm);
if(savedTemplate != null)
if (savedTemplate != null)
{
if(savedTemplate.IsDirty)
if (savedTemplate.IsDirty)
{
var savedDC = SaveInDatabase(savedTemplate);
savedTemplate = new DokumentvorlageVM(savedDC);
var tableitems = datagrid_templates.ItemsSource as List<DokumentvorlageVM>;
datagrid_templates.ItemsSource = new List<DokumentvorlageVM>();
var tableitems = datagrid_templates.ItemsSource as BindingList<DokumentvorlageVM>;
datagrid_templates.ItemsSource = new BindingList<DokumentvorlageVM>();
tableitems.Add(savedTemplate);
datagrid_templates.ItemsSource = tableitems;
@@ -1464,7 +1478,7 @@ namespace BeWo.View.Document
private DokumentvorlageVM EditTemplate(DokumentvorlageVM vm)
{
var row = TemplateTreeView.SelectedRows[0] as DocumentTreeItemVM;
var folder = ServiceFacade.DoOperationsServiceSync(s => s.GetFolderById((long)row.DataContract.BeWoFolderDC.BeWoFolderOid));
//var folder = ServiceFacade.DoOperationsServiceSync(s => s.GetFolderById((long)row.DataContract.BeWoFolderDC.BeWoFolderOid));
var vt = GetVorlagenTabelleFromSelectedTreeItem(row);
if (vt == null)
{
@@ -1488,6 +1502,11 @@ namespace BeWo.View.Document
control.ButtonSavedClicked += () =>
{
saved = true;
if (control.ViewModel.IsDirty)
{
var dc = SaveInDatabase(control.ViewModel);
vm.DataContract = dc;
}
beWoWindow.Close();
};
@@ -1604,13 +1623,13 @@ namespace BeWo.View.Document
if (selected == null || selected.DataContract.BeWoFolderDC.Name == "RootFolder")
{
datagrid_templates.ItemsSource = new List<DokumentvorlageVM>();
datagrid_templates.ItemsSource = new BindingList<DokumentvorlageVM>();
return;
}
var vmList = new List<DokumentvorlageVM>();
var vmList = new BindingList<DokumentvorlageVM>();
//BeWoFolderDC folderDC = ServiceFacade.DoOperationsServiceSync(s => s.GetFolderById((long)selected.DocTreeItemOid));
//var folderDC_Oid = folderDC.BeWoFolderOid;
if (selected.DataContract.BeWoFolderDC == null)
@@ -1637,11 +1656,7 @@ namespace BeWo.View.Document
{
var templateVM = datagrid_templates.SelectedItem as DokumentvorlageVM;
EditTemplate(templateVM);
if(templateVM.IsDirty)
{
var dc = SaveInDatabase(templateVM);
templateVM.DataContract = dc;
}
}
private void PrintTemplate_Click(object sender, RoutedEventArgs e)
@@ -1820,8 +1835,8 @@ namespace BeWo.View.Document
{
ServiceFacade.DoOperationsServiceSync(s => s.DeleteTemplates(listeMitDemDC));
var gridItemsSource = this.datagrid_templates.ItemsSource as List<DokumentvorlageVM>;
datagrid_templates.ItemsSource = new List<DokumentvorlageVM>();
var gridItemsSource = this.datagrid_templates.ItemsSource as BindingList<DokumentvorlageVM>;
datagrid_templates.ItemsSource = new BindingList<DokumentvorlageVM>();
gridItemsSource.Remove(selectedTemplate);
this.datagrid_templates.ItemsSource = gridItemsSource;

View File

@@ -18,20 +18,20 @@
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition x:Name="GridRowTemplate" Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition x:Name="GridRowFolder" Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Margin="0,0,0,0" Content="Vorlage:"/>
<Label Margin="0,0,0,0" x:Name="lblTemplate" Content="Vorlage:"/>
<dxg:TreeListControl x:Name="treelistcontrol_template" Grid.Row="1" DefaultSorting="Name" Margin="5,0,5,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name" AllowSorting="True"/>
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView x:Name="TreeView_template" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False"
<dxg:TreeListView x:Name="TreeView_template" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False" AutoWidth="True"
FocusedRowChanged="DocumentsTreeView_FocusedRowChanged" PreviewMouseLeftButtonDown="DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown"
NodeExpanding="DocumentsTreeView_NodeExpanding" AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}" ParentFieldName="Binding DocumentTreeItemVM.ParentOid">
@@ -39,14 +39,14 @@
</dxg:TreeListControl.View>
</dxg:TreeListControl>
<CheckBox Content="Dokument abspeichern" Grid.Row="2" Checked="CheckBox_Checked" Margin="5,8,0,0" Unchecked="CheckBox_Unchecked" />
<CheckBox x:Name="chkSaveDoc" Content="Dokument abspeichern" Grid.Row="2" Checked="CheckBox_Checked" Margin="5,8,0,0" Unchecked="CheckBox_Unchecked" />
<dxg:TreeListControl x:Name="treelistcontrol_folderStructureForSelection" Grid.Row="3" DefaultSorting="Name" Margin="5,5,5,0" VerticalAlignment="Stretch" Visibility="Visible">
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name" AllowSorting="True"/>
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView x:Name="TreeView_folderStructureForSelection" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False"
<dxg:TreeListView x:Name="TreeView_folderStructureForSelection" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False" AutoWidth="True"
FocusedRowChanged="DocumentsTreeView_FocusedRowChanged" PreviewMouseLeftButtonDown="DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown"
NodeExpanding="DocumentsTreeView_NodeExpanding" AllowEditing="False" ShowNodeImages="True" PrintNodeImages="True"
KeyFieldName="{Binding DocumentTreeItemVM.DocTreeItemOid}" ParentFieldName="Binding DocumentTreeItemVM.ParentOid">

View File

@@ -36,32 +36,49 @@ namespace BeWo.View.Document
public event Action ButtonCreateForSelectionClicked;
public event Action ButtonCreateForAllClicked;
public event Action ButtonCancelClicked;
private TableID tableId;
private VorlagentabelleDC vorlagenTabelle;
private List<DokumentvorlageDC> alleVorlagen;
private List<BeWoFolderDC> alleOrdner;
public DocumentTreeItemVM selectedFolder = null;
private List<BeWoFolderDC> allTemplateFolder;
private List<BeWoFolderDC> allObjectFolder;
public SingleTemplateSelectionView()
{
InitializeComponent();
}
public void InitView(VorlagentabelleDC vt, List<DokumentvorlageDC> alleVorlagen, List<BeWoFolderDC> alleOrdner)
public DocumentTreeItemVM SelectedFolder { get; set; }
public DokumentvorlageDC SelectedTemplate { get; set; }
public void InitView(VorlagentabelleDC vt, List<DokumentvorlageDC> alleVorlagen, List<BeWoFolderDC> allTemplateFolder, List<BeWoFolderDC> allObjectFolder, bool showTemplateTree, bool showDocumentTree)
{
//tableId = tid;
this.vorlagenTabelle = vt;
this.alleVorlagen = alleVorlagen;
this.alleOrdner = alleOrdner;
this.allTemplateFolder = allTemplateFolder;
this.allObjectFolder = allObjectFolder;
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_template, new List<VorlagentabelleDC>() { vt }, allTemplateFolder, true);
DokumentViewHelper.AddTemplatesToTreeView(treelistcontrol_template, alleVorlagen, true);
DokumentViewHelper.CreateTemplateTreeViewItems(treelistcontrol_template, new List<VorlagentabelleDC>() { vt } );
List<PrintSelectionVM> vms = new List<PrintSelectionVM>();
if (!showTemplateTree)
{
lblTemplate.Visibility = Visibility.Collapsed;
treelistcontrol_template.Visibility = Visibility.Collapsed;
GridRowTemplate.Height = GridLength.Auto;
}
if (!showDocumentTree)
{
chkSaveDoc.Visibility = Visibility.Collapsed;
treelistcontrol_folderStructureForSelection.Visibility = Visibility.Collapsed;
GridRowFolder.Height = GridLength.Auto;
}
Focus();
}
@@ -83,14 +100,14 @@ namespace BeWo.View.Document
private void Button_CreateTemplateForSelection_Click(object sender, RoutedEventArgs e)
{
//var selected = combobox_elementList.SelectedItem as PrintSelectionVM;
//if (selected == null)
//{
// MessageBox.Show("Es muss ein Datensatz ausgewählt werden.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
// return;
//}
var selected = treelistcontrol_template.SelectedItem as DocumentTreeItemVM;
if (selected == null ||selected.DataContract.Dokumentvorlage == null)
{
MessageBox.Show("Bitte wählen Sie eine Vorlage aus.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
SelectedTemplate = selected.DataContract.Dokumentvorlage;
ButtonCreateForSelectionClicked?.Invoke();
}
@@ -114,7 +131,7 @@ namespace BeWo.View.Document
private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
{
selectedFolder = null;
SelectedFolder = null;
treelistcontrol_folderStructureForSelection.Visibility = Visibility.Collapsed;
}
@@ -204,7 +221,7 @@ namespace BeWo.View.Document
private void DocumentsTreeView_folderStructureForSelection_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (TreeView_template.SelectedRows.Count != 0)
selectedFolder = TreeView_template.SelectedRows[0] as DocumentTreeItemVM;
SelectedFolder = TreeView_template.SelectedRows[0] as DocumentTreeItemVM;
}

View File

@@ -37,8 +37,8 @@
<Label Grid.Column="0" Grid.Row="0" Content="Name" />
<Label Grid.Column="0" Grid.Row="1" Content="Beschreibung" />
<dxe:TextEdit x:Name="TextEdit_Vorlagenname" Grid.Column="1" Grid.Row="0" Height="23" Margin="3,0,3,3" EditValueChanged="TextEdit_Vorlagenname_EditValueChanged"/>
<dxe:TextEdit x:Name="TextEdit_Beschreibung" Grid.Column="1" Grid.Row="1" Height="23" Margin="3,0,3,3" EditValueChanged="TextEdit_Beschreibung_EditValueChanged"/>
<TextBox x:Name="TextEdit_Vorlagenname" Grid.Column="1" Grid.Row="0" Height="23" Margin="3,0,3,3" Text="{Binding Name}"/>
<TextBox x:Name="TextEdit_Beschreibung" Grid.Column="1" Grid.Row="1" MinHeight="60" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Height="23" Margin="3,0,3,3" Text="{Binding Beschreibung}"/>
</Grid>
<Grid Grid.Row="1" Margin="3 10 3 0">

View File

@@ -64,22 +64,11 @@ namespace BeWo.View.Document
{
InitializeComponent();
VorlagenTabelle = vorlagenTabelle;
ViewModel = pVM;
var copy = new DokumentvorlageVM(pVM.DataContract);
ViewModel = copy;
DataContext = pVM;
if(pVM.Name != null)
{
TextEdit_Vorlagenname.EditValue = pVM.Name;
TextEdit_Vorlagenname.DataContext = pVM.Name;
TextEdit_Vorlagenname.Text = pVM.Name;
}
if (pVM.Beschreibung != null)
{
TextEdit_Beschreibung.EditValue = pVM.Beschreibung;
TextEdit_Beschreibung.DataContext = pVM.Beschreibung;
TextEdit_Beschreibung.Text = pVM.Beschreibung;
}
if (pVM.Text != null)
{
EditorControl.RtfText = pVM.RTFText;
@@ -212,16 +201,6 @@ namespace BeWo.View.Document
ButtonCancelClicked?.Invoke();
}
}
private void TextEdit_Vorlagenname_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
if (TextEdit_Vorlagenname.EditValue != null)
ViewModel.Name = TextEdit_Vorlagenname.EditValue.ToString();
}
private void TextEdit_Beschreibung_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
if (TextEdit_Beschreibung.EditValue != null)
ViewModel.Beschreibung = TextEdit_Beschreibung.EditValue.ToString();
}
// Mouseup, um die aktuelle Position des Cursors zu speichern, um dort den Platzhalter an der aktuellen Stelle einzusetzen
// Klappt nur, wenn in Text geklickt wird und nicht hinter ein Wort..

View File

@@ -364,7 +364,8 @@ namespace BeWo.View.Navigation
if (alleVorlagen.Count > 0)
{
var c = (CompactCustomerDC)((Hyperlink)sender).Tag;
OpenTemplateSelectionDialog(alleVorlagen, c);
DokumentViewHelper.OpenTemplateSelectionDialog(alleVorlagen, TableID.Customer, c.CustomerOid);
}
else
{
@@ -376,22 +377,7 @@ namespace BeWo.View.Navigation
}
private void OpenTemplateSelectionDialog(List<DokumentvorlageDC> alleVorlagen, CompactCustomerDC c)
{
//Angebot Netzwerk 19 Einrichtungen a 6 User durchschnittlich
var view = new SingleTemplateSelectionView();
var folderList = VMFactory.CreateFolderList(TableID.Customer, c.Oid.Value);
var alleVorlagenTabellen = ServiceFacade.DoOperationsServiceSync(s => s.GetVorlagentabelleDCs());
view.InitView(alleVorlagenTabellen.FirstOrDefault(v => v.VorlagentabelleObjectTid.HasValue && v.VorlagentabelleObjectTid.Value == (int)TableID.Customer), alleVorlagen, folderList);
var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Vorlage auswählen"), view, 600, 600);
view.ButtonCancelClicked += () => beWoWindow.Close();
beWoWindow.ShowDialog();
}
private void MainNavigationView_OnOpenMailMergeWindow(List<IFilterableDC> allCustomers, IFilterableDC selectedCustomer)
{

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using BeWo.Core;
using BeWo.Validation;
using BeWo.ViewModel.ListViewModel;
@@ -108,6 +110,94 @@ namespace BeWo.ViewModel
}
}
public List<String> SortItems
{
get
{
var list = new List<String>();
list.Add("aufsteigend");
list.Add("absteigend");
return list;
}
}
public int SelectedSortIndex
{
get
{
return BeWoApp.AppSettings.LastBewilligungSortOrder;
}
set
{
BeWoApp.AppSettings.LastBewilligungSortOrder = value;
this.FirePropertyChanged("SelectedSortIndex");
this.FirePropertyChanged("SortedVMList");
}
}
public BindingList<SupportConceptApprovalPeriodVM> SortedVMList
{
get
{
var list = this.ApprovalPeriodList.VMList;
if (list.Count > 1)
{
//Entferne die Items aus der Originalliste und füge sie später wieder hinzu, sonst aktualisiert sich die View nicht:-(
var copyList = new BindingList<SupportConceptApprovalPeriodVM>();
foreach (var item in list)
{
copyList.Add(item);
}
list.Clear();
if (SelectedSortIndex == 0)
{
copyList.Sort((a, b) => a.StartDate.HasValue ? a.StartDate.Value.CompareTo(b.StartDate) : 0);
}
else
{
copyList.Sort((a, b) => b.StartDate.HasValue ? b.StartDate.Value.CompareTo(a.StartDate) : 0);
}
foreach (var item in copyList)
{
list.Add(item);
}
}
return list;
}
}
//public ObservableCollection<SupportConceptApprovalPeriodVM> SortedVMList
//{
// get
// {
// var list = this.ApprovalPeriodList.VMList;
// if (SelectedSortIndex == 0)
// {
// list.Sort((a, b) => a.StartDate.HasValue ? a.StartDate.Value.CompareTo(b.StartDate) : 0);
// }
// else
// {
// list.Sort((a, b) => b.StartDate.HasValue ? b.StartDate.Value.CompareTo(a.StartDate) : 0);
// }
// var sortedlist = new ObservableCollection<SupportConceptApprovalPeriodVM>();
// sortedlist.AddRange(list);
// return sortedlist;
// }
//}
// public decimal RateFactor
// {
// get { return _RateFactor; }

View File

@@ -203,7 +203,7 @@ namespace Dakota.Logic
info.Name1 = infoParameter.AddressInformation.OrganisationName;
info.Name2 = infoParameter.AddressInformation.Phone;
info.Name3 = infoParameter.AddressInformation.Mail;
info.Name4 = "Entwicklung: dakota.exchange@ownsoft.de";
info.Name4 = "Entwicklung dakota.exchange@ownsoft.de";
return info;
}

View File

@@ -31,8 +31,8 @@
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>

View File

@@ -1 +0,0 @@
UPDATE `organisation` SET `Verfahrensstufe` = '0' WHERE (`Verfahrensstufe` = '1');

View File

@@ -1,3 +1,5 @@
UPDATE `organisation` SET `Verfahrensstufe` = '0' WHERE (`Verfahrensstufe` = '1');
ALTER TABLE `gkvabrechnung`
ADD COLUMN `OrganisationOid` BIGINT NULL DEFAULT NULL AFTER `Verfahrensstufe`;
@@ -12,4 +14,9 @@ LEFT JOIN costbearer cb
ON c2sc.CostBearerOid = cb.Oid
LEFT JOIN organisation o
ON o.CostBearerOid = cb.Oid
SET gab.OrganisationOid = o.Oid;
SET gab.OrganisationOid = o.Oid;
UPDATE organisation o
RIGHT JOIN gkvabrechnung g
ON o.Oid = g.OrganisationOid
SET o.Verfahrensstufe = 1;

View File

@@ -1373,5 +1373,27 @@ ALTER TABLE `organisation`
ADD COLUMN `BezDatenannahmestelle` VARCHAR(4096) NULL DEFAULT NULL AFTER `IKDatenannahmestelle`;
ALTER TABLE `organisation`
ADD COLUMN `Verfahrensstufe` INT NULL DEFAULT 0 AFTER `BusinessPartnerId`;
ADD COLUMN `Verfahrensstufe` INT NULL DEFAULT '1' AFTER `BusinessPartnerId`;
ALTER TABLE `organisation`
ADD COLUMN `GkvAusblenden` TINYINT NULL DEFAULT NULL AFTER `BusinessPartnerId`;
ALTER TABLE `mandator`
ADD COLUMN `BankAccountOid` BIGINT NULL DEFAULT NULL AFTER `IKLeistungserbringer`;
ALTER TABLE `mandator`
ADD COLUMN `SoziotherapieAnsprechpartnerOid` BIGINT NULL DEFAULT NULL AFTER `BankAccountOid`;
ALTER TABLE `mandator`
ADD COLUMN `Website` VARCHAR(2048) NULL DEFAULT NULL AFTER `Name`;
ALTER TABLE `mandator`
ADD COLUMN `ImageOid` BIGINT NULL DEFAULT NULL AFTER `SoziotherapieAnsprechpartnerOid`;
ALTER TABLE `mandator`
ADD COLUMN `ColorWaitTooLong` VARCHAR(16) NULL DEFAULT NULL AFTER `ImageOid`,
ADD COLUMN `ColorSendUrbelege` VARCHAR(16) NULL DEFAULT NULL AFTER `ColorWaitTooLong`,
ADD COLUMN `ShowGkvBzEinzel` TINYINT NULL DEFAULT NULL AFTER `ColorSendUrbelege`,
ADD COLUMN `ShowGkvBzUrbelege` TINYINT NULL DEFAULT NULL AFTER `ShowGkvBzEinzel`;

View File

@@ -54,7 +54,7 @@ namespace BeWo.Report.ReportObjects
result.EndDay = end;
// Ist kein Hilfeplan gesetzt und die Listen null, dann wird für ALLE Hilfepläne erstellt
if (supportConcept == null && ausgewaehlteZiele == null && scZiele == null)
if (supportConcept == null/* && ausgewaehlteZiele == null && scZiele == null*/)
{
// In diesem Dictionary wird jeder Benotung aus der Verwaltung die vergebene Menge im Zeitraum zugeordnet
Dictionary<string, decimal> ratingTypeZuAnzahl = new Dictionary<string, decimal>();
@@ -85,6 +85,9 @@ namespace BeWo.Report.ReportObjects
// Dann in oben genanntes Dictionary packen, um nach Bewertung zu gruppieren und die Anzahl der vergebenen Bewertung zu zählen
foreach (var rating in allGoalRatings)
{
if (rating.RatingType == null)
continue;
if (!ratingTypeZuAnzahl.ContainsKey(rating.RatingType.DisplayName))
ratingTypeZuAnzahl.Add(rating.RatingType.DisplayName, 0);

View File

@@ -108,6 +108,7 @@
<Compile Include="Service\CustomAccountingService.cs" />
<Compile Include="Service\CustomCustomerService.cs" />
<Compile Include="Service\CustomEmployeeService.cs" />
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -0,0 +1,24 @@
using BeWo.Service.Plugins;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KundeXyz.Service
{
class CustomVacationService : VacationService
{
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
{
var list = base.GetFeiertage(year, bundesland);
if (year >= 2024)
list.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
return list;
}
}
}

View File

@@ -236,7 +236,7 @@ where sr.startdate >= ':Von' and sr.startdate < ':Bis'
/*
*
ZG_ID K_ID Kostenträger Bereits gezahlt Bis dato geleistete FLS Betrag Saldo
ZG_ID K_ID Kostenträger Bereits gezahlt Bis dato geleistete FLS Betrag Saldo
Startdatum Alle HPs die ab dem Datum starten
Enddatum Stichtag

View File

@@ -49,7 +49,7 @@ namespace BeWo.FaerberReport
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAz = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
@@ -127,7 +127,7 @@ namespace BeWo.FaerberReport
this.xrTable1,
this.xrLabel6,
this.xrLabel5,
this.xrLabel4,
this.lblAz,
this.xrLabel3,
this.xrLabel2,
this.xrTable2,
@@ -329,21 +329,21 @@ namespace BeWo.FaerberReport
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.Text = "Sehr geehrte Damen und Herren,";
//
// xrLabel4
// lblAz
//
this.xrLabel4.BackColor = System.Drawing.Color.Transparent;
this.xrLabel4.CanShrink = true;
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
this.lblAz.BackColor = System.Drawing.Color.Transparent;
this.lblAz.CanShrink = true;
this.lblAz.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 317F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(650F, 17F);
this.xrLabel4.StylePriority.UseBackColor = false;
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "[CustomerReferenceNumberAndDate]";
this.xrLabel4.WordWrap = false;
this.lblAz.LocationFloat = new DevExpress.Utils.PointFloat(0F, 317F);
this.lblAz.Multiline = true;
this.lblAz.Name = "lblAz";
this.lblAz.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAz.SizeF = new System.Drawing.SizeF(650F, 17F);
this.lblAz.StylePriority.UseBackColor = false;
this.lblAz.StylePriority.UseFont = false;
this.lblAz.Text = "[CustomerReferenceNumberAndDate]";
this.lblAz.WordWrap = false;
//
// xrLabel3
//
@@ -357,7 +357,8 @@ namespace BeWo.FaerberReport
this.xrLabel3.SizeF = new System.Drawing.SizeF(650F, 16F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerName]";
this.xrLabel3.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerName], geb. [CustomerB" +
"irthday!dd.MM.yyyy]";
this.xrLabel3.WordWrap = false;
//
// xrLabel2
@@ -955,7 +956,7 @@ namespace BeWo.FaerberReport
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel lblAz;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRTable xrTable2;

View File

@@ -15,6 +15,11 @@ namespace BeWo.FaerberReport
public void SetReportDataSource(SettlementRO pRO)
{
if (!String.IsNullOrEmpty(pRO.CustomerReferenceNumberAndDate))
{
pRO.CustomerReferenceNumberAndDate = pRO.CustomerReferenceNumberAndDate.Replace("73.20-", "");
}
if (pRO.CreatorName != null && pRO.CreatorName.ToLower().Contains("sebastian nellessen"))
{
lblCreatorDivision.Text = "Inhaber/Geschäftsleitung";

View File

@@ -49,7 +49,7 @@ namespace BeWo.FaerberReport.Neu
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAz = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
@@ -84,7 +84,6 @@ namespace BeWo.FaerberReport.Neu
this.xrTableRow34 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell51 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell52 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow22 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -105,12 +104,13 @@ namespace BeWo.FaerberReport.Neu
this.xrTableRow28 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell41 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell42 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -127,7 +127,7 @@ namespace BeWo.FaerberReport.Neu
this.xrTable1,
this.xrLabel6,
this.xrLabel5,
this.xrLabel4,
this.lblAz,
this.xrLabel3,
this.xrLabel2,
this.xrTable2,
@@ -329,21 +329,21 @@ namespace BeWo.FaerberReport.Neu
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.Text = "Sehr geehrte Damen und Herren,";
//
// xrLabel4
// lblAz
//
this.xrLabel4.BackColor = System.Drawing.Color.Transparent;
this.xrLabel4.CanShrink = true;
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
this.lblAz.BackColor = System.Drawing.Color.Transparent;
this.lblAz.CanShrink = true;
this.lblAz.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 317F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(650F, 17F);
this.xrLabel4.StylePriority.UseBackColor = false;
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "[CustomerReferenceNumberAndDate]";
this.xrLabel4.WordWrap = false;
this.lblAz.LocationFloat = new DevExpress.Utils.PointFloat(0F, 317F);
this.lblAz.Multiline = true;
this.lblAz.Name = "lblAz";
this.lblAz.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAz.SizeF = new System.Drawing.SizeF(650F, 17F);
this.lblAz.StylePriority.UseBackColor = false;
this.lblAz.StylePriority.UseFont = false;
this.lblAz.Text = "[CustomerReferenceNumberAndDate]";
this.lblAz.WordWrap = false;
//
// xrLabel3
//
@@ -357,7 +357,8 @@ namespace BeWo.FaerberReport.Neu
this.xrLabel3.SizeF = new System.Drawing.SizeF(650F, 16F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerName]";
this.xrLabel3.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerName], geb. [CustomerB" +
"irthday!dd.MM.yyyy]";
this.xrLabel3.WordWrap = false;
//
// xrLabel2
@@ -683,10 +684,6 @@ namespace BeWo.FaerberReport.Neu
this.xrTableCell52.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell52.Weight = 0.33384615384615385D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO);
//
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -916,6 +913,10 @@ namespace BeWo.FaerberReport.Neu
this.xrTableCell42.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell42.Weight = 0.33384615384615385D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO);
//
// Spitzabrechnung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -940,8 +941,8 @@ namespace BeWo.FaerberReport.Neu
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -953,7 +954,7 @@ namespace BeWo.FaerberReport.Neu
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel lblAz;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRTable xrTable2;

View File

@@ -13,6 +13,11 @@ namespace BeWo.FaerberReport.Neu
public void SetReportDataSource(Settlement2RO pRO)
{
if (!String.IsNullOrEmpty(pRO.CustomerReferenceNumberAndDate))
{
pRO.CustomerReferenceNumberAndDate = pRO.CustomerReferenceNumberAndDate.Replace("73.20-", "");
}
if (pRO.CreatorName != null && pRO.CreatorName.ToLower().Contains("sebastian nellessen"))
{
lblCreatorDivision.Text = "Inhaber/Geschäftsleitung";

View File

@@ -30,6 +30,7 @@ namespace KommMit
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrTableServiceRecords1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -49,7 +50,6 @@ namespace KommMit
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell23 = 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.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
@@ -95,18 +95,22 @@ namespace KommMit
this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldGruppe = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell30 = new DevExpress.XtraReports.UI.XRTableCell();
this.picSignature = new DevExpress.XtraReports.UI.XRPictureBox();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableServiceRecords1});
this.Detail.Font = new System.Drawing.Font("Arial", 11F);
this.Detail.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.Detail.HeightF = 40F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
@@ -119,7 +123,7 @@ namespace KommMit
this.xrTableServiceRecords1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableServiceRecords1.Font = new System.Drawing.Font("Arial", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))));
this.xrTableServiceRecords1.Font = new DevExpress.Drawing.DXFont("Arial", 12F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableServiceRecords1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTableServiceRecords1.Name = "xrTableServiceRecords1";
this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F);
@@ -141,7 +145,8 @@ namespace KommMit
this.xrTableCell4,
this.xrTableCell6,
this.xrTableCell11,
this.xrTableCell22});
this.xrTableCell22,
this.xrTableCell29});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.StylePriority.UsePadding = false;
this.xrTableRow2.StylePriority.UseTextAlignment = false;
@@ -149,49 +154,59 @@ namespace KommMit
//
// xrTableCell3
//
this.xrTableCell3.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell3.StylePriority.UseBorderColor = false;
this.xrTableCell3.StylePriority.UseFont = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "Datum";
this.xrTableCell3.Weight = 0.16108448201773978D;
this.xrTableCell3.Weight = 0.20507568865293815D;
//
// xrTableCell1
//
this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell1.Multiline = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.Text = "Uhrzeit";
this.xrTableCell1.Weight = 0.16108447913282473D;
this.xrTableCell1.Weight = 0.21461407701458674D;
//
// xrTableCell4
//
this.xrTableCell4.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell4.Multiline = true;
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.Text = "Minuten";
this.xrTableCell4.Weight = 0.1610844791328247D;
this.xrTableCell4.Weight = 0.20507568273136731D;
//
// xrTableCell6
//
this.xrTableCell6.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.StylePriority.UseFont = false;
this.xrTableCell6.Text = "Stunden";
this.xrTableCell6.Weight = 0.1610844773057295D;
this.xrTableCell6.Weight = 0.20507567442786476D;
//
// xrTableCell11
//
this.xrTableCell11.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell11.Multiline = true;
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.StylePriority.UseTextAlignment = false;
this.xrTableCell11.Text = "Art";
this.xrTableCell11.Weight = 0.1610844767768195D;
this.xrTableCell11.Weight = 0.2050756805366005D;
//
// xrTableCell22
//
this.xrTableCell22.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell22.Name = "xrTableCell22";
this.xrTableCell22.StylePriority.UseFont = false;
this.xrTableCell22.Text = "FStunden";
this.xrTableCell22.Weight = 0.357965489646742D;
this.xrTableCell22.Weight = 0.20507567694354445D;
//
// DetailReport
//
@@ -208,7 +223,7 @@ namespace KommMit
//
this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable3});
this.Detail1.Font = new System.Drawing.Font("Arial", 12F);
this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 12F);
this.Detail1.HeightF = 20F;
this.Detail1.Name = "Detail1";
this.Detail1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
@@ -220,7 +235,7 @@ namespace KommMit
this.xrTable3.BorderColor = System.Drawing.Color.Black;
this.xrTable3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable3.Font = new System.Drawing.Font("Arial", 9F);
this.xrTable3.Font = new DevExpress.Drawing.DXFont("Arial", 9F);
this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable3.Name = "xrTable3";
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F);
@@ -240,7 +255,8 @@ namespace KommMit
this.xrTableCell5,
this.xrTableCell7,
this.xrTableCell15,
this.xrTableCell23});
this.xrTableCell23,
this.xrTableCell30});
this.xrTableRow6.Name = "xrTableRow6";
this.xrTableRow6.StylePriority.UsePadding = false;
this.xrTableRow6.StylePriority.UseTextAlignment = false;
@@ -255,7 +271,7 @@ namespace KommMit
this.xrTableCell13.StylePriority.UsePadding = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "xrTableCell13";
this.xrTableCell13.Weight = 0.083404482620571846D;
this.xrTableCell13.Weight = 0.10422002948284512D;
//
// xrTableCell2
//
@@ -264,7 +280,7 @@ namespace KommMit
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.Text = "xrTableCell2";
this.xrTableCell2.Weight = 0.083404469616263216D;
this.xrTableCell2.Weight = 0.10906726197119536D;
//
// xrTableCell5
//
@@ -273,7 +289,7 @@ namespace KommMit
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.Text = "xrTableCell5";
this.xrTableCell5.Weight = 0.0834044908271247D;
this.xrTableCell5.Weight = 0.10422004693515537D;
//
// xrTableCell7
//
@@ -282,7 +298,7 @@ namespace KommMit
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.Text = "xrTableCell7";
this.xrTableCell7.Weight = 0.083404476560206D;
this.xrTableCell7.Weight = 0.10422002342247927D;
//
// xrTableCell15
//
@@ -293,7 +309,7 @@ namespace KommMit
this.xrTableCell15.StylePriority.UsePadding = false;
this.xrTableCell15.StylePriority.UseTextAlignment = false;
this.xrTableCell15.Text = "xrTableCell15";
this.xrTableCell15.Weight = 0.083404475396748862D;
this.xrTableCell15.Weight = 0.10421968941175588D;
//
// xrTableCell23
//
@@ -301,11 +317,7 @@ namespace KommMit
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.FLSQualifiedString")});
this.xrTableCell23.Name = "xrTableCell23";
this.xrTableCell23.Text = "xrTableCell23";
this.xrTableCell23.Weight = 0.18534334830769048D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
this.xrTableCell23.Weight = 0.1042200189000128D;
//
// formattingRuleStartDate
//
@@ -318,14 +330,15 @@ namespace KommMit
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.ReportHeader.Font = new System.Drawing.Font("Arial", 11F);
this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.ReportHeader.HeightF = 160F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
// xrTable1
//
this.xrTable1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTable1.Font = new DevExpress.Drawing.DXFont("Arial", 9F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F);
@@ -355,7 +368,8 @@ namespace KommMit
//
// xrTableCell9
//
this.xrTableCell9.Font = new System.Drawing.Font("Arial", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell9.Font = new DevExpress.Drawing.DXFont("Arial", 12F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))), DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell9.Multiline = true;
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.StylePriority.UseFont = false;
@@ -495,7 +509,7 @@ namespace KommMit
//
// topMarginBand1
//
this.topMarginBand1.Font = new System.Drawing.Font("Times New Roman", 9.75F);
this.topMarginBand1.Font = new DevExpress.Drawing.DXFont("Times New Roman", 9.75F);
this.topMarginBand1.HeightF = 90F;
this.topMarginBand1.Name = "topMarginBand1";
this.topMarginBand1.StylePriority.UseFont = false;
@@ -517,7 +531,7 @@ namespace KommMit
this.xrTable2,
this.xrLabel7,
this.xrLabel6});
this.ReportFooter.Font = new System.Drawing.Font("Arial", 11F);
this.ReportFooter.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.ReportFooter.HeightF = 231.75F;
this.ReportFooter.Name = "ReportFooter";
this.ReportFooter.StylePriority.UseFont = false;
@@ -525,7 +539,7 @@ namespace KommMit
// xrPictureBox2
//
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "EmployeeSignature")});
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(10.0001F, 160.75F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(232.9163F, 42.99997F);
@@ -534,7 +548,7 @@ namespace KommMit
// xrPictureBox1
//
this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")});
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")});
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(433.9999F, 160.7501F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(181.6248F, 42.99997F);
@@ -546,11 +560,12 @@ namespace KommMit
this.xrLabel20.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLMFehlkontakte", "{0:0.##}")});
this.xrLabel20.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(180F, 40.99998F);
this.xrLabel20.Font = new DevExpress.Drawing.DXFont("Arial", 9F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(176F, 40.99998F);
this.xrLabel20.Name = "xrLabel20";
this.xrLabel20.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel20.SizeF = new System.Drawing.SizeF(90.00002F, 20F);
this.xrLabel20.SizeF = new System.Drawing.SizeF(86.00008F, 20F);
this.xrLabel20.StylePriority.UseBackColor = false;
this.xrLabel20.StylePriority.UseBorders = false;
this.xrLabel20.StylePriority.UseFont = false;
@@ -563,11 +578,12 @@ namespace KommMit
this.xrLabel21.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel21.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel21.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel21.Font = new DevExpress.Drawing.DXFont("Arial", 9F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel21.LocationFloat = new DevExpress.Utils.PointFloat(0.0001271566F, 40.99998F);
this.xrLabel21.Name = "xrLabel21";
this.xrLabel21.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel21.SizeF = new System.Drawing.SizeF(179.9999F, 20F);
this.xrLabel21.SizeF = new System.Drawing.SizeF(175.9998F, 20F);
this.xrLabel21.StylePriority.UseBackColor = false;
this.xrLabel21.StylePriority.UseBorders = false;
this.xrLabel21.StylePriority.UseFont = false;
@@ -578,7 +594,7 @@ namespace KommMit
//
// xrLabel2
//
this.xrLabel2.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0.0001430511F, 125.2083F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -589,7 +605,7 @@ namespace KommMit
//
// xrLabel1
//
this.xrLabel1.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0.0001271566F, 78.74998F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -604,13 +620,14 @@ namespace KommMit
this.xrTable2.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable2.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 16F);
this.xrTable2.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 15.99998F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow9});
this.xrTable2.SizeF = new System.Drawing.SizeF(650F, 25F);
this.xrTable2.SizeF = new System.Drawing.SizeF(519.9999F, 25F);
this.xrTable2.StylePriority.UseBackColor = false;
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
@@ -633,19 +650,20 @@ namespace KommMit
//
// xrTableCell24
//
this.xrTableCell24.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell24.Name = "xrTableCell24";
this.xrTableCell24.StylePriority.UseBorderColor = false;
this.xrTableCell24.StylePriority.UseFont = false;
this.xrTableCell24.StylePriority.UsePadding = false;
this.xrTableCell24.StylePriority.UseTextAlignment = false;
this.xrTableCell24.Text = "Total:";
this.xrTableCell24.Weight = 0.3221689582656494D;
this.xrTableCell24.Weight = 0.39376192092268159D;
//
// xrTableCell25
//
this.xrTableCell25.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLM")});
this.xrTableCell25.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell25.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.xrTableCell25.Multiline = true;
this.xrTableCell25.Name = "xrTableCell25";
this.xrTableCell25.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
@@ -654,13 +672,13 @@ namespace KommMit
this.xrTableCell25.StylePriority.UseTextAlignment = false;
this.xrTableCell25.Text = "Uhrzeit";
this.xrTableCell25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell25.Weight = 0.16108450644342517D;
this.xrTableCell25.Weight = 0.19240662390081412D;
//
// xrTableCell26
//
this.xrTableCell26.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLHoursMinutesString")});
this.xrTableCell26.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell26.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.xrTableCell26.Multiline = true;
this.xrTableCell26.Name = "xrTableCell26";
this.xrTableCell26.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
@@ -669,24 +687,24 @@ namespace KommMit
this.xrTableCell26.StylePriority.UseTextAlignment = false;
this.xrTableCell26.Text = "Minuten";
this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell26.Weight = 0.1610843054496002D;
this.xrTableCell26.Weight = 0.19240625221573929D;
//
// xrTableCell28
//
this.xrTableCell28.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell28.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.xrTableCell28.Name = "xrTableCell28";
this.xrTableCell28.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTableCell28.StylePriority.UseFont = false;
this.xrTableCell28.StylePriority.UsePadding = false;
this.xrTableCell28.StylePriority.UseTextAlignment = false;
this.xrTableCell28.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell28.Weight = 0.161084523934385D;
this.xrTableCell28.Weight = 0.1924063341475242D;
//
// xrTableCell27
//
this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLSQualifiedString")});
this.xrTableCell27.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell27.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.xrTableCell27.Name = "xrTableCell27";
this.xrTableCell27.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
this.xrTableCell27.StylePriority.UseFont = false;
@@ -694,7 +712,7 @@ namespace KommMit
this.xrTableCell27.StylePriority.UseTextAlignment = false;
this.xrTableCell27.Text = "Stunden";
this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell27.Weight = 0.35796543151696231D;
this.xrTableCell27.Weight = 0.19240659442326288D;
//
// xrLabel7
//
@@ -744,6 +762,39 @@ namespace KommMit
this.fieldGruppe.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldGruppe.Name = "fieldGruppe";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// xrTableCell29
//
this.xrTableCell29.Font = new DevExpress.Drawing.DXFont("Arial", 11F, ((DevExpress.Drawing.DXFontStyle)((DevExpress.Drawing.DXFontStyle.Bold | DevExpress.Drawing.DXFontStyle.Underline))));
this.xrTableCell29.Multiline = true;
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.StylePriority.UseFont = false;
this.xrTableCell29.Text = "Unterschrift Klient/in";
this.xrTableCell29.Weight = 0.30999813357437095D;
//
// xrTableCell30
//
this.xrTableCell30.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.picSignature});
this.xrTableCell30.Multiline = true;
this.xrTableCell30.Name = "xrTableCell30";
this.xrTableCell30.Weight = 0.15754202151285177D;
//
// picSignature
//
this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")});
this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picSignature.Name = "picSignature";
this.picSignature.SizeF = new System.Drawing.SizeF(128.9581F, 20.00001F);
this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.picSignature.StylePriority.UseBorders = false;
this.picSignature.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.picSignature_BeforePrint);
//
// Stundenzettel
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -764,17 +815,19 @@ namespace KommMit
this.formattingRuleServiceDesc,
this.formattingRuleCostBearer,
this.formattingRuleEmployeeName});
this.Margins = new System.Drawing.Printing.Margins(75, 75, 90, 30);
this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 90F, 30F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.SnapGridSize = 9F;
this.Version = "17.1";
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -846,5 +899,8 @@ namespace KommMit
private DevExpress.XtraReports.UI.XRLabel xrLabel21;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell29;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell30;
private DevExpress.XtraReports.UI.XRPictureBox picSignature;
}
}

View File

@@ -5,6 +5,10 @@ using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Drawing;
using BS.Shared.Core;
using System.IO;
namespace KommMit
{
@@ -32,6 +36,8 @@ namespace KommMit
{
if (s.IsBillable)
{
ServicesOverviewRO.CreateSignatureString(s);
double echteMinuten = 0;
if (s.ServiceDescription.ToLower().Contains("fehlkontakt"))
{
@@ -105,5 +111,30 @@ namespace KommMit
this.bindingSource1.DataSource = pRO;
}
}
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public Image ByteArrayToImage(byte[] byteArrayIn)
{
using (var memoryStream = new MemoryStream(byteArrayIn))
{
return Image.FromStream(memoryStream);
}
}
}
}

View File

@@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>21, 17</value>
</metadata>
</root>

View File

@@ -4,32 +4,677 @@ using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BeWo.Service.ServiceImplementations;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using static BeWo.Report.ReportObjects.MitarbeiterauslastungRO;
namespace LebenshilfeStade
{
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
{
public override void CreateReport(MitarbeiterstundenkontoRO ro)
{
base.CreateReport(ro);
private decimal maxWochenstunden = 40;
private const int ANZ_WOCHENTAGE = 5;
private Contract currentContract = null;
// Faktor auf die Gesamtstunden Ist, der sich aus Vertrag (Wochen-FLS / Wochenstunden) ergibt
public override void CreateEmployeeDetails(MitarbeiterstundenkontoRO ro)
{
#region Standardkram
foreach (var empDetail in ro.EmployeeDetailList)
{
var contract = empDetail.Employee.GetValidContractForDate(ro.ReportStartDate);
decimal faktor = 1.25m;
if (contract.WeeklyFLS.HasValue && contract.WeeklyFLS.Value != 0 && contract.WeeklyTotalHours.HasValue && contract.WeeklyTotalHours.Value != 0)
faktor = 1 - (contract.WeeklyFLS.Value / contract.WeeklyTotalHours.Value) + 1;
{
empDetail.StundenGesamtIst *= faktor;
}
}
DateTime monatsAnfang = ro.ReportStartDate;
DateTime monatsEnde = monatsAnfang.AddMonths(1);
DateTime berichtsAnfang = monatsAnfang;
DateTime berichtsEnde = monatsEnde;
public override bool ShouldCreateDayDetails()
Employee emp = empDetail.Employee;
decimal bu = 0;
var c = GetContractForDate(emp, ro.ReportStartDate, ro.ReportEndDate);
if (c != null)
{
if (c.EntryDate.HasValue && c.EntryDate > monatsAnfang)
{
berichtsAnfang = c.EntryDate.Value;
}
if (c.ContractEndDate.HasValue && c.ContractEndDate < monatsEnde)
{
berichtsEnde = c.ContractEndDate.Value.Date.AddDays(1);
}
empDetail.HasContract = true;
}
ServiceRecordSummary summaryTotal = new ServiceRecordSummary();
summaryTotal.RecordsImBerichtszeitraum = new List<ServiceRecord>();
decimal pause1 = 0;
decimal pause2 = 0;
decimal weeklyTotalHours = 0;
decimal flsSollGesamt = 0;
decimal? fehlZeitenGesamt = null;
decimal? tageUrlaubGesamt = null;
decimal? tageKrankheitGesamt = null;
decimal? abwesenheitTageGesamt = null;
decimal workdaysTotal = 0;
decimal stundenSollGesamt = 0;
decimal tatSollStdGesamt = 0;
decimal azDurchFeiertage = 0;
IList<ServiceRecord> groupFilteredRecords = empDetail.AllServiceRecords;
if (groupFilteredRecords == null)
{
IList<ServiceRecord> recordsAll = DAOFactory.SearchDAO.FindServiceRecords(emp.Oid, null);
recordsAll = AnalysisServiceImp.FilterActiveServiceRecords(recordsAll);
//
groupFilteredRecords = new List<ServiceRecord>();
Dictionary<long, bool> groupBookingDict = new Dictionary<long, bool>();
foreach (var item in recordsAll)
{
if (!item.GroupOid.HasValue || !groupBookingDict.ContainsKey(item.GroupOid.Value))
{
groupFilteredRecords.Add(item);
if (item.GroupOid.HasValue)
{
groupBookingDict.Add(item.GroupOid.Value, true);
}
}
}
empDetail.AllServiceRecords = groupFilteredRecords;
}
while (berichtsAnfang < berichtsEnde)
{
StarteBerechnung(berichtsAnfang, berichtsEnde, empDetail);
empDetail.ArbeitstageImBerichtszeitraum = GetArbeitstageImBereich(berichtsAnfang, berichtsEnde, emp);
empDetail.ArbeitstageProWoche = ANZ_WOCHENTAGE;
workdaysTotal += empDetail.ArbeitstageImBerichtszeitraum;
weeklyTotalHours = 0;
if (c != null)
{
if (c.WeeklyTotalHours.HasValue)
{
weeklyTotalHours = c.WeeklyTotalHours.Value;
bu = c.WeeklyTotalHours.Value / this.maxWochenstunden;
}
if (c.WeeklyDays.HasValue && c.WeeklyDays.Value > 0)
{
empDetail.ArbeitstageProWoche = c.WeeklyDays.Value;
}
empDetail.WeeklyFLS = c.WeeklyFLS;
empDetail.HourlyRate = c.HourlyRate;
empDetail.EmploymentType = c.EmploymentType;
}
empDetail.SollProTag = (weeklyTotalHours / empDetail.ArbeitstageProWoche);
empDetail.SollProWoche = BerechneSollProWoche(c, empDetail);
if (empDetail.SollProTag == 0 && empDetail.SollProWoche > 0 && empDetail.ArbeitstageProWoche > 0)
{
empDetail.SollProTag = empDetail.SollProWoche / empDetail.ArbeitstageProWoche;
}
HandleServiceRecords(empDetail, groupFilteredRecords, c);
if (CheckIst)
{
var summary = BerechneStunden(empDetail, groupFilteredRecords, berichtsAnfang, berichtsEnde);
summaryTotal.IstAbrechenbar += summary.IstAbrechenbar;
summaryTotal.IstNichtAbrechenbar += summary.IstNichtAbrechenbar;
summaryTotal.RecordsImBerichtszeitraum.AddRange(summary.RecordsImBerichtszeitraum);
if (SollPauseBerechnen())
{
pause1 += BerechnePauseMinuten(summary.RecordsImBerichtszeitraum);
pause2 += BerechneAutoPausen(summary.RecordsImBerichtszeitraum);
}
}
decimal? stundenSollProMonat = null;
decimal? stundenSollImVertragsUndBerichtzeitraum = null;
if (empDetail.HasContract)
{
stundenSollImVertragsUndBerichtzeitraum = GetSollNachArbeitszeiten(empDetail.Employee, berichtsAnfang, berichtsEnde);
}
if (!stundenSollImVertragsUndBerichtzeitraum.HasValue)
{
stundenSollProMonat = BerechneSollProMonat(emp, berichtsAnfang, berichtsEnde);
stundenSollImVertragsUndBerichtzeitraum = stundenSollProMonat;
}
if (!stundenSollImVertragsUndBerichtzeitraum.HasValue)
{
if (!stundenSollImVertragsUndBerichtzeitraum.HasValue)
{
if (empDetail.ArbeitstageProWoche <= 5)
{
stundenSollImVertragsUndBerichtzeitraum =
empDetail.ArbeitstageImBerichtszeitraum * (weeklyTotalHours / 5);
}
else
{
stundenSollImVertragsUndBerichtzeitraum =
empDetail.ArbeitstageImBerichtszeitraum * (weeklyTotalHours / empDetail.ArbeitstageProWoche);
}
}
}
stundenSollGesamt += stundenSollImVertragsUndBerichtzeitraum ?? 0;
empDetail.StundenSollMax = stundenSollGesamt;
var tatSollStdImVertragsUndBerichtzeitraum = stundenSollImVertragsUndBerichtzeitraum ?? 0;
decimal? fehlZeiten = GetFehlzeiten(groupFilteredRecords, berichtsAnfang, berichtsEnde);
if (fehlZeiten.HasValue)
{
if (!fehlZeitenGesamt.HasValue)
fehlZeitenGesamt = 0;
fehlZeitenGesamt += fehlZeiten;
tatSollStdImVertragsUndBerichtzeitraum -= fehlZeiten.Value;
}
AktuellBearbeitetesEmployeeDetail = empDetail;
var ath = GetAbsenceTimeDaysWithWorkWeeks(emp, berichtsAnfang, berichtsEnde, empDetail.ArbeitstageProWoche);
empDetail.AbsenceTimeDays = ath;
if (ath.TageUrlaub.HasValue)
{
if (!tageUrlaubGesamt.HasValue)
tageUrlaubGesamt = 0;
tageUrlaubGesamt += ath.TageUrlaub;
}
if (ath.TageKrankheit.HasValue)
{
if (!tageKrankheitGesamt.HasValue)
tageKrankheitGesamt = 0;
tageKrankheitGesamt += ath.TageKrankheit;
}
if (ath.TageGesamt.HasValue)
{
if (!abwesenheitTageGesamt.HasValue)
abwesenheitTageGesamt = 0;
abwesenheitTageGesamt += ath.TageGesamt;
var minusStunden = BerechneStundenDurchAbwesenheiten(ath, berichtsAnfang, berichtsEnde, c, empDetail);
tatSollStdImVertragsUndBerichtzeitraum -= minusStunden;
if (tatSollStdImVertragsUndBerichtzeitraum < 0 && !StundenDurchAbwesenheitenDuerfenNegativSein())
{
tatSollStdImVertragsUndBerichtzeitraum = 0;
}
}
var ath2 = GetAbwesenheitenDurchServiceRecords(empDetail, c, groupFilteredRecords, berichtsAnfang, berichtsEnde);
if (ath2 != null)
{
var stunden = ath2.StundenKrankheit + ath2.StundenUrlaub + ath2.StundenSonstiges;
tatSollStdImVertragsUndBerichtzeitraum -= stunden;
if (tatSollStdImVertragsUndBerichtzeitraum < 0 && !StundenDurchAbwesenheitenDuerfenNegativSein())
{
tatSollStdImVertragsUndBerichtzeitraum = 0;
}
if (empDetail.SollProTag > 0)
{
if (!abwesenheitTageGesamt.HasValue)
abwesenheitTageGesamt = 0;
abwesenheitTageGesamt += stunden / empDetail.SollProTag;
if (ath2.StundenKrankheit > 0)
{
if (!tageKrankheitGesamt.HasValue)
{
tageKrankheitGesamt = 0;
}
tageKrankheitGesamt += ath2.StundenKrankheit / empDetail.SollProTag;
}
if (ath2.StundenUrlaub > 0)
{
if (!tageUrlaubGesamt.HasValue)
{
tageUrlaubGesamt = 0;
}
tageUrlaubGesamt += ath2.StundenUrlaub / empDetail.SollProTag;
}
}
}
tatSollStdGesamt += tatSollStdImVertragsUndBerichtzeitraum;
flsSollGesamt += BerechneFlsSoll(emp, c, berichtsAnfang, berichtsEnde, tatSollStdImVertragsUndBerichtzeitraum, stundenSollProMonat);
if (ath.StundenAlsIst > 0)
{
tatSollStdGesamt += ath.StundenAlsIst;
summaryTotal.IstNichtAbrechenbar += ath.StundenAlsIst * 60;
}
azDurchFeiertage += BerechneGesamtArbeitszeitDurchFeiertage(empDetail, berichtsAnfang, berichtsEnde);
berichtsAnfang = berichtsEnde;
berichtsEnde = monatsEnde;
c = GetNextValidContractForDate(berichtsAnfang, emp);
if (c != null)
{
if (c.EntryDate.HasValue && c.EntryDate >= berichtsAnfang)
berichtsAnfang = c.EntryDate.Value;
if (c.ContractEndDate.HasValue && c.ContractEndDate < monatsEnde)
{
berichtsEnde = c.ContractEndDate.Value.Date.AddDays(1);
}
}
}
if (AddRateFactorToIst() != 1)
{
summaryTotal.IstAbrechenbar *= AddRateFactorToIst();
}
summaryTotal.IstAbrechenbar /= 60m;
summaryTotal.IstNichtAbrechenbar /= 60m;
empDetail.WorkDaysThisMonth = workdaysTotal;
//decimal stundenSollMax = arbeitstage * (maxWochenstunden / xxx) * bu;
empDetail.Fehlzeiten = fehlZeitenGesamt;
empDetail.TageUrlaub = tageUrlaubGesamt;
empDetail.TageKrankheit = tageKrankheitGesamt;
empDetail.UrlaubUndKrankheit = abwesenheitTageGesamt;
empDetail.StundenSollOhneUrlaubKrankheit = tatSollStdGesamt;
empDetail.FlsSoll = flsSollGesamt;
#endregion
empDetail.MittelbarIst = summaryTotal.IstNichtAbrechenbar;
empDetail.Bu = bu;
empDetail.FlsIst = summaryTotal.IstAbrechenbar;
empDetail.FlsDiff = summaryTotal.IstAbrechenbar - empDetail.FlsSoll;
empDetail.StundenMittelbarIst = summaryTotal.IstNichtAbrechenbar;
empDetail.StundenGesamtIst = summaryTotal.IstAbrechenbar + summaryTotal.IstNichtAbrechenbar; // Stunden auf Gesamt-IST drauf
// Hier muss ein Faktor auf die Gesamt- und Überstunden drauf. (Aus Vertrag Wochenstunden / Wochen-FLS)
var faktorStunden = GetFaktorStunden(c, empDetail.FlsIst, ro.ReportStartDate);
empDetail.StundenGesamtIst += faktorStunden;
#region Standardkram
empDetail.StundenGesamtIst -= pause1 / 60;
empDetail.StundenGesamtIst -= pause2 / 60;
empDetail.StundenGesamtIst += azDurchFeiertage;
if (empDetail.FlsSoll != 0)
empDetail.RelationIstSoll = (empDetail.FlsIst / empDetail.FlsSoll) * 100m;
decimal? ueberstunden = empDetail.StundenGesamtIst - empDetail.StundenSollOhneUrlaubKrankheit;
decimal? ueberstundenVormonat;
decimal alteExtraUeberstunden = 0;
BerechneUeberstundenBis(empDetail, groupFilteredRecords, ro.ReportStartDate, out ueberstundenVormonat,
out alteExtraUeberstunden);
var alleDiensteintraege = DAOFactory.GenericDAO.GetAllActive<DienstEintrag>().Where(d => d.EmployeeOid == empDetail.Employee.Oid).ToList();
var alleDienstvertretungen = DAOFactory.GenericDAO.GetAllActive<Dienstvertretung>().Where(d => d.EmployeeOid == empDetail.Employee.Oid).ToList();
decimal? ueberstundenVormonatFuerDienstplanung;
decimal? alteExtraUeberstundenDienstplanung;
empDetail.DienstplanIst += BerechneDienstplanIst(empDetail, alleDiensteintraege, alleDienstvertretungen, ro.ReportStartDate,
out ueberstundenVormonatFuerDienstplanung, out alteExtraUeberstundenDienstplanung); // ABCDEF
var dienstplanIstAlsStunden = empDetail.DienstplanIst / 60;
decimal extraStunden = 0;
BerechneExtraUeberstunden(emp, monatsAnfang, monatsEnde, out extraStunden); // OverTimes
if (ShouldCreateDayDetails())
{
empDetail.Days = CreateDayDetails(monatsAnfang, monatsEnde, empDetail, summaryTotal.RecordsImBerichtszeitraum);
var ah = GetAdditionalHours(empDetail.Days, monatsAnfang, monatsEnde, empDetail, summaryTotal.RecordsImBerichtszeitraum);
ueberstunden += ah;
empDetail.StundenGesamtIst += ah;
}
if (empDetail.StundenGesamtIst != 0)
empDetail.RelationFlsZuMittelbar = (summaryTotal.IstAbrechenbar / empDetail.StundenGesamtIst) * 100;
empDetail.Ueberstunden = ueberstunden;
empDetail.UeberstundenVormonat = ueberstundenVormonat;
if (!empDetail.UeberstundenGesamt.HasValue)
empDetail.UeberstundenGesamt = ((ueberstundenVormonat ?? 0) + (ueberstunden ?? 0)) + extraStunden;
else
empDetail.UeberstundenGesamt += ((ueberstundenVormonat ?? 0) + (ueberstunden ?? 0)) + extraStunden;
empDetail.UeberstundenAusbezahlt = extraStunden;
//Urlaubskonto (todo)
empDetail.UrlaubGesamtImAktuellenJahr =
GetAbsenceTimeDaysWithWorkWeeks(emp, new DateTime(monatsAnfang.Year, 1, 1), monatsEnde, empDetail.ArbeitstageProWoche).TageUrlaub;
CalculateEmployeeSalary(empDetail, berichtsAnfang, berichtsEnde);
}
#endregion
ro.EmployeeDetailList = FilterEmployeeList(ro.EmployeeDetailList);
}
public override MitarbeiterstundenkontoRO.EmployeeDetail BerechneUeberstundenBis(MitarbeiterstundenkontoRO.EmployeeDetail edOrig, IList<ServiceRecord> records, DateTime monat, out decimal? ueberstunden, out decimal alteExtraUeberstunden)
{
#region Standardkram
MitarbeiterstundenkontoRO.EmployeeDetail edTotal = new MitarbeiterstundenkontoRO.EmployeeDetail();
ueberstunden = null;
alteExtraUeberstunden = 0;
var emp = edOrig.Employee;
Contract c = emp.FirstContract;
if (c != null)
{
Dictionary<String, IList<ServiceRecord>> srDict = CreateServiceRecordDictByDate(records);
DateTime start = c.EntryDate.HasValue ? c.EntryDate.Value : new DateTime(2011, 1, 1);
while (c != null && start < monat)
{
DateTime contractEnd = c.ContractEndDate.HasValue ? c.ContractEndDate.Value : DateTime.MaxValue;
if (contractEnd < DateTime.MaxValue)
{
contractEnd = contractEnd.Date.AddDays(1).AddTicks(-1);
}
decimal bu = 0;
decimal weeklyTotalHours = this.maxWochenstunden;
int anzWochentage = ANZ_WOCHENTAGE;
if (c.WeeklyTotalHours.HasValue)
{
weeklyTotalHours = c.WeeklyTotalHours.Value;
bu = c.WeeklyTotalHours.Value / maxWochenstunden;
}
//while (start < monat && start <= contractEnd)
while (start < monat && start < contractEnd)
{
if (start >= new DateTime(2024, 8, 1))
{
int test = 0;
}
decimal flsIst = 0;
decimal mittelbarIst = 0;
decimal minutenMonat = 0;
DateTime ende = new DateTime(start.Year, start.Month, 1).AddMonths(1);
if (contractEnd < DateTime.MaxValue && contractEnd.Date.AddDays(1) < ende)
ende = contractEnd.Date.AddDays(1);
IList<ServiceRecord> recordsThisMonth = new List<ServiceRecord>();
String key = String.Format("{0:yyyyMM}", start);
if (srDict.ContainsKey(key))
{
foreach (var item in srDict[key])
{
if (item.Start.HasValue && item.Start >= start && item.Start < ende)
{
if (AddServiceRecordToDuration(item))
{
decimal duration = GetDuration(item, edOrig);
minutenMonat += duration;
if (item.ServiceDescription != null &&
item.ServiceDescription.ServiceCategory != null &&
item.ServiceDescription.ServiceCategory.IsBillable)
flsIst += duration;
else
mittelbarIst += duration;
}
recordsThisMonth.Add(item);
}
}
}
decimal arbeitstage = GetArbeitstageImBereich(start, ende, emp);
var arbeitstageProWoche = anzWochentage;
if (c != null && c.WeeklyDays.HasValue && c.WeeklyDays.Value > 0)
{
arbeitstageProWoche = c.WeeklyDays.Value;
}
//if (anzWochentage != 5)
//{
// arbeitstage *= anzWochentage / 5m;
//}
var soll = GetSollNachArbeitszeiten(emp, start, ende);
if (!soll.HasValue)
{
var stundenSollProMonat = BerechneSollProMonat(emp, start, ende);
soll = stundenSollProMonat;
}
if (!soll.HasValue)
{
if (!soll.HasValue)
{
decimal maxSollMonat = arbeitstage * (maxWochenstunden / arbeitstageProWoche);
if (arbeitstageProWoche <= 5)
{
maxSollMonat = arbeitstage * (maxWochenstunden / 5);
}
soll = maxSollMonat * bu;
}
}
decimal sollMitarbeiter = soll ?? 0;
MitarbeiterstundenkontoRO.EmployeeDetail ed = new MitarbeiterstundenkontoRO.EmployeeDetail();
ed.SollProTag = weeklyTotalHours / arbeitstageProWoche;
ed.ArbeitstageProWoche = arbeitstageProWoche;
ed.ArbeitstageImBerichtszeitraum = arbeitstage;
ed.SollProWoche = BerechneSollProWoche(c, ed);
ed.Employee = emp;
AktuellBearbeitetesEmployeeDetail = ed;
var ath = GetAbsenceTimeDaysWithWorkWeeks(emp, start, ende, arbeitstageProWoche);
ed.AbsenceTimeDays = ath;
decimal? fehlzeit = GetFehlzeiten(records, start, ende);
if (fehlzeit.HasValue)
{
sollMitarbeiter -= fehlzeit.Value;
}
ed.StundenSollMax = sollMitarbeiter;
if (ath.TageGesamt.HasValue)
{
var minusStunden = BerechneStundenDurchAbwesenheiten(ath, start, ende, c, ed);
sollMitarbeiter -= minusStunden;
if (sollMitarbeiter < 0 && !StundenDurchAbwesenheitenDuerfenNegativSein())
{
sollMitarbeiter = 0;
}
}
var ath2 = GetAbwesenheitenDurchServiceRecords(ed, c, records, start, ende);
if (ath2 != null)
{
var stunden = ath2.StundenKrankheit + ath2.StundenUrlaub + ath2.StundenSonstiges;
sollMitarbeiter -= stunden;
if (sollMitarbeiter < 0 && !StundenDurchAbwesenheitenDuerfenNegativSein())
{
sollMitarbeiter = 0;
}
}
#endregion
var azDurchFeiertage = BerechneGesamtArbeitszeitDurchFeiertage(ed, start, ende);
sollMitarbeiter -= azDurchFeiertage;
decimal stundenMonat = minutenMonat / 60m;
stundenMonat = ((flsIst * AddRateFactorToIst()) + mittelbarIst) / 60m;
var faktorStunden = GetFaktorStunden(c, flsIst / 60, monat);
if (!ueberstunden.HasValue)
ueberstunden = 0;
ueberstunden += stundenMonat + faktorStunden - sollMitarbeiter;
#region Standardkram
if (SollPauseBerechnen())
{
var pause1 = BerechnePauseMinuten(recordsThisMonth);
var pause2 = BerechneAutoPausen(recordsThisMonth);
ueberstunden -= pause1 / 60;
ueberstunden -= pause2 / 60;
}
decimal extraUeberstunden = 0;
BerechneExtraUeberstunden(emp, start, ende, out extraUeberstunden);
ueberstunden += extraUeberstunden;
alteExtraUeberstunden += extraUeberstunden;
if (ShouldCreateDayDetails())
{
var days = CreateDayDetails(start, ende, ed, records);
var ah = GetAdditionalHours(days, start, ende, ed, records);
ueberstunden += ah;
}
ed.StundenSollOhneUrlaubKrankheit = sollMitarbeiter;
ed.FlsIst = flsIst / 60;
ed.MittelbarIst = mittelbarIst / 60;
ed.StundenGesamtIst = stundenMonat;
ed.Ueberstunden = ueberstunden;
ed.UeberstundenVormonat = edTotal.Ueberstunden;
ueberstunden = BerechneUeberstunden(ed, ueberstunden, c, start, ende);
edTotal.StundenSollOhneUrlaubKrankheit += sollMitarbeiter;
edTotal.StundenSollMax += soll ?? 0;
edTotal.FlsIst += flsIst / 60;
edTotal.MittelbarIst += mittelbarIst / 60;
edTotal.StundenGesamtIst += stundenMonat;
edTotal.Ueberstunden = ueberstunden;
start = ende;
}
//if (start > contractEnd)
if (start >= contractEnd)
{
var ctemp = GetNextValidContractForDate(start, emp);
if (ctemp != null && ctemp.Oid != c.Oid)
{
c = ctemp;
}
else
{
c = null;
}
if (c != null && c.EntryDate.HasValue && c.EntryDate >= start)
start = c.EntryDate.Value;
else
{
start = start.AddMonths(1);
c = GetNextValidContractForDate(start, emp);
if (c != null && c.EntryDate.HasValue && c.EntryDate >= start)
start = c.EntryDate.Value;
}
}
}
}
#endregion
return edTotal;
}
private decimal GetFaktorStunden(Contract c, decimal geleisteteStunden, DateTime monat)
{
// Erst ab 2024 soll ein Faktor auf die Gesamtstunden draufgerechnet werden, der den Wochenstunden / Wochen-FLS aus dem Vertrag entspricht
if (monat.Year < 2024)
return 0;
decimal faktor = 1.25m;
if (c.WeeklyFLS.HasValue && c.WeeklyFLS.Value != 0 && c.WeeklyTotalHours.HasValue && c.WeeklyTotalHours.Value != 0)
faktor = c.WeeklyTotalHours.Value / c.WeeklyFLS.Value;
var faktorStunden = geleisteteStunden * faktor - geleisteteStunden;
return faktorStunden;
}
public override bool ShouldCreateDayDetails()
{
return true;
}

View File

@@ -21,6 +21,24 @@ namespace LebenshilfeStade
var msb = new CustomMitarbeiterstundenkontoBerechnungMonate();
msb.CreateReport(pRO);
// foreach (var info in pRO.EmployeeInfoList)
// {
// foreach (var item in info.EmployeeDetails)
// {
// var datumFuerVertrag = item.Monat;
// var contract = item.EmployeeDetail.Employee.GetValidContractForDate(datumFuerVertrag);
// if (contract != null)
// {
// decimal faktor = 1.25m;
// if (contract.WeeklyFLS.HasValue && contract.WeeklyFLS.Value != 0 && contract.WeeklyTotalHours.HasValue && contract.WeeklyTotalHours.Value != 0)
// faktor = contract.WeeklyTotalHours.Value / contract.WeeklyFLS.Value;
// item.EmployeeDetail.StundenGesamtIst *= faktor;
// }
// }
//}
this.bindingSource1.DataSource = pRO;
}

View File

@@ -11,36 +11,6 @@ namespace Mittelpunkt
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
{
if (queryOid == 11)
{
var ro = base.CreateQueryRO(queryOid, queryReportId);
if (DateTime.TryParse(ro.Rows[0].Field1.ToString(), out var datum))
{
return CreateBewertungsstatistikReport(datum, new DateTime(datum.Year, 12, 31), null, false, null, null);
}
}
return base.CreateQueryReport(queryOid, queryReportId);
}
public override XtraReport CreateBewertungsstatistikReport(DateTime? start, DateTime? end, SupportConceptDC supportConcept, bool inclZeiterfassung, List<ValueListEntryDC> ziele, List<RatingDC> scZiele)
{
// Ist der Hilfeplan als Parameter gesetzt, Bericht für einen HP erstellen
if (supportConcept != null)
return base.CreateBewertungsstatistikReport(start, end, supportConcept, inclZeiterfassung, ziele, scZiele);
// Ist kein Hilfeplan gesetzt, wird die Tabelle für die Auswertung aller Bewertungen in einem Zeitraum gebaut
else
{
var report = new Bewertungsstatistik();
report.SetReportDataSource(BewertungsstatistikRO.Create(start, end, supportConcept, inclZeiterfassung, ziele, scZiele));
return report as XtraReport;
}
}
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false);

View File

@@ -53,8 +53,10 @@ namespace Mittelpunkt
{
var d1 = sr.Start.Value;
var duration = sr.GroupRoundedDuration != null ? Convert.ToDouble(sr.GroupRoundedDuration.Value) : sr.DurationMinutes;
var saturday = d1.GetNextDayOfWeek(DayOfWeek.Saturday);
var unroundedEnd = d1.AddMinutes(sr.DurationMinutes);
var unroundedEnd = d1.AddMinutes(duration);
var saturdayStart = new DateTime(saturday.Year, saturday.Month, saturday.Day, 13, 0, 0);
var saturdayEnd = new DateTime(saturday.Year, saturday.Month, saturday.Day, 21, 0, 0);

View File

@@ -35,8 +35,10 @@ namespace Mittelpunkt
{
var d1 = sr.Start.Value;
var duration = sr.GroupRoundedDuration != null ? Convert.ToDouble(sr.GroupRoundedDuration.Value) : sr.DurationMinutes;
var saturday = d1.GetNextDayOfWeek(DayOfWeek.Saturday);
var unroundedEnd = d1.AddMinutes(sr.DurationMinutes);
var unroundedEnd = d1.AddMinutes(duration);
var saturdayStart = new DateTime(saturday.Year, saturday.Month, saturday.Day, 13, 0, 0);
var saturdayEnd = new DateTime(saturday.Year, saturday.Month, saturday.Day, 21, 0, 0);

View File

@@ -37,8 +37,11 @@ namespace Mittelpunkt
{
var d1 = sr.Start.Value;
var duration = sr.GroupRoundedDuration != null ? Convert.ToDouble(sr.GroupRoundedDuration.Value) : sr.DurationMinutes;
var saturday = d1.GetNextDayOfWeek(DayOfWeek.Saturday);
var unroundedEnd = d1.AddMinutes(sr.DurationMinutes);
var unroundedEnd = d1.AddMinutes(duration);
var saturdayStart = new DateTime(saturday.Year, saturday.Month, saturday.Day, 13, 0, 0);
var saturdayEnd = new DateTime(saturday.Year, saturday.Month, saturday.Day, 21, 0, 0);

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.DataContracts;
namespace VkmHamm.Validation
{
public class CustomServiceRecordValidator : ServiceRecordValidator
{
public override bool CheckZukunft()
{
return false;
}
public override List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics,
int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
{
var list = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
if (newServiceRecord.End.HasValue && newServiceRecord.End.Value > DateTime.Now.AddMinutes(10))
{
list.Add(new ServiceRecordValidationResultDC
{
ResultType = ServiceRecordValidationResult.Custom,
Message = "Das Ende des dokumentierten Termins darf nicht mehr als 10 Minuten in der Zukunft liegen."
});
}
return list;
}
}
}

View File

@@ -163,6 +163,7 @@
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</Compile>
<Compile Include="Translation\TranslationDictionary.cs" />
<Compile Include="Validation\ServiceRecordValidator.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">

View File

@@ -130,11 +130,14 @@ namespace ZukunftLeben.Invoicing
{
IList<InvoiceItem> items = new List<InvoiceItem>();
decimal hausbesuchspauschale = 8.53m;
hausbesuchspauschale = GetHausbesuchspauschale(scap.CostBearer2SupportConcept, invoicePeriod.StartDate);
if (scap != null && invoicePeriod != null)
{
hausbesuchspauschale = GetHausbesuchspauschale(scap.CostBearer2SupportConcept, invoicePeriod.StartDate);
}
int countHausbesuch = 0;
foreach (var sr in serviceRecordsInPeriod)
{
if (sr.ServiceDescription.Name.ToLower().Contains("aufsuchend"))
if (sr.ServiceDescription != null && sr.ServiceDescription.Name != null && sr.ServiceDescription.Name.ToLower().Contains("aufsuchend"))
{
countHausbesuch++;
}
@@ -149,8 +152,11 @@ namespace ZukunftLeben.Invoicing
invoiceItem.AmountPerUnit = hausbesuchspauschale;
invoiceItem.UnitCount = anzahlHausbesuche;
invoiceItem.AmountTotal = anzahlHausbesuche * hausbesuchspauschale;
invoiceItem.ItemPeriodStart = invoicePeriod.StartDate;
invoiceItem.ItemPeriodEnd = invoicePeriod.EndDate;
if (invoicePeriod != null)
{
invoiceItem.ItemPeriodStart = invoicePeriod.StartDate;
invoiceItem.ItemPeriodEnd = invoicePeriod.EndDate;
}
invoiceItem.RateFactor = null;
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
invoiceItem.ItemDescription = "Hausbesuchspauschale";

View File

@@ -148,7 +148,7 @@ namespace BeWo.Service.Plugins
//t = "9975231461"; // Selwo
//t = "8181286349"; // BeWo am Rhein
//t = "4595275645"; // Eigenständig
//t = "7912635399"; // Prof. Dr. Eggers Stiftung
t = "7912635399"; // Prof. Dr. Eggers Stiftung
//t = "3549726254"; // Socia
//t = "1992495802"; // Monvita
//t = "7381352241"; // Ressource e.V.
@@ -167,7 +167,7 @@ namespace BeWo.Service.Plugins
//t = "6548202677"; // VKM Aachen SBD
//t = "7803602698"; // Taubblindendienst
//t = "5518600303"; // Wetterleuchten e.V.
t = "4096649015"; // AWO Dortmund
//t = "4096649015"; // AWO Dortmund
//t = "3614251071"; // Pusteblume
//t = "7755740484"; // Sawo
//t = "8275654834"; // Twg Jonathan
@@ -303,7 +303,7 @@ namespace BeWo.Service.Plugins
//t = "8251343124"; // Rat Plus Tat
//t = "6819347851"; // Awo Kreisverband Plön
//t = "2385915144"; // AKGG GmbH
t = "8002913382"; // AKGG GmbH (MID)
//t = "8002913382"; // AKGG GmbH (MID)
//t = "5155880294"; // BHV Bergische Hauspflege
//t = "8366649557"; // Münchner Aids-Hilfe e.V.
//t = "2976949196"; // WHB Refrath gGmbH
@@ -391,7 +391,7 @@ namespace BeWo.Service.Plugins
//t = "8735029937"; // Caritas Ostvest
//t = "7653029063"; // SkF Leverkusen JuHi
//t = "1453324901"; // Akkurat
//t = "5000000000";
//t = "5000000000"; // Test-DB
//t = "5564670353"; // Mittelpunkt GbR
//t = "3788859817"; // Zukunft Leben (Stephan Hekermann)
//t = "2663321234"; // Aachener Laienhelfer Initiative e.V.
@@ -404,6 +404,7 @@ namespace BeWo.Service.Plugins
//t = "8365918329"; // Lebenshilfe Stade e.V. Schulbegleitender Dienst
//t = "6203102637"; // BeWo Neuss-Lauth u. Lauth GbR
//t = "7060431533"; // Arche Tecklenburg e.V.
//t = "1159580198"; // Wendepunkt Velbert gGmbH
return t;
#else

View File

@@ -26,6 +26,8 @@ namespace BeWo.Service.Vorlagen
var list = new List<VorlagentabelleDC>();
list.Add(new VorlagentabelleDC() { VorlagentabelleOid = 1000, VorlagentabelleObjectTid = (int)TableID.Customer, Tabellenname = "Klienten", ImageName = "UserHomeBoyDisabled" });
list.Add(new VorlagentabelleDC() { VorlagentabelleOid = 1001, VorlagentabelleObjectTid = (int)TableID.SupportConcept, Tabellenname = "Hilfepläne", ImageName = "IDBadgeDisabled" });
return list;
}

View File

@@ -27,8 +27,9 @@
public static string ZeigeNurMeineTermine => "ZeigeNurMeineTermine";
public static string LastSelectedServiceRecordTimeIntervalDays => "LastSelectedServiceRecordTimeIntervalDays";
public static string LastSelectedServiceRecordMonth => "LastSelectedServiceRecordMonth";
public static string LastKassenSortOrder => "LastKassenSortOrder";
public static string LastBewilligungSortOrder => "LastBewilligungSortOrder";
public static string ServiceRecordAllowChangeHours => "ServiceRecordAllowChangeHours";

View File

@@ -19,6 +19,8 @@ namespace BS.Shared.DataContracts
[DataMember]
public BeWoFolderDC BeWoFolderDC { get; set; }
[DataMember]
public DokumentvorlageDC Dokumentvorlage { get; set; }
[DataMember]
public TableID Table { get; set; }
[DataMember]
public long? ObjectOid { get; set; }