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

Konflikt in BeWoAllReports.sln
This commit is contained in:
2026-03-31 15:02:40 +02:00
42 changed files with 3031 additions and 360 deletions

View File

@@ -128,7 +128,7 @@
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentColor">#FFD7DADB</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentColor2">#FF92A9B3</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentTextPrimary">#FF111111</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentTextSecondary">#FF777777</Color>
<Color x:Key="ModuleAiControlZeiterfassungNavigationContentTextSecondary">#FF555555</Color>
<Color x:Key="ModuleAiControlSupportConceptNavigationHeaderColor">#FF5C1919</Color>
<Color x:Key="ModuleAiControlSupportConceptNavigationContentColor">#FF993B3B</Color>

View File

@@ -31,4 +31,19 @@
</Trigger>
</Style.Triggers>
</Style>
<Style
x:Key="PopupBlackLabel"
BasedOn="{StaticResource BaseLabel}"
TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource TextForegroundDarkPrimary}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontWeight" Value="Medium" />
<Setter Property="FontSize" Value="12" />
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource TextForegroundDarkSecondary}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View File

@@ -108,13 +108,13 @@
<Border
Grid.Row="0"
Grid.Column="0"
Background="{DynamicResource NavigationHeaderBrush}"
CornerRadius="1,1,1,1">
Height="6"
Background="{DynamicResource NavigationHeaderBrush}">
<Border
x:Name="Header"
Grid.Row="0"
Grid.Column="0"
Margin="8"
Margin="0"
Padding="0"
Background="{x:Null}">
<ContentPresenter
@@ -133,10 +133,9 @@
<Border
Grid.Row="1"
Grid.Column="0"
Margin="0,2,0,0"
Margin="0,0,0,0"
Padding="0,0,0,0"
Background="{DynamicResource NavigationContentBrush}"
CornerRadius="1,1,1,1">
Background="{DynamicResource NavigationContentBrush}">
<ContentPresenter
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"

View File

@@ -29,6 +29,9 @@
<SolidColorBrush x:Key="TextForegroundPrimary" Color="{StaticResource LightTextPrimary}" />
<SolidColorBrush x:Key="TextForegroundSecondary" Color="{StaticResource LightTextSecondary}" />
<SolidColorBrush x:Key="TextForegroundDarkPrimary" Color="{StaticResource DarkTextPrimary}" />
<SolidColorBrush x:Key="TextForegroundDarkSecondary" Color="{StaticResource DarkTextSecondary}" />
<Style x:Key="ModuleAiControlDefaultStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="{StaticResource ModuleAiControlDefaultNavigationHeaderColor}" />
@@ -152,10 +155,10 @@
</Grid.ColumnDefinitions>
<Border
Width="auto"
Margin="0,4,0,0"
Padding="4"
Margin="0,0,3,0"
Padding="4,4,5,5"
VerticalAlignment="Top"
Background="#09000000"
Background="#DEFFFFFF"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="10, 10, 10, 10">
@@ -167,7 +170,7 @@
<Border
Grid.Column="1"
Padding="8,4,8,4"
Background="#20000000"
Background="#DEFFFFFF"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="0, 10, 10, 10">
@@ -179,28 +182,9 @@
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<TextBlock
Margin="0"
Padding="0"
FontSize="14"
FontWeight="SemiBold"
Foreground="{DynamicResource TextForegroundPrimary}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding ModelName}" />
<TextBlock
Grid.Column="1"
Margin="8,0,0,0"
Padding="0"
VerticalAlignment="Bottom"
FontSize="12"
FontWeight="Medium"
Foreground="{DynamicResource TextForegroundPrimary}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Created, StringFormat={}{0:dd.MM.yyyy HH:mm:ss}}" />
<TextBlock
Grid.Row="1"
Grid.Row="0"
Grid.ColumnSpan="2"
Margin="0,4,0,4"
Padding="0"
@@ -209,7 +193,36 @@
FontWeight="Medium"
Foreground="{DynamicResource TextForegroundSecondary}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}" />
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}">
<TextBlock.ToolTip>
<Grid Margin="4,0,0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<TextBlock
Margin="0"
Padding="0"
FontSize="12"
FontWeight="Normal"
Foreground="{DynamicResource TextForegroundPrimary}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding ModelName, StringFormat=Modell: {0}}" />
<TextBlock
Grid.Row="1"
Padding="0"
VerticalAlignment="Bottom"
FontSize="12"
FontWeight="Normal"
Foreground="{DynamicResource TextForegroundPrimary}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Created, StringFormat=Datum/Uhrzeit: {0:dd.MM.yyyy HH:mm:ss}}" />
</Grid>
</TextBlock.ToolTip>
</TextBlock>
<!--<TextBlock
Grid.Row="1"
Grid.ColumnSpan="2"
@@ -221,7 +234,7 @@
Style="{StaticResource TextBlockStyle}"
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}" />-->
<TextBox
Grid.Row="2"
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="0,4,0,0"
Padding="-3"
@@ -238,12 +251,27 @@
Width="auto"
Margin="30,0,30,0"
HorizontalAlignment="Center"
Background="#33000000"
Background="#DEFFFFFF"
BorderBrush="Black"
BorderThickness="0"
BorderThickness="1"
CornerRadius="0">
<Grid>
<TextBox Padding="8" Style="{StaticResource MessageTextBoxStyle}" />
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<TextBox
Padding="8"
HorizontalAlignment="Center"
Style="{StaticResource MessageTextBoxStyle}">
SystemPrompt
</TextBox>
<Separator Grid.Row="1" />
<TextBox
Grid.Row="2"
Padding="8"
Style="{StaticResource MessageTextBoxStyle}" />
</Grid>
</Border>
</DataTemplate>
@@ -254,7 +282,7 @@
Width="auto"
Margin="30,0,0,0"
HorizontalAlignment="Right"
Background="#15000000"
Background="#DEFFFFFF"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="15, 15, 15, 15"

View File

@@ -25,8 +25,10 @@
<Setter Property="SmallChange" Value="0.01" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
</Style>
<Style BasedOn="{StaticResource PopupWhiteLabel}" TargetType="{x:Type Label}" />
<Style BasedOn="{StaticResource PopupBlackLabel}" TargetType="{x:Type Label}" />
<Style BasedOn="{StaticResource BaseRadioButton}" TargetType="{x:Type RadioButton}" >
<Setter Property="Foreground" Value="Black"/>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<StackPanel>
@@ -34,7 +36,7 @@
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFFFFF"
Foreground="Black"
Text="KI Module Einstellungen" />
<Path
Margin="0,3,0,0"

View File

@@ -21,6 +21,7 @@
x:Name="root"
Width="auto"
Height="auto"
MinWidth="600"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:DataContext="{d:DesignInstance Type=vmv:AiConversationChatViewModel,
@@ -40,7 +41,7 @@
Width="auto"
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
Background="#17000000"
Background="#CCF4F4F4"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="10, 10, 10, 10">
@@ -103,7 +104,7 @@
</localView:BeWoView.Resources>
<Grid>
<GroupBox x:Name="rootgroupbox" Style="{StaticResource ModuleAiControlSupportConceptStyle}">
<GroupBox x:Name="rootgroupbox" Style="{StaticResource ModuleAiControlZeiterfassungStyle}">
<GroupBox.Header>
<StackPanel
Grid.Row="0"
@@ -177,7 +178,7 @@
</dxwui:HamburgerMenu.Content>
</dxwui:HamburgerMenu>-->
<Grid Background="#12000000">
<Grid>
<ListView
x:Name="listview_conversations"
Padding="4"
@@ -192,31 +193,29 @@
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="2" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Grid>
<Grid Margin="0,1,0,1">
<Border
x:Name="ItemBorder"
MinHeight="20"
Background="#FF000000"
CornerRadius="5">
x:Name="ItemBorder"
MinHeight="20"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
<GradientStop Offset="0" Color="#00000000" />
<GradientStop Offset="1" Color="#00000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border
Name="ItemContent"
Padding="2"
SnapsToDevicePixels="true">
<ContentPresenter />
Name="ItemContent"
Padding="1"
SnapsToDevicePixels="true">
<ContentPresenter />
</Border>
</Grid>
<ControlTemplate.Triggers>
@@ -373,7 +372,10 @@
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock FontSize="12" FontWeight="Medium">
<TextBlock
FontSize="12"
FontWeight="Medium"
Foreground="Black">
Bitte formulieren Sie eine Frage, um einen neuen Chat zu beginnen.<LineBreak />
Weitere Details erfahren Sie in der Hilfe.<Hyperlink NavigateUri="https://help.bewoplaner.de" RequestNavigate="Hyperlink_RequestNavigate">
(i)
@@ -479,7 +481,10 @@
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Collapsed" />
<TextBlock Margin="3" FontSize="10">
<TextBlock
Margin="0"
FontSize="10"
Foreground="#FFFDFDFD">
Dieses System verwendet KI.<LineBreak />
KI-generierte Inhalte sind zu prüfen.</TextBlock>
</StackPanel>
@@ -598,7 +603,7 @@
<Popup
x:Name="popup_message_save"
IsOpen="{Binding IsSavePromptOpen}"
Placement="Center"
Placement="Mouse"
PlacementTarget="{Binding ElementName=root}"
StaysOpen="False">
<Border BorderBrush="Black" BorderThickness="1">

View File

@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{FEB033
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReportImp", "ReportImp", "{D8A691C5-146D-4613-86CC-438F02FE9106}"
ProjectSection(SolutionItems) = preProject
ReportImp\CaritasVerbandDuerenJuelichEvBeWo\CaritasVerbandDuerenJuelichEvBeWo.csproj = ReportImp\CaritasVerbandDuerenJuelichEvBeWo\CaritasVerbandDuerenJuelichEvBeWo.csproj
ReportImp\LebenszentrumKönigsborn\LebenszentrumKoenigsborn.csproj = ReportImp\LebenszentrumKönigsborn\LebenszentrumKoenigsborn.csproj
EndProjectSection
EndProject
@@ -981,7 +982,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UteHengstermannAbwAnker", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KcmGmbHSozio", "ReportImp\KcmGmbHSozio\KcmGmbHSozio.csproj", "{15F9EE65-0B7F-49B6-91A7-5F606960AF4A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamanthaRiegerIntegrationspraxis", "ReportImp\SamanthaRiegerIntegrationspraxis\SamanthaRiegerIntegrationspraxis.csproj", "{BD841D90-CD90-44B6-8B3C-5C7D05225842}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CaritasVerbandDuerenJuelichEvBeWo", "ReportImp\CaritasVerbandDuerenJuelichEvBeWo\CaritasVerbandDuerenJuelichEvBeWo.csproj", "{23696062-2534-49E5-B88D-E182F2399923}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -12034,30 +12035,30 @@ Global
{15F9EE65-0B7F-49B6-91A7-5F606960AF4A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{15F9EE65-0B7F-49B6-91A7-5F606960AF4A}.Release|x86.ActiveCfg = Release|Any CPU
{15F9EE65-0B7F-49B6-91A7-5F606960AF4A}.Release|x86.Build.0 = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|.NET.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|.NET.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Debug|x86.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|.NET.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|x86.ActiveCfg = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.DebugRemote|x86.Build.0 = Debug|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|.NET.ActiveCfg = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|.NET.Build.0 = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|Any CPU.Build.0 = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|x86.ActiveCfg = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|x86.Build.0 = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|.NET.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|.NET.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|x86.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Debug|x86.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|.NET.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|x86.ActiveCfg = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.DebugRemote|x86.Build.0 = Debug|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|.NET.ActiveCfg = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|.NET.Build.0 = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|Any CPU.Build.0 = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|x86.ActiveCfg = Release|Any CPU
{23696062-2534-49E5-B88D-E182F2399923}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -12543,7 +12544,7 @@ Global
{A2F237DC-997D-4B64-BA17-4F5157E4976A} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{CCDA80D2-C56B-4BCA-8FE9-21907333A098} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{15F9EE65-0B7F-49B6-91A7-5F606960AF4A} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{BD841D90-CD90-44B6-8B3C-5C7D05225842} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{23696062-2534-49E5-B88D-E182F2399923} = {D8A691C5-146D-4613-86CC-438F02FE9106}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9}

View File

@@ -199,9 +199,11 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="StatusService.svc" />
<Content Include="ApiStreamService.svc" />
<Content Include="ApiService.svc" />
<Content Include="AdminService.svc" />
<Content Include="status.htm" />
<Content Include="Config\ai\systemPrompts\customFunctionPreSystemPrompt.txt" />
<Content Include="Config\ai\systemPrompts\customPreSystemPrompt.txt" />
<Content Include="Config\allowed_ips_admin_api.txt" />

1
Host/StatusService.svc Normal file
View File

@@ -0,0 +1 @@
<%@ ServiceHost Language="C#" Debug="true" Service="BeWo.Service.ServiceImplementations.Enhanced.StatusServiceImp" %>

View File

@@ -307,6 +307,9 @@
<service behaviorConfiguration="returnFaults" name="BeWo.Service.ServiceImplementations.Enhanced.AiEnhancedServiceImp">
<endpoint behaviorConfiguration="SecurityAndSessionAndWCFErrorBehavior" binding="basicHttpBinding" bindingConfiguration="TransportSecurity" name="AiEnhancedServiceEndpoint" contract="BeWo.Service.ServiceContracts.Enhanced.IAiEnhancedService" />
</service>
<service behaviorConfiguration="returnFaults" name="BeWo.Service.ServiceImplementations.Enhanced.StatusServiceImp">
<endpoint behaviorConfiguration="webHttpBehaviorConfig" binding="webHttpBinding" bindingConfiguration="webHttpStreamBindingConfig" name="StatusServiceEndpoint" contract="BeWo.Service.ServiceContracts.Enhanced.IStatusService" />
</service>
</services>
<bindings>
<basicHttpBinding>

97
Host/status.htm Normal file
View File

@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<title>BeWo Serverstatus</title>
<style>
body {
font-family: sans-serif;
padding: 2rem;
background: #f5f5f5;
}
h1 {
color: #333;
}
.ok {
color: green;
font-weight: bold;
}
.err {
color: red;
font-weight: bold;
}
table {
border-collapse: collapse;
width: 100%;
max-width: 600px;
margin-top: 1rem;
}
td, th {
border: 1px solid #ccc;
padding: 8px 12px;
text-align: left;
}
th {
background: #eee;
}
</style>
</head>
<body>
<h1>BeWo Serverstatus</h1>
<p>Tenant: <span id="tenant"></span></p>
<p>Serverzeit: <span id="time"></span></p>
<p>Version: <span id="version"></span></p>
<p>Datenbank: <span id="db"></span></p>
<h2>Services</h2>
<table>
<thead><tr><th>Service</th><th>Status</th><th>Meldung</th></tr></thead>
<tbody id="services"></tbody>
</table>
<script>
function getTenant() {
const params = new URLSearchParams(window.location.search);
return params.get('Tenant') || '';
}
async function load() {
const tenant = getTenant();
const url = tenant
? `StatusService.svc/Status?Tenant=${encodeURIComponent(tenant)}`
: 'StatusService.svc/Status';
const res = await fetch(url);
const data = await res.json();
document.getElementById('tenant').textContent = data.Tenant || '';
document.getElementById('time').textContent = data.ServerTime;
document.getElementById('version').textContent = data.Version;
const db = document.getElementById('db');
db.textContent = data.DatabaseOk ? '✔ OK' : '✘ Fehler';
db.className = data.DatabaseOk ? 'ok' : 'err';
const tbody = document.getElementById('services');
tbody.innerHTML = '';
for (const svc of data.Services) {
const cls = svc.IsOk ? 'ok' : 'err';
tbody.innerHTML += `
<tr>
<td>${svc.Name}</td>
<td class="${cls}">${svc.IsOk ? '✔ OK' : '✘ Fehler'}</td>
<td>${svc.Message}</td>
</tr>`;
}
}
load();
setInterval(load, 30000); // alle 30 Sek. aktualisieren</script>
</body>
</html>

View File

@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{23696062-2534-49E5-B88D-E182F2399923}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CaritasverbandDuerenJuelichEvBeWo</RootNamespace>
<AssemblyName>4512933309_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.DataAccess.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpo.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Reporting\CustomReportCreator.cs" />
<Compile Include="Reporting\SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Reporting\SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Reporting\SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,51 @@
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.Services;
using System;
using System.Collections.Generic;
using System.Linq;
namespace CaritasverbandDuerenJuelichEvBeWo.Invoicing
{
public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation
{
public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s)
{
return false;
}
//public override bool IsServiceRecordBillable(ServiceRecord iRecord)
//{
// if (iRecord.ServiceDescription.ServiceCategory.Name.Contains("Assistenz"))
// {
// return false;
// }
// return true;
//}
//public override void CalculateSettlementInvoiceApprovedAmounts(Settlement2DC si, SupportConceptCostBearerRelDC relDC, Calculations calc)
//{
// si.ApprovedFLSWeekly = 0;
// si.ApprovedFLS = 0;
// foreach (var sp in relDC.ApprovalPeriodList)
// {
// if (sp.ServiceCategory == null || !sp.ServiceCategory.Name.Contains("Assistenz"))
// {
// si.ApprovedFLSWeekly += calc.GetApprovedHoursPerWeek(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
// decimal flsTotal = calc.GetApprovedHoursTotal(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
// flsTotal = Math.Round(flsTotal, 2, MidpointRounding.AwayFromZero);
// si.ApprovedFLS += flsTotal;
// }
// }
//}
//public override IList<ServiceRecord> GetBillableServiceRecords(CostBearer2SupportConcept c2s)
//{
// return c2s.ServiceRecords.OrderBy(s => s.Start).Where(s => !s.ServiceDescription.ServiceCategory.Name.ToLower().Contains("assistenz")).ToList();
//}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("KundeXyz")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("KundeXyz")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("c1fed668-adb9-47e0-b589-1389618e1b6e")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CaritasverbandDuerenJuelichEvBeWo.Properties {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CaritasverbandDuerenJuelichEvBeWo.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@@ -0,0 +1,201 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using DevExpress.XtraReports.UI;
namespace TemplateNeuKunde.Reporting
{
//public class CustomReportCreator : DefaultReportCreator
//{
// //Einkommentiere für LWL Prüfliste, ZAD Nummer und ServiceDescription ergänzen
// //SQL Queries:
// //INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`)
// //VALUES(500,24,0,'LWL Quittierungsbelege','select \':Von\', \':Bis\', \':Klient/in\'','direct', NULL, NULL, NULL,1,1, NULL,'1', NULL, NULL, NULL);
// //INSERT INTO `parameter` (`Oid`,`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`) VALUES(4,500,25,'Von_Bis',5, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
// //INSERT INTO `parameter` (`Oid`,`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`) VALUES(5,500,25,'Klient/in',2, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
// //public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
// //{
// // if (queryOid == 500)
// // {
// // return CreateLwlPruefliste(CreateQueryRO(queryOid, queryReportId));
// // }
// // return base.CreateQueryReport(queryOid, queryReportId);
// //}
// //private LwlPruefliste CreateLwlPruefliste(QueryRO queryRo)
// //{
// // var liste = new LwlPruefliste();
// // if (queryRo.Rows.Count > 0)
// // {
// // DateTime start = DateTime.MaxValue;
// // DateTime end = DateTime.MinValue;
// // if (queryRo.Rows[0].Field1 != null)
// // {
// // DateTime.TryParse(queryRo.Rows[0].Field1.ToString(), out start);
// // }
// // if (queryRo.Rows[0].Field2 != null)
// // {
// // DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out end);
// // }
// // long? customerOid = null;
// // if (queryRo.Rows[0].Field3.ToString() == "0")
// // {
// // var masterReport = new LwlPruefliste();
// // //masterReport.CreateDocument();
// // var customerList = DAOFactory.GenericDAO.GetAllActive<Customer>();
// // var customerListOrd = customerList.OrderBy(c => c.Person.LastNameFirstName).ToList();
// // foreach (var c in customerListOrd)
// // {
// // var ro = LwlPrueflisteRO.Create(start, end, "9011113", c.Oid);
// // if (ro.ServiceRecords != null && ro.ServiceRecords.Count > 0)
// // {
// // try
// // {
// // liste = new LwlPruefliste();
// // liste.SetReportDataSource(ro);
// // liste.CreateDocument();
// // masterReport.Pages.AddRange(liste.Pages);
// // }
// // catch
// // {
// // // ignore - z.B. kein Hilfeplan
// // }
// // }
// // }
// // return (LwlPruefliste)masterReport;
// // }
// // if (queryRo.Rows[0].Field3 != null)
// // {
// // if (Int64.TryParse(queryRo.Rows[0].Field3.ToString(), out var oidOut))
// // {
// // customerOid = oidOut;
// // }
// // var ro = LwlPrueflisteRO.Create(start, end, "9011113", customerOid);
// // liste.SetReportDataSource(ro);
// // return liste;
// // }
// // }
// // return liste;
// //}
// //Einkommentiere für LWL 2. Seite mit Anhang für Budgetnachweise
// //public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
// //{
// // return base.CreateSettlementReport(dcId, invoiceBaseOid, true);
// //}
// //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);
// // if (lROs.Count > 0)
// // {
// // var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
// // rootReport.CreateDocument();
// // for (int i = 1; i < lROs.Count; i++)
// // {
// // var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
// // lNext.CreateDocument();
// // rootReport.Pages.AddRange(lNext.Pages);
// // }
// // return rootReport;
// // }
// // return new XtraReport();
// //}
// //public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
// //{
// // var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
// // return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
// //}
// //public override XtraReport CreateServiceOverviewReportForCustomers(IList<long> customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
// //{
// // var roList = new List<ServicesOverviewRO>();
// // foreach (var coid in customerOids)
// // {
// // var ro = ServicesOverviewRO.Create(coid, month, year, true, orgaOid ?? 0, empOid ?? 0, startDay, endDay, serviceCategoryOid);
// // if (ro != null)
// // {
// // roList.Add(ro);
// // }
// // }
// // if (roList.Count > 0)
// // {
// // var rootReport = CreateServicesOverviewReportForRo(roList[0], serviceCategoryOid);
// // rootReport.CreateDocument();
// // for (int i = 1; i < roList.Count; i++)
// // {
// // var lNext = CreateServicesOverviewReportForRo(roList[i], serviceCategoryOid);
// // lNext.CreateDocument();
// // rootReport.Pages.AddRange(lNext.Pages);
// // }
// // return rootReport;
// // }
// // return new XtraReport();
// //}
//public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, String reportId)
//{
// return CreateServicesOverviewReportForRo(ro, null);
//}
// //private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
// //{
// // IBeWoReport<ServicesOverviewRO> report = null;
// // String kt = "";
// // if (!String.IsNullOrWhiteSpace(ro.Costbearer))
// // kt = ro.Costbearer.Trim();
// // String function = "";
// // if (ro.CostBearer2SupportConceptList != null)
// // {
// // foreach (var c2s in ro.CostBearer2SupportConceptList)
// // {
// // if (c2s.CostBearer.Organisation.Function != null && !String.IsNullOrWhiteSpace(ro.Costbearer) && c2s.CostBearer.Organisation.Name == ro.Costbearer)
// // function = c2s.CostBearer.Organisation.Function.Value;
// // }
// // }
// // if (kt == "Kreisverwaltung Mainz-Bingen")
// // report = new AlzeyTeilhabe.StundenzettelBi2();
// // if (report == null && function == "Kostenträger Soziotherapie")
// // report = new StundenzettelSoziotherapie();
// // if (report == null)
// // report = new AlzeyTeilhabe.StundenzettelWo();
// // report.SetReportDataSource(ro);
// // return report as XtraReport;
// //}
//}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using System.Text.RegularExpressions;
using BS.Shared.Extensions;
namespace CaritasverbandDuerenJuelichEvBeWo
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
{
public Spitzabrechnung()
{
InitializeComponent();
}
public void SetReportDataSource(Settlement2RO pRO)
{
decimal rateFactor = 1;
foreach (var ii in pRO.InvoiceItems)
{
if (ii.RateFactor.HasValue)
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
//if (!ii.ItemDescription.IsNullOrEmpty())
//{
//ii.AbrechnungsText = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte");
//}
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
ii.ItemDescription = "Fehlkontakte";
}
else if (ii.ItemDescription.IsNullOrEmpty())
{
ii.ItemDescription = "Fachleistungsstunden";
}
}
pRO.RateFactor = (double)rateFactor;
if (pRO.Salutation1.IsNullOrEmpty() && pRO.Salutation2.IsNullOrEmpty())
{
lblAnrede.Text = "Guten Tag,";
}
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrLabel6.Text" xml:space="preserve">
<value>anbei sende ich Ihnen die unterschriebenen Nachweise über die im Rahmen des Betreuten Wohnens für [Salutation2] [CustomerFirstName] [CustomerLastName] erbrachten Leistungen zu. Nach unserer Berechnung ergeben sich für den Betreuungszeitraum [AccountingPeriod] hieraus:
</value>
</data>
</root>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.4000" newVersion="3.1.0.4000" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -33,12 +33,14 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.DataAccess.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Pdf.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpo.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2.Wizard, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />

View File

@@ -267,7 +267,8 @@ namespace BeWo.ChristopherusHaus.Export
sb.Append(";");
sb.Append(String.Format("{0:0.00}", row[1]));
sb.Append(";;;");
sb.Append(String.Format("{0}", row[2])); // derzeit ist das Erlöskonto fix, weil alle außer LWL/LVR auf 8017 kommunale Erlöse gehen
var gegenkonto = GetErloeskonto(row[7].ToString());
sb.Append(String.Format("{0}", gegenkonto));
sb.Append(";");
sb.Append(String.Format("{0}", row[3]));
sb.Append(";;");
@@ -286,6 +287,14 @@ namespace BeWo.ChristopherusHaus.Export
return sb.ToString();
}
private static String GetErloeskonto(String orga)
{
if (orga.Contains("Selbstzahler"))
return "8005";
else // alle außer LWL/LVR auf 8017 kommunale Erlöse
return "8017";
}
private static List<FileAttachmentDC> CreateAttachmentsFiles(DateTime date, DataTable dt, DataTable dtLL)
{
try

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using BeWo.Service.Core;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using Utils = BS.Shared.Core.Utils;
namespace HilfeDaheimHandInHand.Export
{
public class CustomDataExporter : DataExporter
{
public override QueryDC CreateQuery(QueryDC query)
{
return DatevExporter.CreateQuery(query);
}
}
}

View File

@@ -0,0 +1,298 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace HilfeDaheimHandInHand.Export
{
public class DatevExporter
{
public static QueryDC CreateQuery(QueryDC query)
{
DateTime dt = DateTime.Now;
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
query.FileName = String.Format("Datev Export {0:yyyyMM}.csv", dt);
query.QueryResult = GetAbrechnungenString(dt);
return query;
}
public static String GetAbrechnungenString(DateTime date)
{
StringBuilder sb = new StringBuilder();
//sb.AppendLine("Datum;Konto;Gegenkonto;Buchungstext;Belegfeld1;Umsatz Soll;Kostenstelle");
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
sb.Append("EXTF;510;21;Buchungsstapel;7;");
sb.Append(String.Format("{0:yyyyMM}00000000000", new DateTime(date.Year, date.Month, 1)));
sb.Append(";;RE;ownSoft;;322418;4;");
sb.Append(String.Format("{0:yyyyMMdd}", new DateTime(date.Year, 1, 1)));
sb.Append(";4;");
sb.Append(String.Format("{0:yyyyMMdd}", new DateTime(date.Year, date.Month, 1)));
sb.Append(";");
sb.Append(String.Format("{0:yyyyMMdd}", lastDate));
sb.Append(";Buchungen;");
sb.AppendLine(";1;0;0;EUR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;");
sb.AppendLine("Umsatz (ohne Soll/Haben-Kz);Soll/Haben-Kennzeichen;WKZ Umsatz;Kurs;Basis-Umsatz;WKZ Basis-Umsatz;Konto;Gegenkonto (ohne BU-Schlüssel);BU-Schlüssel;Belegdatum;Belegfeld 1;Belegfeld 2;" +
"Skonto;Buchungstext;Postensperre;Diverse Adressnummer;Geschäftspartnerbank;Sachverhalt;Zinssperre;Beleglink;Beleginfo - Art 1;Beleginfo - Inhalt 1;Beleginfo - Art 2;" +
"Beleginfo - Inhalt 2;Beleginfo - Art 3;Beleginfo - Inhalt 3;Beleginfo - Art 4;Beleginfo - Inhalt 4;Beleginfo - Art 5;Beleginfo - Inhalt 5;Beleginfo - Art 6;Beleginfo - Inhalt 6;Beleginfo - Art 7;" +
"Beleginfo - Inhalt 7;Beleginfo - Art 8;Beleginfo - Inhalt 8;KOST1 - Kostenstelle;KOST2 - Kostenstelle;Kost-Menge;EU-Land u. UStID;EU-Steuersatz;Abw. Versteuerungsart;Sachverhalt L+L;" +
"Funktionsergänzung L+L;BU 49 Hauptfunktionstyp;BU 49 Hauptfunktionsnummer;BU 49 Funktionsergänzung;Zusatzinformation - Art 1;Zusatzinformation- Inhalt 1;" +
"Zusatzinformation - Art 2;Zusatzinformation- Inhalt 2;Zusatzinformation - Art 3;Zusatzinformation- Inhalt 3;Zusatzinformation - Art 4;Zusatzinformation- Inhalt 4;" +
"Zusatzinformation - Art 5;Zusatzinformation- Inhalt 5;Zusatzinformation - Art 6;Zusatzinformation- Inhalt 6;Zusatzinformation - Art 7;Zusatzinformation- Inhalt 7;" +
"Zusatzinformation - Art 8;Zusatzinformation- Inhalt 8;Zusatzinformation - Art 9;Zusatzinformation- Inhalt 9;Zusatzinformation - Art 10;Zusatzinformation- Inhalt 10;" +
"Zusatzinformation - Art 11;Zusatzinformation- Inhalt 11;Zusatzinformation - Art 12;Zusatzinformation- Inhalt 12;Zusatzinformation - Art 13;Zusatzinformation- Inhalt 13;" +
"Zusatzinformation - Art 14;Zusatzinformation- Inhalt 14;Zusatzinformation - Art 15;Zusatzinformation- Inhalt 15;Zusatzinformation - Art 16;Zusatzinformation- Inhalt 16;" +
"Zusatzinformation - Art 17;Zusatzinformation- Inhalt 17;Zusatzinformation - Art 18;Zusatzinformation- Inhalt 18;Zusatzinformation - Art 19;Zusatzinformation- Inhalt 19;" +
"Zusatzinformation - Art 20;Zusatzinformation- Inhalt 20;Stück;Gewicht;Zahlweise;Forderungsart;Veranlagungsjahr;Zugeordnete Fälligkeit;Skontotyp;" +
"Auftragsnummer;Buchungstyp;USt-Schlüssel (Anzahlungen);EU-Land (Anzahlungen);Sachverhalt L+L (Anzahlungen);EU-Steuersatz (Anzahlungen);Erlöskonto (Anzahlungen);Herkunft-Kz;Buchungs GUID;KOST-Datum;Mandatsreferenz;" +
"Skontosperre;Gesellschaftername;Beteiligtennummer;Identifikationsnummer;Zeichnernummer;Postensperre bis;Bezeichnung SoBil-Sachverhalt;Kennzeichen SoBil-Buchung;" +
"Festschreibung;Leistungsdatum;Datum Zuord. Steuerperiode");
var s = GetRechnungenString(date);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
}
s = GetMonatlicheBetraegeString(date);
if (!String.IsNullOrWhiteSpace(s))
{
if (sb.Length > 0)
sb.AppendLine();
sb.Append(s);
}
return sb.ToString();
}
public static String GetMonatlicheBetraegeString(DateTime date)
{
// Betrag, c.DebitorNumber, c.CostCenter, CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung', cb2sc.Oid
var sql = GetMonatlicheBetraegeSql(date);
var dt = ExecuteQuery(sql, date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
sb.Append(String.Format("{0:0.00}", row[0])); //Betrag
sb.Append(";S;;;;;");
sb.Append(String.Format("{0}", row[1])); //DebitorNumber
sb.Append(";4095"); // Erlöskonto
sb.Append(";;");
sb.Append(String.Format("{0:ddMM}", lastDate));
sb.Append(";");
// Belegfeld 1 fehlt hier
sb.Append(";;;");
sb.Append(String.Format("{0}, {1}", row[3], row[4]));
sb.Append(";;;;;;;;;;;;;;;;;;;;;;;BeWo;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0;;");
}
return sb.ToString();
}
private static String GetMonatlicheBetraegeSql(DateTime date)
{
String sql = @"
SELECT
sum(qry.Betrag),
qry.DebitorNumber,
qry.CostCenter,
qry.Verwendung,
qry.Kostentraeger,
qry.Oid
FROM
(
(SELECT
IF(crpRateFactor.`CostRateValue` is null, ROUND((sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 )),
ROUND(ROUND((sr.`GeleisteteFLM` / 60), 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ) * ((100 + crpRateFactor.`CostRateValue`)/100), 2)) AS 'Betrag',
c.DebitorNumber,
c.CostCenter,
cb2sc.KontoHilfeplan,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
org.Name AS Kostentraeger,
cb2sc.Oid
FROM `supportconcept` sc
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
LEFT JOIN
(SELECT crp.`ObjectOid`, crp.`CostRateValue` FROM `costrateperiod` crp
WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 2 AND(crp.`EndDate` is null or crp.`EndDate` > NOW()))
AS crpRateFactor ON crpRateFactor.`ObjectOid` = cb.`Oid`
INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid`
INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid`
INNER JOIN `person` p on c.`PersonOid` = p.`Oid`
LEFT JOIN
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM FROM `servicerecord` sr2
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sd.Name <> 'Fehlkontakt' GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE org.Name LIKE 'LVR%' AND c.`IsActive` <> 0 AND sc.`IsActive` <> 0 AND (sr.`GeleisteteFLM` is not null))
UNION
(SELECT
ROUND(0.8 * (sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ),2) AS 'Betrag',
c.DebitorNumber,
c.CostCenter,
cb2sc.KontoHilfeplan,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
org.Name AS Kostentraeger,
cb2sc.Oid
FROM `supportconcept` sc
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid`
INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid`
INNER JOIN `person` p on c.`PersonOid` = p.`Oid`
LEFT JOIN
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM FROM `servicerecord` sr2
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 and sd.Name = 'Fehlkontakt' GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE org.Name LIKE 'LVR%' AND c.`IsActive` <> 0 AND sc.`IsActive` <> 0 AND (sr.`GeleisteteFLM` is not null))
)qry
GROUP BY qry.OID
ORDER BY qry.Verwendung
";
return sql;
}
public static String GetRechnungenString(DateTime date)
{
var sql = GetRechnungenSql(date);
/*
sip.Claim,
c.DebitorNumber,
ib.InvoiceDate,
ib.invoicenumber,
c.CostCenter,
c2s.Oid,
ib.InvoiceId,
org.DebitorNumber
*/
//"Datum;Konto;Gegenkonto;Buchungstext;Belegfeld1;Umsatz Soll;Kostenstelle"
var dt = ExecuteQuery(sql, date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
sb.Append(String.Format("{0:0.00}", row[0])); //Betrag
sb.Append(";S;;;;;");
sb.Append(String.Format("{0}", row[1])); //DebitorNumber
var gegenkonto = GetErloeskonto(row[8].ToString());
sb.Append(String.Format(";{0}", gegenkonto));
sb.Append(";;");
sb.Append(String.Format("{0:ddMM}", row[2]));
sb.Append(";");
sb.Append(String.Format("{0}", row[3])); // Belegfeld 1
sb.Append(";;;");
sb.Append(String.Format("{0}, {1}", row[7], row[8]));
sb.Append(";;;;;;;;;;;;;;;;;;;;;;;BeWo;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0;;");
}
return sb.ToString();
}
private static String GetErloeskonto(String orga)
{
if (orga.Contains("Selbstzahler"))
return "4099";
else //LVR
return "4095";
}
private static String GetRechnungenSql(DateTime date)
{
String sql = @"
select
sip.Claim,
c.DebitorNumber,
ib.InvoiceDate,
ib.invoicenumber,
c.CostCenter,
c2s.Oid,
ib.InvoiceId,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
org.Name
from
person p
inner join customer c on c.personoid = p.oid
inner join supportconcept sc on sc.customeroid = c.oid
inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid
inner join costbearer cb on c2s.costbeareroid = cb.oid
inner join organisation org on org.costbeareroid = cb.oid
inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid
inner join serviceinvoice si on si.invoicebaseoid = ib.oid
inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid
WHERE ib.InvoiceDate >= ':Monat_Start' AND ib.InvoiceDate < ':Monat_End' and ib.IsActive = 1 AND ib.`IsExported` = 0
Union
SELECT
Round(si.Claim, 2),
c.DebitorNumber,
ib.InvoiceDate,
ib.InvoiceNumber,
c.CostCenter,
c2s.Oid,
ib.InvoiceId,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
org.Name
from invoicebase ib
join settlementinvoice si on si.invoicebaseoid = ib.oid
join supportconcept sc on sc.oid = ib.supportconceptoid
join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid
join costbearer cb on c2s.costbeareroid = cb.oid
join organisation org on org.costbeareroid = cb.oid
join customer c on c.oid = sc.customeroid
join `person` p on c.`PersonOid` = p.`Oid`
WHERE ib.InvoiceDate >= ':Monat_Start' AND ib.InvoiceDate < ':Monat_End'
AND ib.type = 1 AND ib.isactive = 1 and c.isactive <> 0 AND ib.`IsExported` = 0
";
return sql;
}
public static DataTable ExecuteQuery(String sql, DateTime dt)
{
var newsql = sql;
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:dd.MM.yyyy}", dt));
newsql = newsql.Replace(":Belegnr", String.Format("{0:yyMM}", dt));
newsql = newsql.Replace(":Monat_MM", String.Format("{0:MM}", dt));
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt));
dt = dt.AddMonths(1);
newsql = newsql.Replace(":Monat_End", String.Format("{0:yyyy-MM}-01", dt));
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
}
}
}

View File

@@ -31,6 +31,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.DataAccess.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
@@ -39,6 +40,7 @@
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpo.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
@@ -55,6 +57,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\DatevExporter.cs" />
<Compile Include="Forderungen.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -30,8 +30,8 @@ namespace LyvieKupfer
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
@@ -70,6 +70,9 @@ namespace LyvieKupfer
this.xrLabel24 = new DevExpress.XtraReports.UI.XRLabel();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.lblUnterschriftMitarbeiter = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
@@ -77,9 +80,7 @@ namespace LyvieKupfer
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldHours = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -520,6 +521,7 @@ namespace LyvieKupfer
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel10,
this.xrLabel9,
this.xrLabel3,
this.xrLabel5,
@@ -532,6 +534,56 @@ namespace LyvieKupfer
this.GroupFooter1.KeepTogether = true;
this.GroupFooter1.Name = "GroupFooter1";
//
// xrLabel9
//
this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Calibri", 14F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(235.5921F, 20.00008F);
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(339.0233F, 20F);
this.xrLabel9.StylePriority.UseBackColor = false;
this.xrLabel9.StylePriority.UseBorders = false;
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.StylePriority.UsePadding = false;
this.xrLabel9.StylePriority.UseTextAlignment = false;
this.xrLabel9.Text = "Fördereinheiten à 45 Min";
this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel3
//
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Calibri", 14F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 20.00001F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(109.1769F, 20F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UsePadding = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Insgesamt:";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel5
//
this.xrLabel5.BackColor = System.Drawing.Color.Transparent;
this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLSString")});
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("calibri", 14F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(109.177F, 20.00001F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(126.4151F, 20F);
this.xrLabel5.StylePriority.UseBackColor = false;
this.xrLabel5.StylePriority.UseBorders = false;
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.StylePriority.UsePadding = false;
this.xrLabel5.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.##}";
this.xrLabel5.Summary = xrSummary1;
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// lblUnterschriftMitarbeiter
//
this.lblUnterschriftMitarbeiter.Borders = DevExpress.XtraPrinting.BorderSide.Top;
@@ -621,55 +673,20 @@ namespace LyvieKupfer
this.fieldHours.Expression = "Round([Minutes]/60,2)";
this.fieldHours.Name = "fieldHours";
//
// xrLabel3
// xrLabel10
//
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Calibri", 14F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 20.00001F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(109.1769F, 20F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UsePadding = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "Insgesamt:";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel5
//
this.xrLabel5.BackColor = System.Drawing.Color.Transparent;
this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TotalFLSString")});
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("calibri", 14F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(109.177F, 20.00001F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(126.4151F, 20F);
this.xrLabel5.StylePriority.UseBackColor = false;
this.xrLabel5.StylePriority.UseBorders = false;
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.StylePriority.UsePadding = false;
this.xrLabel5.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.##}";
this.xrLabel5.Summary = xrSummary1;
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel9
//
this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Calibri", 14F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(235.5921F, 20.00008F);
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(339.0233F, 20F);
this.xrLabel9.StylePriority.UseBackColor = false;
this.xrLabel9.StylePriority.UseBorders = false;
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.StylePriority.UsePadding = false;
this.xrLabel9.StylePriority.UseTextAlignment = false;
this.xrLabel9.Text = "Fördereinheiten à 45 Min";
this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrLabel10.Font = new DevExpress.Drawing.DXFont("Calibri", 14F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(235.5921F, 0F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(339.0233F, 20F);
this.xrLabel10.StylePriority.UseBackColor = false;
this.xrLabel10.StylePriority.UseBorders = false;
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.StylePriority.UsePadding = false;
this.xrLabel10.StylePriority.UseTextAlignment = false;
this.xrLabel10.Text = "Zeitstunden";
this.xrLabel10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// Quittierungsbeleg
//
@@ -753,5 +770,6 @@ namespace LyvieKupfer
private DevExpress.XtraReports.UI.XRLabel xrLabel9;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
}
}

View File

@@ -39,7 +39,7 @@ namespace LyvieKupfer
}
}
lblAbrechnungszeitraum.Text = String.Format("Für den Zeitraum vom {0:d. MMMM yyyy} bis zum {1:dd. MMMM yyyy} berechne ich Ihnen {2:0.##} Stunden " +
lblAbrechnungszeitraum.Text = String.Format("Für den Zeitraum vom {0:d. MMMM yyyy} bis zum {1:dd. MMMM yyyy} berechne ich Ihnen {2:0.##} Fördereinheiten " +
"heilpädagogische Leistungen für die Frühförderung für das Kind {3}, {4}.", start, end, hours, pRO.CustomerLastName, pRO.CustomerFirstName);
SetzeAdresse(pRO);

View File

@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblAbrechnungszeitraum.Text" xml:space="preserve">
<value>Für den Zeitraum vom [AccountingPeriodStart!dd.MM.yyyy] bis zum [AccountingPeriodEnd!dd.MM.yyyy] berechne ich Ihnen die aufgeführten Stunden heilpädagogische Leistungen für die Frühförderung für das Kind [CustomerLastName], [CustomerFirstName].</value>
<value>Für den Zeitraum vom [AccountingPeriodStart!dd.MM.yyyy] bis zum [AccountingPeriodEnd!dd.MM.yyyy] berechne ich Ihnen die aufgeführten Fördereinheiten heilpädagogische Leistungen für die Frühförderung für das Kind [CustomerLastName], [CustomerFirstName].</value>
</data>
<data name="xrRichText1.SerializableRtfString" xml:space="preserve">
<value>ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAKgBcAGQAZQBmAHAAYQBwACAAXAB3AGkAZABjAHQAbABwAGEAcgB9AHsAXABzAHQAeQBsAGUAcwBoAGUAZQB0ACAAewBcAHEAbABcAGYAMQBcAGYAcwAyADQAIABOAG8AcgBtAGEAbAA7AH0AewBcACoAXABjAHMAMQBcAGYAMQBcAGYAcwAyADQAIABEAGUAZgBhAHUAbAB0ACAAUABhAHIAYQBnAHIAYQBwAGgAIABGAG8AbgB0ADsAfQB7AFwAKgBcAGMAcwAyAFwAcwBiAGEAcwBlAGQAbwBuADEAXABmADEAXABmAHMAMgA0AFwAYwBmADEAIABMAGkAbgBlACAATgB1AG0AYgBlAHIAOwB9AHsAXAAqAFwAYwBzADMAXABmADEAXABmAHMAMgA0AFwAdQBsAFwAYwBmADIAIABIAHkAcABlAHIAbABpAG4AawA7AH0AewBcACoAXAB0AHMANABcAHQAcwByAG8AdwBkAFwAZgAxAFwAZgBzADIANABcAHEAbABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgBsADMAXAB0AHMAYwBlAGwAbABwAGEAZABkAGwAMQAwADgAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAYgAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwBjAGUAbABsAHAAYQBkAGQAZgB0ADMAXAB0AHMAdgBlAHIAdABhAGwAdABcAGMAbAB0AHgAbAByAHQAYgAgAE4AbwByAG0AYQBsACAAVABhAGIAbABlADsAfQB7AFwAKgBcAHQAcwA1AFwAdABzAHIAbwB3AGQAXABzAGIAYQBzAGUAZABvAG4ANABcAGYAMQBcAGYAcwAyADQAXABxAGwAXAB0AHIAYgByAGQAcgB0AFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGwAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAYgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHIAYgByAGQAcgByAFwAYgByAGQAcgBzAFwAYgByAGQAcgB3ADEAMABcAHQAcgBiAHIAZAByAGgAXABiAHIAZAByAHMAXABiAHIAZAByAHcAMQAwAFwAdAByAGIAcgBkAHIAdgBcAGIAcgBkAHIAcwBcAGIAcgBkAHIAdwAxADAAXAB0AHMAYwBlAGwAbABwAGEAZABkAGYAbAAzAFwAdABzAGMAZQBsAGwAcABhAGQAZABsADEAMAA4AFwAdABzAGMAZQBsAGwAcABhAGQAZABmAHIAMwBcAHQAcwBjAGUAbABsAHAAYQBkAGQAcgAxADAAOABcAHQAcwB2AGUAcgB0AGEAbAB0AFwAYwBsAHQAeABsAHIAdABiACAAVABhAGIAbABlACAAUwBpAG0AcABsAGUAIAAxADsAfQB9AHsAXAAqAFwAbABpAHMAdABvAHYAZQByAHIAaQBkAGUAdABhAGIAbABlAH0AXABuAG8AdQBpAGMAbwBtAHAAYQB0AFwAaAB0AG0AYQB1AHQAcwBwAFwAcwBwAGwAeQB0AHcAbgBpAG4AZQBcAGEAbABuAHQAYgBsAGkAbgBkAFwAZQB4AHAAcwBoAHIAdABuAFwAcwBwAGwAdABwAGcAcABhAHIAXABuAG8AZwByAG8AdwBhAHUAdABvAGYAaQB0AFwAdQB0AGkAbgBsAFwAbgBvAGIAcgBrAHcAcgBwAHQAYgBsAFwAZgB0AG4AbAB5AHQAdwBuAGkAbgBlAFwAbgBvAHQAYwB2AGEAcwBwAFwAZABuAHQAYgBsAG4AcwBiAGQAYgBcAG4AZQB3AHQAYgBsAHMAdAB5AHIAdQBsAHMAXABmAG8AcgBtAHMAaABhAGQAZQBcAHAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAXAB3AGkAZABjAHQAbABwAGEAcgB7AFwAZgBzADIANABcAGMAZgAxACAAXAB1ADgAMgAyADYAXAAnADkANQAgAFwAdABhAGIAIABaAGUAaQB0AGUAcgBmAGEAcwBzAHUAbgBnAH0AXABmAHMAMgA0AFwAYwBmADEAXABwAGEAcgB9AA==</value>

View File

@@ -28,9 +28,86 @@ namespace Ruhrstern
{
if (ed.StundenSollMax != 0)
{
ed.Custom1 = (1 - ed.StundenSollOhneUrlaubKrankheit / ed.StundenSollMax) * 100;
ed.Custom2 = BerechneArbeitszeitDurchFeiertage(ed, ro.ReportStartDate, ro.ReportEndDate);
ed.Custom3 = ed.StundenSollOhneUrlaubKrankheit + ed.Custom2;
ed.Custom4 = ed.StundenSollMax + ed.Custom2;
ed.Custom1 = (1 - (ed.StundenSollOhneUrlaubKrankheit + ed.Custom2) / (ed.StundenSollMax + ed.Custom2)) * 100;
}
}
}
}
public decimal BerechneArbeitszeitDurchFeiertage(MitarbeiterstundenkontoRO.EmployeeDetail ed, DateTime start, DateTime ende)
{
decimal az = 0;
DateTime dt = start;
while (dt < ende)
{
if (GetFeiertagsFaktor(dt) > 0)
{
az += BerechneSollStundenFuerFeiertage(ed, dt);
}
dt = dt.AddDays(1);
}
return az;
}
public decimal BerechneSollStundenFuerFeiertage(MitarbeiterstundenkontoRO.EmployeeDetail ed, DateTime date)
{
decimal sollDiesenTag = 0;
var faktor = GetFeiertagsFaktor(date);
//Berechne Soll, entweder aus Vertrag oder Arbeitszeiten
if (HatArbeitszeitImZeitraum(ed.Employee.Arbeitszeiten, date, date))
{
sollDiesenTag = GetSollNachArbeitszeitenFuerTag(ed.Employee, date);
}
else
{
//sollDiesenTag = ed.SollProTag;
var c = ed.Employee.GetValidContractForDate(date);
if (c != null)
{
decimal wth = 0;
int apw = 5;
if (c.WeeklyDays.HasValue && c.WeeklyDays.Value > 0)
{
apw = c.WeeklyDays.Value;
}
if (c.WeeklyTotalHours.HasValue)
{
wth = c.WeeklyTotalHours.Value;
}
else if (c.MonthlyTotalHours.HasValue && ed.ArbeitstageImBerichtszeitraum > 0)
{
wth = c.MonthlyTotalHours.Value / ed.ArbeitstageImBerichtszeitraum;
wth *= apw;
}
sollDiesenTag = wth / apw;
bool istWochenende = date.DayOfWeek == DayOfWeek.Saturday || date.DayOfWeek == DayOfWeek.Sunday;
if (apw == 6)
{
istWochenende = date.DayOfWeek == DayOfWeek.Sunday;
}
else if (apw > 6)
{
istWochenende = false;
}
if (istWochenende)
{
sollDiesenTag = 0;
}
}
if (faktor != 0)
{
sollDiesenTag *= faktor; //halbe Feiertage etc. berücksichtigen
}
}
return sollDiesenTag;
}
}
}

View File

@@ -21,6 +21,15 @@ namespace Ruhrstern
var msb = PluginLoader.FindClass<MitarbeiterstundenkontoBerechnung>();
msb.CreateReport(pRO);
// Für den Ausfallfaktor brauche ich die um die Feiertage korrigierten Summen der Sollzeiten
decimal sollOhne = 0;
decimal sollMax = 0;
foreach (var ed in pRO.EmployeeDetailList)
{
sollOhne += ed.Custom3;
sollMax += ed.Custom4;
}
pRO.MittelbarIst = (1 - (sollOhne) / sollMax) * 100;
this.bindingSource1.DataSource = pRO;
}
}

View File

@@ -52,22 +52,6 @@ namespace Ruhrstern
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrTableHeader = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRowHeader = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -85,7 +69,6 @@ namespace Ruhrstern
this.xrTableCell48 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell51 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.lblMonat = new DevExpress.XtraReports.UI.XRLabel();
@@ -99,9 +82,28 @@ namespace Ruhrstern
this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell33 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell34 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell36 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell38 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell40 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell41 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell42 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell43 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell44 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell46 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell50 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell52 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
@@ -147,6 +149,7 @@ namespace Ruhrstern
this.xrTableCell19,
this.xrTableCell20,
this.xrTableCell28,
this.xrTableCell52,
this.xrTableCell29,
this.xrTableCell16,
this.xrTableCell27,
@@ -171,7 +174,7 @@ namespace Ruhrstern
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.Text = "xrTableCell3";
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell3.Weight = 0.15329125338142471D;
this.xrTableCell3.Weight = 0.1399299012310381D;
//
// xrTableCell19
//
@@ -179,7 +182,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.StundenSollMax", "{0:0.00}")});
this.xrTableCell19.Name = "xrTableCell19";
this.xrTableCell19.Text = "xrTableCell19";
this.xrTableCell19.Weight = 0.055698707177179521D;
this.xrTableCell19.Weight = 0.057294807353435492D;
//
// xrTableCell20
//
@@ -187,22 +190,22 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.UrlaubUndKrankheit", "{0:0.00}")});
this.xrTableCell20.Name = "xrTableCell20";
this.xrTableCell20.Text = "xrTableCell20";
this.xrTableCell20.Weight = 0.064510640112751941D;
this.xrTableCell20.Weight = 0.064139829797688841D;
//
// xrTableCell28
//
this.xrTableCell28.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.StundenSollOhneUrlaubKrankheit", "{0:0.00}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Custom2", "{0:0.00}")});
this.xrTableCell28.Name = "xrTableCell28";
this.xrTableCell28.Text = "xrTableCell28";
this.xrTableCell28.Weight = 0.073308727035160628D;
this.xrTableCell28.Weight = 0.056209345859503886D;
//
// xrTableCell29
//
this.xrTableCell29.Multiline = true;
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.Text = "[Custom1!0.00]";
this.xrTableCell29.Weight = 0.054453070850742011D;
this.xrTableCell29.Weight = 0.055156080943127517D;
//
// xrTableCell16
//
@@ -210,7 +213,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.FlsSoll", "{0:0.00}")});
this.xrTableCell16.Name = "xrTableCell16";
this.xrTableCell16.Text = "xrTableCell16";
this.xrTableCell16.Weight = 0.063119927862939587D;
this.xrTableCell16.Weight = 0.0526217803098317D;
//
// xrTableCell27
//
@@ -218,7 +221,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.FlsIst", "{0:0.00}")});
this.xrTableCell27.Name = "xrTableCell27";
this.xrTableCell27.Text = "xrTableCell27";
this.xrTableCell27.Weight = 0.063119927862939615D;
this.xrTableCell27.Weight = 0.050713111896769629D;
//
// xrTableCell22
//
@@ -291,145 +294,11 @@ namespace Ruhrstern
// GroupHeader1
//
this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTableHeader});
this.GroupHeader1.HeightF = 70F;
this.xrTable2});
this.GroupHeader1.HeightF = 69.99998F;
this.GroupHeader1.Name = "GroupHeader1";
this.GroupHeader1.RepeatEveryPage = true;
//
// xrTableHeader
//
this.xrTableHeader.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
| DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableHeader.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableHeader.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTableHeader.Name = "xrTableHeader";
this.xrTableHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRowHeader});
this.xrTableHeader.SizeF = new System.Drawing.SizeF(1071F, 70F);
this.xrTableHeader.StylePriority.UseBorders = false;
this.xrTableHeader.StylePriority.UseFont = false;
this.xrTableHeader.StylePriority.UsePadding = false;
this.xrTableHeader.StylePriority.UseTextAlignment = false;
this.xrTableHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrTableRowHeader
//
this.xrTableRowHeader.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell5,
this.xrTableCell4,
this.xrTableCell2,
this.xrTableCell9,
this.xrTableCell18,
this.xrTableCell8,
this.xrTableCell10,
this.xrTableCell7,
this.xrTableCell11,
this.xrTableCell12,
this.xrTableCell13,
this.xrTableCell14,
this.xrTableCell15,
this.xrTableCell1});
this.xrTableRowHeader.Name = "xrTableRowHeader";
this.xrTableRowHeader.Weight = 2.8D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell5.StylePriority.UsePadding = false;
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.Text = "Name";
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell5.Weight = 0.15329125016467182D;
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Text = "Reguläre SOLL Stunden";
this.xrTableCell4.Weight = 0.055698761792612239D;
//
// xrTableCell2
//
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Fehlzeiten Urlaub Krankheit(Tage)";
this.xrTableCell2.Weight = 0.064510521026400924D;
//
// xrTableCell9
//
this.xrTableCell9.Multiline = true;
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Text = "Tatsächliche SOLL Stunden";
this.xrTableCell9.Weight = 0.0733088527295832D;
//
// xrTableCell18
//
this.xrTableCell18.Multiline = true;
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.Text = "Ausfall-\r\nfaktor \r\n(in %)\r\n";
this.xrTableCell18.Weight = 0.054453017135247195D;
//
// xrTableCell8
//
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Text = "FLS Stunden SOLL";
this.xrTableCell8.Weight = 0.063119927721024038D;
//
// xrTableCell10
//
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.StylePriority.UseBackColor = false;
this.xrTableCell10.Text = "FLS IST lfd. Monat";
this.xrTableCell10.Weight = 0.063119927721024D;
//
// xrTableCell7
//
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "FLS Plus/Minus lfd. Monat";
this.xrTableCell7.Weight = 0.06311992757910842D;
//
// xrTableCell11
//
this.xrTableCell11.Multiline = true;
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.StylePriority.UseBackColor = false;
this.xrTableCell11.Text = "Gesamt-\r\nstunden lfd. Monat";
this.xrTableCell11.Weight = 0.063119927721024011D;
//
// xrTableCell12
//
this.xrTableCell12.Multiline = true;
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Text = "Relation FLS IST zu Gesamt-stunden \r\n(in %)";
this.xrTableCell12.Weight = 0.063119929511863376D;
//
// xrTableCell13
//
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Text = "Überstd. neu";
this.xrTableCell13.Weight = 0.063119928687401447D;
//
// xrTableCell14
//
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.StylePriority.UseBackColor = false;
this.xrTableCell14.Text = "Überstd. Vormonat";
this.xrTableCell14.Weight = 0.063119928275170531D;
//
// xrTableCell15
//
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Text = "Überstd. Gesamt";
this.xrTableCell15.Weight = 0.0631199213956443D;
//
// xrTableCell1
//
this.xrTableCell1.Multiline = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Resturlaub";
this.xrTableCell1.Weight = 0.0631199213956443D;
//
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -484,17 +353,17 @@ namespace Ruhrstern
this.xrTableCell35.StylePriority.UseTextAlignment = false;
this.xrTableCell35.Text = "Gesamt";
this.xrTableCell35.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell35.Weight = 0.1527208718660181D;
this.xrTableCell35.Weight = 0.13940923637479571D;
//
// xrTableCell37
//
this.xrTableCell37.Name = "xrTableCell37";
this.xrTableCell37.Weight = 0.055491400151988D;
this.xrTableCell37.Weight = 0.057081616387053377D;
//
// xrTableCell39
//
this.xrTableCell39.Name = "xrTableCell39";
this.xrTableCell39.Weight = 0.064270624929553641D;
this.xrTableCell39.Weight = 0.11990136300474807D;
//
// cellSollGesamt
//
@@ -502,15 +371,18 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SollGesamt", "{0:0.00}")});
this.cellSollGesamt.Name = "cellSollGesamt";
this.cellSollGesamt.Text = "cellSollGesamt";
this.cellSollGesamt.Weight = 0.073035966823292386D;
this.cellSollGesamt.Weight = 0.051246003270471713D;
//
// xrTableCell30
//
this.xrTableCell30.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "MittelbarIst")});
this.xrTableCell30.Multiline = true;
this.xrTableCell30.Name = "xrTableCell30";
xrSummary1.Func = DevExpress.XtraReports.UI.SummaryFunc.Avg;
this.xrTableCell30.Summary = xrSummary1;
this.xrTableCell30.Weight = 0.054250457460972727D;
this.xrTableCell30.TextFormatString = "{0:0.00}";
this.xrTableCell30.Weight = 0.054950793225879174D;
//
// cellFLSSollGesamt
//
@@ -518,7 +390,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "FlsSollGesamt", "{0:0.00}")});
this.cellFLSSollGesamt.Name = "cellFLSSollGesamt";
this.cellFLSSollGesamt.Text = "cellFLSSollGesamt";
this.cellFLSSollGesamt.Weight = 0.062885088357332058D;
this.cellFLSSollGesamt.Weight = 0.052425979600498759D;
//
// cellFLSIstGesamt
//
@@ -526,7 +398,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "FlsIstGesamt", "{0:0.00}")});
this.cellFLSIstGesamt.Name = "cellFLSIstGesamt";
this.cellFLSIstGesamt.Text = "cellFLSIstGesamt";
this.cellFLSIstGesamt.Weight = 0.062885033321122663D;
this.cellFLSIstGesamt.Weight = 0.050524451046832758D;
//
// cellFLSPlusMinusGesamt
//
@@ -573,10 +445,6 @@ namespace Ruhrstern
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.Weight = 0.062885253465960314D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
//
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -697,6 +565,164 @@ namespace Ruhrstern
this.bottomMarginBand1.HeightF = 30F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// xrTable2
//
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 DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTable2.SizeF = new System.Drawing.SizeF(1071F, 69.99998F);
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
this.xrTable2.StylePriority.UsePadding = false;
this.xrTable2.StylePriority.UseTextAlignment = false;
this.xrTable2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell31,
this.xrTableCell32,
this.xrTableCell33,
this.xrTableCell34,
this.xrTableCell36,
this.xrTableCell38,
this.xrTableCell40,
this.xrTableCell41,
this.xrTableCell42,
this.xrTableCell43,
this.xrTableCell44,
this.xrTableCell45,
this.xrTableCell46,
this.xrTableCell49,
this.xrTableCell50});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 2.8D;
//
// xrTableCell31
//
this.xrTableCell31.Name = "xrTableCell31";
this.xrTableCell31.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell31.StylePriority.UsePadding = false;
this.xrTableCell31.StylePriority.UseTextAlignment = false;
this.xrTableCell31.Text = "Name";
this.xrTableCell31.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell31.Weight = 0.13992994732759739D;
//
// xrTableCell32
//
this.xrTableCell32.Name = "xrTableCell32";
this.xrTableCell32.Text = "Reguläre SOLL Stunden";
this.xrTableCell32.Weight = 0.057294780890414655D;
//
// xrTableCell33
//
this.xrTableCell33.Name = "xrTableCell33";
this.xrTableCell33.Text = "Fehlzeiten Urlaub Krankheit(Tage)";
this.xrTableCell33.Weight = 0.064139791853409817D;
//
// xrTableCell34
//
this.xrTableCell34.Multiline = true;
this.xrTableCell34.Name = "xrTableCell34";
this.xrTableCell34.Text = "Stunden aus Feier-tagen";
this.xrTableCell34.Weight = 0.056209368959342643D;
//
// xrTableCell36
//
this.xrTableCell36.Multiline = true;
this.xrTableCell36.Name = "xrTableCell36";
this.xrTableCell36.Text = "Tatsäch-liche SOLL Stunden";
this.xrTableCell36.Weight = 0.051437439140044339D;
//
// xrTableCell38
//
this.xrTableCell38.Multiline = true;
this.xrTableCell38.Name = "xrTableCell38";
this.xrTableCell38.Text = "Ausfall-faktor\r\n(in %)";
this.xrTableCell38.Weight = 0.055156069391776225D;
//
// xrTableCell40
//
this.xrTableCell40.Name = "xrTableCell40";
this.xrTableCell40.Text = "FLS Stunden SOLL";
this.xrTableCell40.Weight = 0.0526218121338088D;
//
// xrTableCell41
//
this.xrTableCell41.Name = "xrTableCell41";
this.xrTableCell41.StylePriority.UseBackColor = false;
this.xrTableCell41.Text = "FLS IST lfd. Monat";
this.xrTableCell41.Weight = 0.050713048594169516D;
//
// xrTableCell42
//
this.xrTableCell42.Name = "xrTableCell42";
this.xrTableCell42.Text = "FLS Plus/Minus lfd. Monat";
this.xrTableCell42.Weight = 0.06311992757910842D;
//
// xrTableCell43
//
this.xrTableCell43.Multiline = true;
this.xrTableCell43.Name = "xrTableCell43";
this.xrTableCell43.StylePriority.UseBackColor = false;
this.xrTableCell43.Text = "Gesamt-\r\nstunden lfd. Monat";
this.xrTableCell43.Weight = 0.063119927721024011D;
//
// xrTableCell44
//
this.xrTableCell44.Multiline = true;
this.xrTableCell44.Name = "xrTableCell44";
this.xrTableCell44.Text = "Relation FLS IST zu Gesamt-stunden \r\n(in %)";
this.xrTableCell44.Weight = 0.063119929511863376D;
//
// xrTableCell45
//
this.xrTableCell45.Name = "xrTableCell45";
this.xrTableCell45.Text = "Überstd. neu";
this.xrTableCell45.Weight = 0.063119928687401447D;
//
// xrTableCell46
//
this.xrTableCell46.Multiline = true;
this.xrTableCell46.Name = "xrTableCell46";
this.xrTableCell46.StylePriority.UseBackColor = false;
this.xrTableCell46.Text = "Überstd.\r\ndieses Jahr";
this.xrTableCell46.Weight = 0.063119928275170531D;
//
// xrTableCell49
//
this.xrTableCell49.Multiline = true;
this.xrTableCell49.Name = "xrTableCell49";
this.xrTableCell49.Text = "Überstd. Gesamt";
this.xrTableCell49.Weight = 0.0631199213956443D;
//
// xrTableCell50
//
this.xrTableCell50.Multiline = true;
this.xrTableCell50.Name = "xrTableCell50";
this.xrTableCell50.Text = "Resturlaub";
this.xrTableCell50.Weight = 0.0631199213956443D;
//
// xrTableCell52
//
this.xrTableCell52.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.StundenSollOhneUrlaubKrankheit")});
this.xrTableCell52.Multiline = true;
this.xrTableCell52.Name = "xrTableCell52";
this.xrTableCell52.Text = "xrTableCell52";
this.xrTableCell52.TextFormatString = "{0:0.00}";
this.xrTableCell52.Weight = 0.05143739689174285D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
//
// Mitarbeiterstundenkonto
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -723,8 +749,8 @@ namespace Ruhrstern
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
@@ -773,20 +799,6 @@ namespace Ruhrstern
private DevExpress.XtraReports.UI.XRTableCell xrTableCell25;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell24;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell26;
private DevExpress.XtraReports.UI.XRTable xrTableHeader;
private DevExpress.XtraReports.UI.XRTableRow xrTableRowHeader;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell37;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell39;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell47;
@@ -794,10 +806,26 @@ namespace Ruhrstern
private DevExpress.XtraReports.UI.XRTableCell xrTableCell51;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell17;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell29;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell18;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell30;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell52;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell31;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell32;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell33;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell34;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell36;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell38;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell40;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell41;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell42;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell43;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell44;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell45;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell46;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell49;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell50;
}
}

View File

@@ -21,6 +21,19 @@ namespace Ruhrstern
//var msb = new MitarbeiterstundenkontoBerechnungMonate();
msb.CreateReport(pRO);
// Für den Ausfallfaktor brauche ich die um die Feiertage korrigierten Summen der Sollzeiten
foreach (var ei in pRO.EmployeeInfoList)
{
decimal sollOhne = 0;
decimal sollMax = 0;
foreach (var ed in ei.EmployeeDetails)
{
sollOhne += ed.EmployeeDetail.Custom3;
sollMax += ed.EmployeeDetail.Custom4;
}
ei.Custom1 = (1 - (sollOhne) / sollMax) * 100;
}
this.bindingSource1.DataSource = pRO;
}
}

View File

@@ -108,6 +108,9 @@ namespace Ruhrstern
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.fieldRelationGesamt = new DevExpress.XtraReports.UI.CalculatedField();
this.ausfallFaktor = new DevExpress.XtraReports.UI.CalculatedField();
this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell();
this.calculatedField1 = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
@@ -147,6 +150,7 @@ namespace Ruhrstern
this.xrTableCell19,
this.xrTableCell20,
this.xrTableCell28,
this.xrTableCell32,
this.xrTableCell29,
this.xrTableCell16,
this.xrTableCell27,
@@ -170,7 +174,7 @@ namespace Ruhrstern
this.xrTableCell3.StylePriority.UsePadding = false;
this.xrTableCell3.StylePriority.UseTextAlignment = false;
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell3.Weight = 0.15329125338142471D;
this.xrTableCell3.Weight = 0.13992995045520576D;
//
// xrTableCell19
//
@@ -178,7 +182,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.StundenSollMax", "{0:0.00}")});
this.xrTableCell19.Name = "xrTableCell19";
this.xrTableCell19.Text = "xrTableCell19";
this.xrTableCell19.Weight = 0.0563404142404174D;
this.xrTableCell19.Weight = 0.057294782036470981D;
//
// xrTableCell20
//
@@ -186,15 +190,15 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.UrlaubUndKrankheit", "{0:0.00}")});
this.xrTableCell20.Name = "xrTableCell20";
this.xrTableCell20.Text = "xrTableCell20";
this.xrTableCell20.Weight = 0.073683568945783845D;
this.xrTableCell20.Weight = 0.064139793124313338D;
//
// xrTableCell28
//
this.xrTableCell28.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.StundenSollOhneUrlaubKrankheit", "{0:0.00}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.Custom2", "{0:0.00}")});
this.xrTableCell28.Name = "xrTableCell28";
this.xrTableCell28.Text = "xrTableCell28";
this.xrTableCell28.Weight = 0.06851733584608663D;
this.xrTableCell28.Weight = 0.056209364894545658D;
//
// xrTableCell29
//
@@ -203,7 +207,7 @@ namespace Ruhrstern
this.xrTableCell29.Multiline = true;
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.TextFormatString = "{0:0.00}";
this.xrTableCell29.Weight = 0.049429826143546227D;
this.xrTableCell29.Weight = 0.05515607486026828D;
//
// xrTableCell16
//
@@ -211,7 +215,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.FlsSoll", "{0:0.00}")});
this.xrTableCell16.Name = "xrTableCell16";
this.xrTableCell16.Text = "xrTableCell16";
this.xrTableCell16.Weight = 0.063119927862939587D;
this.xrTableCell16.Weight = 0.052621812205682586D;
//
// xrTableCell27
//
@@ -219,7 +223,7 @@ namespace Ruhrstern
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.FlsIst", "{0:0.00}")});
this.xrTableCell27.Name = "xrTableCell27";
this.xrTableCell27.Text = "xrTableCell27";
this.xrTableCell27.Weight = 0.063119927862939615D;
this.xrTableCell27.Weight = 0.05071304865330839D;
//
// xrTableCell22
//
@@ -303,6 +307,7 @@ namespace Ruhrstern
this.xrTableCell4,
this.xrTableCell2,
this.xrTableCell9,
this.xrTableCell31,
this.xrTableCell18,
this.xrTableCell8,
this.xrTableCell10,
@@ -324,46 +329,46 @@ namespace Ruhrstern
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.Text = "Monat";
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell5.Weight = 0.15329125016467182D;
this.xrTableCell5.Weight = 0.13992994732759739D;
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Text = "Reguläre SOLL Stunden";
this.xrTableCell4.Weight = 0.056340413100728473D;
this.xrTableCell4.Weight = 0.057294780890414655D;
//
// xrTableCell2
//
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Fehlzeiten Urlaub Krankheit(Tage)";
this.xrTableCell2.Weight = 0.073683560621139038D;
this.xrTableCell2.Weight = 0.064139791853409817D;
//
// xrTableCell9
//
this.xrTableCell9.Multiline = true;
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Text = "Tatsächliche SOLL Stunden";
this.xrTableCell9.Weight = 0.068517330288450334D;
this.xrTableCell9.Text = "Stunden aus Feier-tagen";
this.xrTableCell9.Weight = 0.056209368959342643D;
//
// xrTableCell18
//
this.xrTableCell18.Multiline = true;
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.Text = "Ausfall-faktor\r\n(in %)";
this.xrTableCell18.Weight = 0.049429848673525685D;
this.xrTableCell18.Weight = 0.055156069391776225D;
//
// xrTableCell8
//
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Text = "FLS Stunden SOLL";
this.xrTableCell8.Weight = 0.063119927721024038D;
this.xrTableCell8.Weight = 0.0526218121338088D;
//
// xrTableCell10
//
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.StylePriority.UseBackColor = false;
this.xrTableCell10.Text = "FLS IST lfd. Monat";
this.xrTableCell10.Weight = 0.063119927721024D;
this.xrTableCell10.Weight = 0.050713048594169516D;
//
// xrTableCell7
//
@@ -459,7 +464,7 @@ namespace Ruhrstern
this.xrTableCell35.StylePriority.UseTextAlignment = false;
this.xrTableCell35.Text = "Gesamt";
this.xrTableCell35.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell35.Weight = 0.15329126714047708D;
this.xrTableCell35.Weight = 0.13992995023412461D;
//
// xrTableCell37
//
@@ -469,12 +474,12 @@ namespace Ruhrstern
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell37.Summary = xrSummary1;
this.xrTableCell37.TextFormatString = "{0:0.00}";
this.xrTableCell37.Weight = 0.056340344339749715D;
this.xrTableCell37.Weight = 0.057294782036470981D;
//
// xrTableCell39
//
this.xrTableCell39.Name = "xrTableCell39";
this.xrTableCell39.Weight = 0.073683576156931774D;
this.xrTableCell39.Weight = 0.12034914307312086D;
//
// cellSollGesamt
//
@@ -484,19 +489,18 @@ namespace Ruhrstern
xrSummary2.FormatString = "{0:0.00}";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.cellSollGesamt.Summary = xrSummary2;
this.cellSollGesamt.Weight = 0.068517335846086616D;
this.cellSollGesamt.Weight = 0.0514374432201623D;
//
// xrTableCell30
//
this.xrTableCell30.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.Custom1")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.Custom1")});
this.xrTableCell30.Multiline = true;
this.xrTableCell30.Name = "xrTableCell30";
xrSummary3.Func = DevExpress.XtraReports.UI.SummaryFunc.Avg;
xrSummary3.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell30.Summary = xrSummary3;
this.xrTableCell30.TextFormatString = "{0:0.00}";
this.xrTableCell30.Weight = 0.049429875074013613D;
this.xrTableCell30.Weight = 0.055156130780802448D;
//
// cellFLSSollGesamt
//
@@ -506,7 +510,7 @@ namespace Ruhrstern
xrSummary4.FormatString = "{0:0.00}";
xrSummary4.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.cellFLSSollGesamt.Summary = xrSummary4;
this.cellFLSSollGesamt.Weight = 0.063119927862939587D;
this.cellFLSSollGesamt.Weight = 0.052621812205682572D;
//
// cellFLSIstGesamt
//
@@ -516,7 +520,7 @@ namespace Ruhrstern
xrSummary5.FormatString = "{0:0.00}";
xrSummary5.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.cellFLSIstGesamt.Summary = xrSummary5;
this.cellFLSIstGesamt.Weight = 0.063119927862939615D;
this.cellFLSIstGesamt.Weight = 0.050712992732774242D;
//
// cellFLSPlusMinusGesamt
//
@@ -753,6 +757,27 @@ namespace Ruhrstern
" *100\n";
this.ausfallFaktor.Name = "ausfallFaktor";
//
// xrTableCell31
//
this.xrTableCell31.Multiline = true;
this.xrTableCell31.Name = "xrTableCell31";
this.xrTableCell31.Text = "Tatsäch-liche SOLL Stunden";
this.xrTableCell31.Weight = 0.051437439140044339D;
//
// xrTableCell32
//
this.xrTableCell32.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.StundenSollOhneUrlaubKrankheit")});
this.xrTableCell32.Multiline = true;
this.xrTableCell32.Name = "xrTableCell32";
this.xrTableCell32.TextFormatString = "{0:0.00}";
this.xrTableCell32.Weight = 0.051437428053343032D;
//
// calculatedField1
//
this.calculatedField1.DataMember = "EmployeeInfoList";
this.calculatedField1.Name = "calculatedField1";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoMonateRO);
@@ -768,7 +793,8 @@ namespace Ruhrstern
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldFLS,
this.fieldRelationGesamt,
this.ausfallFaktor});
this.ausfallFaktor,
this.calculatedField1});
this.DataSource = this.bindingSource1;
this.DisplayName = "Mitarbeiterstundenkonto";
this.Landscape = true;
@@ -865,5 +891,8 @@ namespace Ruhrstern
private DevExpress.XtraReports.UI.XRTableCell xrTableCell18;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell30;
private DevExpress.XtraReports.UI.CalculatedField ausfallFaktor;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell32;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell31;
private DevExpress.XtraReports.UI.CalculatedField calculatedField1;
}
}

View File

@@ -11,6 +11,7 @@ using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace BeWo.Service.Core
{
@@ -67,8 +68,15 @@ namespace BeWo.Service.Core
var prop = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name];
lTenant = prop?.Headers["tenant"];
// Wenn kein Tenant gefunden wird,
if (string.IsNullOrWhiteSpace(lTenant))
if (string.IsNullOrWhiteSpace(lTenant) && prop is object)
{
var dict = HttpUtility.ParseQueryString(prop.QueryString);
lTenant = dict["Tenant"];
}
// Wenn kein Tenant gefunden wird,
if (string.IsNullOrWhiteSpace(lTenant))
{
throw new ArgumentException($"Zugriff verweigert. Tenant (\'{lTenant}\') darf nicht leer sein.", nameof(lTenant));
}

View File

@@ -545,6 +545,7 @@
<Compile Include="ServiceBehavior\WCFError\WCFErrorBehaviorExtension.cs" />
<Compile Include="ServiceBehavior\WCFError\WCFErrorHandler.cs" />
<Compile Include="ServiceContracts\Enhanced\IAccountingEnhancedService.cs" />
<Compile Include="ServiceContracts\Enhanced\IStatusService.cs" />
<Compile Include="ServiceContracts\IAccountingService.cs" />
<Compile Include="ServiceContracts\IAdminService.cs" />
<Compile Include="ServiceContracts\IAnalysisService.cs" />
@@ -569,6 +570,7 @@
<Compile Include="ServiceImplementations\AdminServiceImp.cs" />
<Compile Include="ServiceImplementations\AnalysisServiceImp.cs" />
<Compile Include="ServiceImplementations\Enhanced\AccountingEnhancedServiceImp.cs" />
<Compile Include="ServiceImplementations\Enhanced\StatusServiceImp.cs" />
<Compile Include="ServiceImplementations\GkvAccountingServiceImp.cs" />
<Compile Include="ServiceImplementations\MailServiceImp.cs" />
<Compile Include="ServiceImplementations\Enhanced\AiEnhancedServiceImp.cs" />

View File

@@ -0,0 +1,20 @@
using BeWo.Service.Attributes;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Web;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.ServiceContracts.Enhanced
{
[ServiceContract]
public interface IStatusService
{
[OperationContract]
[WebGet(UriTemplate = "/Status", ResponseFormat = WebMessageFormat.Json)]
ServerStatusDC GetStatus();
}
}

View File

@@ -0,0 +1,99 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Attributes;
using BeWo.Service.Core;
using BeWo.Service.ServiceContracts.Enhanced;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.ServiceImplementations.Enhanced
{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall,
ConcurrencyMode = ConcurrencyMode.Single)]
public class StatusServiceImp : IStatusService
{
public ServerStatusDC GetStatus()
{
var result = new ServerStatusDC
{
ServerTime = DateTime.Now.ToString("o"),
Version = Assembly.GetExecutingAssembly()
.GetName().Version?.ToString() ?? "unbekannt",
Services = new List<ServiceStatusDC>()
};
// Datenbankverbindung prüfen
result.DatabaseOk = CheckDatabase();
// Einzelne Subsysteme prüfen
result.Services.Add(CheckService("Database", result.DatabaseOk));
//result.Services.Add(CheckService("Mail", CheckMail()));
result.Services.Add(CheckService("AIModule", CheckAiModule()));
return result;
}
private bool CheckDatabase()
{
try
{
// Leichter DB-Ping z.B. eine einfache Abfrage über DAOFactory
DAOFactory.GenericDAO.GetAll<ApplicationUser>();
return true;
}
catch
{
return false;
}
}
private bool CheckMail()
{
try
{
// z.B. SMTP-Verbindung kurz aufbauen und sofort schließen
// Kann auch weggelassen / später ergänzt werden
return true;
}
catch
{
return false;
}
}
private bool CheckAiModule()
{
try
{
// #1
var configPath = ConfigReader.GetConfigPath(SpecialConfig.CustomPreSystemPrompt);
if (!File.Exists(configPath))
return false;
return true;
}
catch
{
return false;
}
}
private ServiceStatusDC CheckService(string name, bool ok)
{
return new ServiceStatusDC
{
Name = name,
IsOk = ok,
Message = ok ? "OK" : "Fehler"
};
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.DataContracts
{
[DataContract]
public class ServerStatusDC
{
[DataMember]
public string ServerTime { get; set; }
[DataMember]
public string Version { get; set; }
[DataMember]
public bool DatabaseOk { get; set; }
[DataMember]
public List<ServiceStatusDC> Services { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.DataContracts
{
[DataContract]
public class ServiceStatusDC
{
[DataMember]
public string Name { get; set; }
[DataMember]
public bool IsOk { get; set; }
[DataMember]
public string Message { get; set; }
}
}

View File

@@ -347,6 +347,8 @@
<Compile Include="DataContracts\CustomerTokenRelationDC.cs" />
<Compile Include="DataContracts\EmployeeTokenRelationDC.cs" />
<Compile Include="DataContracts\ChatBewoMessageSyncDC.cs" />
<Compile Include="DataContracts\ServerStatusDC.cs" />
<Compile Include="DataContracts\ServiceStatusDC.cs" />
<Compile Include="DataContracts\ValidationResultDC.cs" />
<Compile Include="DataContracts\StoredFileDC.cs" />
<Compile Include="DataContracts\VertreterSucheFilterDC.cs" />