Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -306,6 +306,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\GkvAbrechnungDetailControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Controls\MonthPicker.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -338,7 +342,7 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\Accounting\NewGkvAbrechnungPopUpView .xaml">
|
||||
<Page Include="View\Detail\Accounting\NewGkvAbrechnungPopUpView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
@@ -1073,6 +1077,9 @@
|
||||
<Compile Include="View\Controls\DPCtrlSoll.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlUrlaubKrankheit.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlZeitkonto.cs" />
|
||||
<Compile Include="View\Controls\GkvAbrechnungDetailControl.xaml.cs">
|
||||
<DependentUpon>GkvAbrechnungDetailControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\MonthPicker.xaml.cs">
|
||||
<DependentUpon>MonthPicker.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -1101,8 +1108,8 @@
|
||||
<Compile Include="View\Detail\Accounting\GkvAbrechnungOverview.xaml.cs">
|
||||
<DependentUpon>GkvAbrechnungOverview.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Accounting\NewGkvAbrechnungPopUpView .xaml.cs">
|
||||
<DependentUpon>NewGkvAbrechnungPopUpView .xaml</DependentUpon>
|
||||
<Compile Include="View\Detail\Accounting\NewGkvAbrechnungPopUpView.xaml.cs">
|
||||
<DependentUpon>NewGkvAbrechnungPopUpView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\DebugMessageLogView.xaml.cs">
|
||||
<DependentUpon>DebugMessageLogView.xaml</DependentUpon>
|
||||
|
||||
@@ -2046,12 +2046,14 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungViewFilterDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungRequestDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungResponseDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungViewFilterDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungRequestDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungResponseDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendRequestDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.MemoryStream))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.Stream))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.DateTime>))]
|
||||
@@ -6054,12 +6056,14 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungViewFilterDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungRequestDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnungResponseDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungViewFilterDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungRequestDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungResponseDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendRequestDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.MemoryStream))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.Stream))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.DateTime>))]
|
||||
@@ -9387,23 +9391,35 @@ namespace BeWo.ServiceProxy
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/InsertNewGkvAbrechnungen", ReplyAction="http://tempuri.org/IAccountingService/InsertNewGkvAbrechnungenResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/InsertNewGkvAbrechnungenBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<long> InsertNewGkvAbrechnungen(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC> dc);
|
||||
System.Collections.Generic.List<long> InsertNewGkvAbrechnungen(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> dc);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/GetGkvAbrechnungResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.GkvAbrechnungDC GetGkvAbrechnung(long oid);
|
||||
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC GetGkvAbrechnung(long oid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetAllGkvAbrechnungen", ReplyAction="http://tempuri.org/IAccountingService/GetAllGkvAbrechnungenResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetAllGkvAbrechnungenBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC> GetAllGkvAbrechnungen();
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetAllGkvAbrechnungen();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetFilteredGkvAbrechnungen", ReplyAction="http://tempuri.org/IAccountingService/GetFilteredGkvAbrechnungenResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetFilteredGkvAbrechnungenBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC> GetFilteredGkvAbrechnungen(BS.Shared.DataContracts.GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter);
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetFilteredGkvAbrechnungen(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/CreateNewGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/CreateNewGkvAbrechnungResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/CreateNewGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.GkvAbrechnungResponseDC CreateNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnungRequestDC request);
|
||||
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungResponseDC CreateNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungRequestDC request);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/UpdateGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/UpdateGkvAbrechnungResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/UpdateGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC UpdateGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/DeleteGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/DeleteGkvAbrechnungResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/DeleteGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void DeleteGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/SendNewGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/SendNewGkvAbrechnungResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/SendNewGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendRequestDC req);
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
||||
@@ -9595,30 +9611,45 @@ namespace BeWo.ServiceProxy
|
||||
base.Channel.StorniereInvoiceBases(invoices);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<long> InsertNewGkvAbrechnungen(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC> dc)
|
||||
public System.Collections.Generic.List<long> InsertNewGkvAbrechnungen(System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> dc)
|
||||
{
|
||||
return base.Channel.InsertNewGkvAbrechnungen(dc);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.GkvAbrechnungDC GetGkvAbrechnung(long oid)
|
||||
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC GetGkvAbrechnung(long oid)
|
||||
{
|
||||
return base.Channel.GetGkvAbrechnung(oid);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC> GetAllGkvAbrechnungen()
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetAllGkvAbrechnungen()
|
||||
{
|
||||
return base.Channel.GetAllGkvAbrechnungen();
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnungDC> GetFilteredGkvAbrechnungen(BS.Shared.DataContracts.GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter)
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC> GetFilteredGkvAbrechnungen(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter)
|
||||
{
|
||||
return base.Channel.GetFilteredGkvAbrechnungen(gkvAbrechnungViewFilter);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.GkvAbrechnungResponseDC CreateNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnungRequestDC request)
|
||||
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungResponseDC CreateNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungRequestDC request)
|
||||
{
|
||||
return base.Channel.CreateNewGkvAbrechnung(request);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC UpdateGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung)
|
||||
{
|
||||
return base.Channel.UpdateGkvAbrechnung(abrechnung);
|
||||
}
|
||||
|
||||
public void DeleteGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC abrechnung)
|
||||
{
|
||||
base.Channel.DeleteGkvAbrechnung(abrechnung);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungSendRequestDC req)
|
||||
{
|
||||
return base.Channel.SendNewGkvAbrechnung(req);
|
||||
}
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
||||
|
||||
@@ -86,6 +86,20 @@ namespace BeWo.ServiceProxy
|
||||
DoAsync<AccountingServiceClient, IAccountingService>(pAction, callback, true);
|
||||
}
|
||||
|
||||
public static T DoAccountingServiceSync<T>(Func<IAccountingService, T> pFunc)
|
||||
{
|
||||
try
|
||||
{
|
||||
return pFunc.Invoke(GetInstance<AccountingServiceClient, IAccountingService>());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public static void DoAnalysisServiceAsync<T>(Func<IAnalysisService, T> pFunc, Action<T> pCallBack)
|
||||
{
|
||||
DoAsync<AnalysisServiceClient, IAnalysisService, T>(pFunc, pCallBack, true);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
WindowStartupLocation="CenterOwner"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
ResizeMode="CanResizeWithGrip">
|
||||
ResizeMode="CanResizeWithGrip" Closing="Window_Closing" Closed="Window_Closed">
|
||||
<Grid>
|
||||
<GroupBox x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown" MouseDoubleClick="RootGroupBox_OnMouseDoubleClick">
|
||||
|
||||
|
||||
@@ -91,5 +91,15 @@ namespace BeWo.View
|
||||
WindowState = WindowState.Maximized;
|
||||
}
|
||||
}
|
||||
|
||||
public void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Window_Closed(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BeWo.View.Controls;
|
||||
using BeWo.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -24,7 +25,6 @@ namespace BeWo.View
|
||||
|
||||
return GetTextViewer(title, text, min_height, height, max_height, min_width, width, max_width);
|
||||
}
|
||||
|
||||
public static BeWoWindow GetTextViewer(string title, string text, double min_height, double height, double max_height, double min_width, double width, double max_width)
|
||||
{
|
||||
var control = new TextViewer();
|
||||
@@ -36,6 +36,16 @@ namespace BeWo.View
|
||||
return beWoWindow;
|
||||
}
|
||||
|
||||
public static BeWoWindow GetGkvAbrechnungDetailWindow(GkvAbrechnungVM vM, double height = 600, double width = 1200)
|
||||
{
|
||||
var detail = new GkvAbrechnungDetailControl(vM);
|
||||
|
||||
var beWoWindow = GetGenericBeWoWindow("Gkv Abrechnung Details", 100, height, 1000, 100, width, 1600);
|
||||
beWoWindow.GroupBoxContent = detail;
|
||||
|
||||
return beWoWindow;
|
||||
}
|
||||
|
||||
public static void ShowErrorMessageBox(string text)
|
||||
{
|
||||
MessageBox.Show(text, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
|
||||
|
||||
159
BeWo/View/Controls/GkvAbrechnungDetailControl.xaml
Normal file
159
BeWo/View/Controls/GkvAbrechnungDetailControl.xaml
Normal file
@@ -0,0 +1,159 @@
|
||||
<UserControl x:Class="BeWo.View.Controls.GkvAbrechnungDetailControl"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:BeWo.View.Controls"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl Background="#eeeeee" BorderThickness="0">
|
||||
<TabItem Header="Allgemein">
|
||||
<Grid Background="#eeeeee" Margin="0" HorizontalAlignment="Stretch" MaxWidth="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Margin="3" Content="Gkv Oid:"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding GkvAbrechnungOid}"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Margin="3" Content="IK Leistungserbringer:"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding IKLeistungserbringer}"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Margin="3" Content="IK Versichertenkarte:"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding IKVersichertenKarte}"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Margin="3" Content="IK Kostenträger:"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding IKKostenträger}"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" Margin="3" Content="IK Datenannahmestelle:"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding IKDatenannahmestelle}"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Margin="3" Content="Abrechnungsbeginn:"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding AbrechnungsZeitraumStart}"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Margin="3" Content="Abrechnungsende:"/>
|
||||
<TextBox Grid.Row="6" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding AbrechnungsZeitraumEnde}"/>
|
||||
<Label Grid.Row="7" Grid.Column="0" Margin="3" Content="Transfername:"/>
|
||||
<TextBox Grid.Row="7" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding Transfername}"/>
|
||||
<Label Grid.Row="8" Grid.Column="0" Margin="3" Content="Datenaustauschreferenz:"/>
|
||||
<TextBox Grid.Row="8" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding Datenaustauschreferenz}"/>
|
||||
<Label Grid.Row="9" Grid.Column="0" Margin="3" Content="Erstellt am:"/>
|
||||
<TextBox Grid.Row="9" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding ErstelltAm}"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Margin="3" Content="Dateigröße:"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding DateigrößeDisplayname}"/>
|
||||
<Label Grid.Row="14" Grid.Column="0" Margin="3" Content="Betrag:"/>
|
||||
<TextBox Grid.Row="14" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding Betrag, StringFormat={}{0:0.00 €}}"/>
|
||||
<Label Grid.Row="15" Grid.Column="0" Margin="3" Content="Bezahlt:"/>
|
||||
<CheckBox Grid.Row="15" Grid.Column="2" Margin="3" HorizontalAlignment="Left" x:Name="Checkbox_Bezahlt" IsChecked="{Binding Bezahlt}"/>
|
||||
<!--<TextBox Grid.Row="15" Grid.Column="2" Margin="3" IsReadOnly="True" Text="{Binding Bezahlt}"/>-->
|
||||
<Label Grid.Row="16" Grid.Column="0" Margin="3" Content="Bemerkung:"/>
|
||||
<TextBox Grid.Row="16" Grid.Column="2" Margin="3" Text="{Binding Notice}" x:Name="Textbox_Notice" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Protokoll">
|
||||
<dxg:GridControl Margin="3" x:Name="datagrid_transfer" DataSource="{Binding TransferProtokolle}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Dateiname" Header="Dateiname"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="PruftDatum" Header="Prüft am">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="g" Mask="c" MaskType="DateTime"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="PruftFehler" Header="Prüf Fehler"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="VerschlusseltDatum" Header="Verschlüsselt am">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="g" Mask="c" MaskType="DateTime"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="VerschlusseltFehler" Header="Verschlüsselt Fehler"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="UbertragDatum" Header="Übertrag am">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="g" Mask="c" MaskType="DateTime"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="UbertragFehler" Header="Übertrag Fehler"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AbsenderBezeichnung" Header="Absender Bezeichnung"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="EmpfangerBezeichnung" Header="Empfanger Bezeichnung"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Dateityp" Header="Dateityp"></dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" BestFitMode="Smart"
|
||||
AllowBestFit="True" ShowGroupPanel="False" ScrollingMode="Smart" SnapsToDevicePixels="True"
|
||||
Margin="3,22,3,3"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</TabItem>
|
||||
<TabItem x:Name="tabitem_rechnungen" Header="Enthaltene Rechnungen">
|
||||
<dxg:GridControl Margin="3" x:Name="datagrid_invoices" DataSource="{Binding InvoiceBases2}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" FieldName="ReportLink" Header=" ">
|
||||
<dxg:GridColumn.DisplayTemplate>
|
||||
<ControlTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Margin="1" ToolTip="Formular anzeigen" x:Name="btn_report" Height="20" Width="20" VerticalAlignment="Center">
|
||||
<TextBlock Padding="0">
|
||||
<Hyperlink TextDecorations="None" TargetName="_NewWindow" NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" RequestNavigate="Hyperlink_OnRequestNavigate">
|
||||
<TextBlock Padding="0" Text="¥" Foreground="#FFFFFF" FontSize="15" FontFamily="Webdings" Height="17" Width="16" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.DisplayTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TypeString" Header="Art der Rechnung" Width="150" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="CustomerName" Header="{markup:Translate Klient/in}" Width="100" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AccountingPeriodString" SortFieldName="AccountingPeriodStart" Header="Zeitraum" Width="100" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceNumber" Header="Nummer" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceDate" Header="Datum" EditSettings="{dxe:DateSettings DisplayFormat=d}" MinWidth="70" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Header="{markup:Translate EmpfängerSingular}" />
|
||||
<!--<dxg:GridColumn FieldName="AccountingPeriodString" Header="Abrechnungszeitraum" />-->
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TotalAmount" Header="Betrag" MinWidth="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Notice" Header="Bemerkung" MinWidth="200" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" x:Name="PaidColumn" FieldName="IsPaid" Header="Bezahlt"></dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" x:Name="gridView" BestFitMode="Smart"
|
||||
AllowBestFit="True" ShowGroupPanel="False" ScrollingMode="Smart" SnapsToDevicePixels="True"
|
||||
Loaded="gridView_Loaded"
|
||||
Margin="3,22,3,3" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</TabItem>
|
||||
<TabItem Header="Nutzdatendatei">
|
||||
<local:TextViewer Text="{Binding Nutzdatendatei, Mode=OneWay}"/>
|
||||
</TabItem>
|
||||
<TabItem Header="Auftragsdatei">
|
||||
<local:TextViewer Text="{Binding Auftragsdatei, Mode=OneWay}"/>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
54
BeWo/View/Controls/GkvAbrechnungDetailControl.xaml.cs
Normal file
54
BeWo/View/Controls/GkvAbrechnungDetailControl.xaml.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using BeWo.Core;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für GkvAbrechnungDetailControl.xaml
|
||||
/// </summary>
|
||||
public partial class GkvAbrechnungDetailControl : UserControl
|
||||
{
|
||||
public GkvAbrechnungVM GkvAbrechnungVM { get; set; }
|
||||
|
||||
public GkvAbrechnungDetailControl(GkvAbrechnungVM vm)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
GkvAbrechnungVM = vm;
|
||||
DataContext = vm;
|
||||
}
|
||||
|
||||
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
BeWoUtils.NavigateToReportUri(((Hyperlink)sender).NavigateUri.ToString(), "Druckvorschau");
|
||||
}
|
||||
|
||||
private void gridView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var tableView = sender as TableView;
|
||||
if (tableView != null)
|
||||
{
|
||||
foreach (var item in tableView.VisibleColumns)
|
||||
{
|
||||
tableView.BestFitColumn(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,20 +6,19 @@
|
||||
xmlns:local="clr-namespace:BeWo.View.Controls"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="3" Background="#252525">
|
||||
<!--<TextBlock x:Name="txt">
|
||||
|
||||
</TextBlock>-->
|
||||
<TextBox x:Name="txt" IsReadOnly="True" Text="test" Foreground="White" Background="Transparent" BorderThickness="0">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="3" Background="#eeeeee">
|
||||
<TextBox x:Name="txt" IsReadOnly="True" Text="test" Foreground="Black" Background="#f1f1f1" BorderThickness="1">
|
||||
|
||||
</TextBox>
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Row="1" Content="Inhalt in Zwischenablage kopieren" Click="Button_Click" Margin="3"/>
|
||||
|
||||
@@ -20,12 +20,29 @@ namespace BeWo.View.Controls
|
||||
/// </summary>
|
||||
public partial class TextViewer : UserControl
|
||||
{
|
||||
public static readonly DependencyProperty TextViewerTextProperty = DependencyProperty.Register(
|
||||
"Text",
|
||||
typeof(string),
|
||||
typeof(TextViewer),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var info = (string)e.NewValue;
|
||||
var textViewer = (TextViewer)s;
|
||||
|
||||
textViewer.txt.Text = info;
|
||||
}));
|
||||
|
||||
public TextViewer()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string Text { get => txt.Text; set => txt.Text = value; }
|
||||
public string Text
|
||||
{
|
||||
get => (string)GetValue(TextViewerTextProperty);
|
||||
set => SetValue(TextViewerTextProperty, value);
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -40,143 +40,72 @@
|
||||
</Grid>
|
||||
|
||||
<dxg:GridControl Margin="3" Grid.ColumnSpan="3" Grid.Row="1" DataSource="{Binding VMList}" x:Name="datagrid_gkvAbrechnungen" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" Width="auto" FieldName="ReportLink" Header=" ">
|
||||
<dxg:GridColumn.DisplayTemplate>
|
||||
<ControlTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--<Button Margin="1" ToolTip="Formular anzeigen" x:Name="btn_report" Height="20" Width="20" VerticalAlignment="Center">
|
||||
<TextBlock Padding="0">
|
||||
<Hyperlink TextDecorations="None" TargetName="_NewWindow" NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" RequestNavigate="Hyperlink_OnRequestNavigate">
|
||||
<TextBlock Padding="0" Text="¥" Foreground="#FFFFFF" FontSize="15" FontFamily="Webdings" Height="17" Width="16" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</Button>
|
||||
<Button Click="btn_edit_Click" Content="@" Padding="0" Margin="1" ToolTip="Editieren" Foreground="#FFFFFF" FontSize="13" FontFamily="Webdings" x:Name="btn_edit" Height="20" Width="20" VerticalAlignment="Center" />
|
||||
<Button Click="btn_storno_Click" Content="S" Padding="0" Margin="1" ToolTip="Stornieren" Foreground="#FFFFFF" FontSize="13" x:Name="btn_storno" Height="20" Width="20" VerticalAlignment="Center" Initialized="btn_storno_Initialized"/>
|
||||
<Button Click="btn_delete_Click" Content="r" Padding="0" Margin="1" ToolTip="Löschen" Foreground="#FF0000" FontSize="13" FontFamily="Webdings" x:Name="btn_delete" Height="20" Width="20" VerticalAlignment="Center" />-->
|
||||
<Button Click="btn_nutz_Click" Content="¥" Padding="0" Margin="1" ToolTip="Nutzdatendatei" Foreground="#00FF00" FontSize="13" FontFamily="Webdings" x:Name="btn_nutz" Height="15" Width="20" VerticalAlignment="Center" />
|
||||
<Button Click="btn_auf_Click" Content="¥" Padding="0" Margin="1" ToolTip="Auftragsdatei" Foreground="#00FF00" FontSize="13" FontFamily="Webdings" x:Name="btn_auf" Height="15" Width="20" VerticalAlignment="Center" />
|
||||
<UserControl Background="Transparent" Width="10"/>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30" Width="120" Visible="False"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" Width="70" FieldName="ReportLink" Header=" ">
|
||||
<dxg:GridColumn.DisplayTemplate>
|
||||
<ControlTemplate>
|
||||
<StackPanel Orientation="Horizontal" Margin="1">
|
||||
<Button Click="btn_details_Click" Content="¥" Padding="0" Margin="1" ToolTip="Details anzeigen" Foreground="#FFFFFF" FontSize="11" FontFamily="Webdings" x:Name="btn_details" Height="18" Width="20" VerticalAlignment="Center" />
|
||||
<!--<Button Click="btn_nutz_Click" Content="¥" Padding="0" Margin="1" ToolTip="Nutzdatendatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_nutz" Height="17" Width="20" VerticalAlignment="Center" />
|
||||
<Button Click="btn_auf_Click" Content="¥" Padding="0" Margin="1" ToolTip="Auftragsdatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_auf" Height="17" Width="20" VerticalAlignment="Center" />-->
|
||||
<Button Click="btn_send_Click" Content="*" Padding="0" Margin="1" ToolTip="Senden" Foreground="#FFFF00" FontSize="11" FontFamily="Wingdings" x:Name="btn_send" Height="18" Width="20" VerticalAlignment="Center" />
|
||||
<Button Click="btn_delete_Click" Content="r" Padding="0" Margin="1" ToolTip="Löschen" Foreground="#FF0000" FontSize="11" FontFamily="Webdings" x:Name="btn_delete" Height="18" Width="20" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.DisplayTemplate>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.DisplayTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="ErstelltAm" Header="Erstelldatum" Width="80">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="IKDatenannahmestelle" Header="Datenannahmestelle" Width="130" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="IKKostenträger" Header="Kostenträger" Width="130" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="IKVersichertenKarte" Header="VersichertenKarte" Width="130" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AbrechnungsZeitraumStart" Header="Abrechnungsbeginn" Width="120">
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Width="177" Header="{markup:Translate EmpfängerSingular}" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AbrechnungsZeitraumStart" Header="Abrechnungsbeginn" Width="116">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AbrechnungsZeitraumEnde" Header="Abrechnungsende" Width="120" >
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AbrechnungsZeitraumEnde" Header="Abrechnungsende" Width="107" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<!--<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="IKLeistungserbringer" Header="Leistungserbringer" Width="130" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>-->
|
||||
<!--<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Nutzdatendatei" Header="Nutzdatendatei" Width="80" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Auftragsdatei" Header="Auftragsdatei" Width="80" />-->
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Transfername" Header="Transfername" Width="80" >
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Transfername" Header="Transfername" Width="84" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Datenaustauschreferenz" Header="Referenz" Width="60" >
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Datenaustauschreferenz" Header="Referenz" Width="58" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Betrag" Header="Betrag" MinWidth="70">
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="DateigrößeDisplayname" Header="Dateigröße" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="ErstelltAm" Header="Erstelldatum" Width="120">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Betrag" Header="Betrag" MinWidth="74">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric" HorizontalContentAlignment="Right"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Notice" Header="Bemerkung" MinWidth="200" >
|
||||
<dxg:GridColumn FieldName="Notice" Header="Bemerkung" MinWidth="200" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="VerschluesseltAm" Header="Verschlüsselt" Width="80" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="UebertragenAm" Header="Übertragen" Width="80" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AntwortErhaltenAm" Header="Antwort erhalten" Width="80">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AntwortEntschluesseltAm" Header="Antwort entschlüsselt" Width="80" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<dxg:GridColumn x:Name="PaidColumn" FieldName="IsPaid" Header="Bezahlt"></dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" Loaded="gridView_Loaded" x:Name="gridView" BestFitMode="Smart"
|
||||
<dxg:GridColumn x:Name="PaidColumn" FieldName="Bezahlt" Header="Bezahlt" Width="50"></dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" Loaded="gridView_Loaded" x:Name="gridView" BestFitMode="Smart"
|
||||
AllowBestFit="True" ShowGroupPanel="False" ScrollingMode="Smart" SnapsToDevicePixels="True" ShownEditor="gridView_ShownEditor"
|
||||
CellValueChanging="gridView_CellValueChanged"
|
||||
CustomRowAppearance="TableView_OnCustomRowAppearance"
|
||||
Margin="3,22,3,3"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
|
||||
<Grid Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,2,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<WrapPanel>
|
||||
<Label FontSize="14" Foreground="{StaticResource GridPrintMenuLightBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10 0 0 0" Content="{Binding FilterResultAmountSum, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}Summe aller Rechnungen: {0:c}'}" />
|
||||
<Label FontSize="14" Foreground="{StaticResource GridPrintMenuLightBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 0 0" Content=" | " />
|
||||
<Label FontSize="14" x:Name="lblAmoutNotPaid" Foreground="{StaticResource GridPrintMenuLightBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 0 0" Content="{Binding FilterResultAmountNotPaidSum, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}Summe der noch offenen Rechnungen: {0:c}'}" />
|
||||
</WrapPanel>
|
||||
|
||||
|
||||
</Grid>
|
||||
<!--<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_checkAllLeistungen" Click="button_checkAll_Click"
|
||||
HorizontalAlignment="Left">Alle auswählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_uncheckAllLeistungen" Click="button_uncheckAll_Click"
|
||||
HorizontalAlignment="Left">Alle abwählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_aufklappenAllLeistungen" Click="button_printInvoices_Click"
|
||||
HorizontalAlignment="Left">Ausgewählte Rechnungen drucken</Button>
|
||||
|
||||
</StackPanel>-->
|
||||
Margin="3,22,3,3" CellValueChanged="gridView_CellValueChanged_1" RowMinHeight="24"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
@@ -12,12 +12,14 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Threading;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View.Controls;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Data.Filtering;
|
||||
using DevExpress.Mvvm;
|
||||
@@ -32,7 +34,6 @@ namespace BeWo.View.Detail.Accounting
|
||||
private readonly NewGkvAbrechnungPopUpView _NewGkvAbrechnungPopUpView;
|
||||
private readonly GkvAbrechnungListVM _Viewmodel;
|
||||
|
||||
|
||||
public GkvAbrechnungOverview(GkvAbrechnungListVM vm)
|
||||
{
|
||||
UpdateDataGridFilterCommand = new DelegateCommand(UpdateDataGridFilter);
|
||||
@@ -56,6 +57,8 @@ namespace BeWo.View.Detail.Accounting
|
||||
CheckRights();
|
||||
|
||||
RefreshGkvAbrechnungenList();
|
||||
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
|
||||
public DownloadLinkEngine DownloadLinkEngine { get; set; }
|
||||
@@ -72,19 +75,16 @@ namespace BeWo.View.Detail.Accounting
|
||||
}
|
||||
private void RefreshGkvAbrechnungenList()
|
||||
{
|
||||
var filter = new GkvAbrechnungViewFilterDC();
|
||||
var test = datagrid_gkvAbrechnungen;
|
||||
|
||||
//filter.FilterTime = ViewModel.DateTimeSpanFilter is object;
|
||||
//filter.Start = ViewModel.DateTimeSpanFilter?.StartDate;
|
||||
//filter.End = ViewModel.DateTimeSpanFilter?.EndDate;
|
||||
|
||||
//filter.FilterForInvoiceDate = radioFilterByInvoiceDate.IsChecked.Value;
|
||||
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(filter), UpdateGkvAbrechnungList);
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(null), UpdateGkvAbrechnungList);
|
||||
}
|
||||
private void UpdateDataGridFilter()
|
||||
{
|
||||
if(ShowAllInvoices)
|
||||
datagrid_gkvAbrechnungen.FixedFilter = null;
|
||||
gridView.BestFitColumns();
|
||||
|
||||
if (ShowAllInvoices)
|
||||
{
|
||||
datagrid_gkvAbrechnungen.FixedFilter = null;
|
||||
}
|
||||
@@ -118,8 +118,7 @@ namespace BeWo.View.Detail.Accounting
|
||||
(Action)delegate
|
||||
{
|
||||
_Viewmodel.UpdateList(dcList);
|
||||
this.gridView.BestFitColumns();
|
||||
//_Viewmodel.UpdateList(dcList);
|
||||
UpdateDataGridFilter();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -129,8 +128,18 @@ namespace BeWo.View.Detail.Accounting
|
||||
}
|
||||
private void NewGkvAbrechnungPopUpViewCreateButtonClicked(object sender, EventArgs<GkvAbrechnungDC> e)
|
||||
{
|
||||
MainControl.CloseCurrentPopUp();
|
||||
var checked_invoice_bases = _NewGkvAbrechnungPopUpView.ViewModel.InvoiceBases.Where(x => x.IsChecked).Select(x => x.DataContract.InvoiceBaseOid.Value).ToList();
|
||||
|
||||
if (checked_invoice_bases.Count == 0)
|
||||
{
|
||||
if (MessageBox.Show("Sie haben keine Rechnung hinzugefügt. Wollen Sie fortfahren?", "GKV-Abrechnung erstellen", MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
MainControl.CloseCurrentPopUp();
|
||||
|
||||
var gkv_abrechnung = e.Data;
|
||||
var gkv_filter = new GkvAbrechnungRequestDC(gkv_abrechnung);
|
||||
|
||||
@@ -157,17 +166,96 @@ namespace BeWo.View.Detail.Accounting
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
|
||||
private void btn_nutz_Click(object sender, RoutedEventArgs e)
|
||||
private void btn_details_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
BeWoWindowBuilder.GetTextViewer("Nutzdatei", vm.Nutzdatendatei, false, 600, 600).ShowDialog();
|
||||
var window = BeWoWindowBuilder.GetGkvAbrechnungDetailWindow(vm);
|
||||
|
||||
window.Closing += Detail_Window_Closing;
|
||||
|
||||
window.ShowDialog();
|
||||
}
|
||||
private void btn_auf_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
BeWoWindowBuilder.GetTextViewer("Auftragsdatei", vm.Auftragsdatei, false, 150, 1000).ShowDialog();
|
||||
private void Detail_Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
var bewo_window = sender as BeWoWindow;
|
||||
var detail_control = bewo_window.GroupBoxContent as GkvAbrechnungDetailControl;
|
||||
|
||||
var vm = detail_control.DataContext as GkvAbrechnungVM;
|
||||
|
||||
var checkbox_checked = detail_control.Checkbox_Bezahlt.IsChecked;
|
||||
var textbox_text = detail_control.Textbox_Notice.Text;
|
||||
|
||||
vm.Notice = textbox_text;
|
||||
|
||||
if (vm.IsDirty)
|
||||
{
|
||||
var dc = ServiceFacade.DoAccountingServiceSync(x => x.UpdateGkvAbrechnung(vm.CommitToDataContract()));
|
||||
vm.GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_send_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
string text = "Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung senden möchten?";
|
||||
|
||||
|
||||
|
||||
if (vm.TransferProtokolle != null && vm.TransferProtokolle.Any())
|
||||
{
|
||||
var last = vm.TransferProtokolle.Last();
|
||||
|
||||
var state = last.GetState();
|
||||
|
||||
if(state == 6)
|
||||
{
|
||||
text = "Die gewählte GKV-Abrechnung wurde bereits erfolgreich gesendet. Möchten Sie sie erneut senden?";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "Die gewählte GKV-Abrechnung wurde nicht erfolgreich gesendet. Möchten Sie sie erneut senden?";
|
||||
}
|
||||
}
|
||||
|
||||
if (MessageBox.Show(text, "GKV-Abrechnung senden", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
{
|
||||
var req = new GkvAbrechnungSendRequestDC();
|
||||
|
||||
req.GkvAbrechnungDC = vm.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.SendNewGkvAbrechnung(req),
|
||||
cb =>
|
||||
{
|
||||
Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() =>
|
||||
{
|
||||
if (cb.Successful)
|
||||
{
|
||||
var dc = cb.GkvAbrechnungDC;
|
||||
|
||||
vm.GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
|
||||
vm.UpdateGkvTransferProtokoll(dc.TransferProtokolle.ToList());
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(cb.Message);
|
||||
}
|
||||
}));
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
private void btn_delete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung löschen möchten?", "GKV-Abrechnung löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
{
|
||||
_Viewmodel.VMList.Remove(vm);
|
||||
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.DeleteGkvAbrechnung(vm.CommitToDataContract()));
|
||||
}
|
||||
}
|
||||
private void NewButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -181,7 +269,6 @@ namespace BeWo.View.Detail.Accounting
|
||||
_NewGkvAbrechnungPopUpView.ViewModel = gkvAbrechnungVM;
|
||||
this.MainControl.ShowControlAsModalPopup(this._NewGkvAbrechnungPopUpView);
|
||||
}
|
||||
|
||||
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RefreshGkvAbrechnungenList();
|
||||
@@ -201,11 +288,11 @@ namespace BeWo.View.Detail.Accounting
|
||||
}
|
||||
private void gridView_CellValueChanged(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
if (e.Column != null && e.Column.FieldName == "IsPaid")
|
||||
if (e.Column != null && e.Column.FieldName == "Bezahlt")
|
||||
{
|
||||
if (e.Value is bool b && e.Row is GkvAbrechnungVM vm)
|
||||
{
|
||||
// SaveIsPaidChange(vm, b);
|
||||
SaveBezahltChange(vm, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -229,148 +316,35 @@ namespace BeWo.View.Detail.Accounting
|
||||
UpdateDataGridFilter();
|
||||
}
|
||||
|
||||
//private void btn_delete_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// mIgnoreCheckChanges = true;
|
||||
// var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
// if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung löschen möchten?", "GKV-Abrechnung löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
// {
|
||||
// this.ViewModel.VMList.Remove(vm);
|
||||
// //ServiceFacade.DoAccountingServiceAsync(s => s.DeactivateInvoiceBases(new[] { vm.DataContract }.ToList()));
|
||||
// }
|
||||
// mIgnoreCheckChanges = false;
|
||||
//}
|
||||
//private void btn_storno_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// mIgnoreCheckChanges = true;
|
||||
// var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
|
||||
// if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung stornieren möchten?", "GKV-Abrechnung stornieren", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
||||
// {
|
||||
// /*
|
||||
// ServiceFacade.DoAccountingServiceAsync(s => s.StorniereInvoiceBases(new[] { vm.DataContract }.ToList()),
|
||||
// () => this.Dispatch(
|
||||
// delegate
|
||||
// {
|
||||
// RefreshInvoiceList();
|
||||
// }));
|
||||
// */
|
||||
// }
|
||||
|
||||
// mIgnoreCheckChanges = false;
|
||||
//}
|
||||
//private void btn_edit_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
|
||||
//}
|
||||
|
||||
|
||||
//private void btn_storno_Initialized(object sender, EventArgs e)
|
||||
//{
|
||||
// if (!BeWoApp.AppSettings.AllowStorno)
|
||||
// {
|
||||
// Button btn = sender as Button;
|
||||
// btn.Visibility = Visibility.Collapsed;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//private void RefreshItemInList(GkvAbrechnungDC cb)
|
||||
//{
|
||||
// this.Dispatch(
|
||||
// delegate
|
||||
// {
|
||||
// var old = this.ViewModel.VMList.Single(i => i.DataContract.GkvAbrechnungOid.Equals(cb.GkvAbrechnungOid));
|
||||
// var lNew = new GkvAbrechnungVM(cb);
|
||||
|
||||
// this.ViewModel.VMList.Remove(old);
|
||||
// this.ViewModel.VMList.Add(lNew);
|
||||
// this.datagrid_gkvAbrechnungen.RefreshData();
|
||||
// this.gridView.FocusedRow = lNew;
|
||||
// });
|
||||
//}
|
||||
|
||||
/*
|
||||
private void SaveIsPaidChange(InvoiceBaseVM vm, bool isPaid)
|
||||
private void SaveBezahltChange(GkvAbrechnungVM vm, bool b)
|
||||
{
|
||||
if (!mIgnoreCheckChanges)
|
||||
{
|
||||
vm.IsPaid = isPaid;
|
||||
var dc_in = vm.CommitToDataContract();
|
||||
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.SetInvoicePaid(new[] { vm.CommitToDataContract() }.ToList(), vm.IsPaid), cb => vm.DataContract.InvoiceBaseVersion = cb[0], false);
|
||||
dc_in.Bezahlt = b;
|
||||
|
||||
var dc = ServiceFacade.DoAccountingServiceSync(x => x.UpdateGkvAbrechnung(dc_in));
|
||||
|
||||
vm.GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
|
||||
vm.Bezahlt = dc.Bezahlt;
|
||||
}
|
||||
|
||||
private void SaveNoticeChange(GkvAbrechnungVM vm, string notice)
|
||||
{
|
||||
var dc = ServiceFacade.DoAccountingServiceSync(x => x.UpdateGkvAbrechnung(vm.CommitToDataContract()));
|
||||
|
||||
vm.GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
|
||||
vm.Notice = dc.Notice;
|
||||
}
|
||||
|
||||
private void gridView_CellValueChanged_1(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
if (e.Column != null && e.Column.FieldName == "Notice")
|
||||
{
|
||||
if (e.Value is string s && e.Row is GkvAbrechnungVM vm)
|
||||
{
|
||||
SaveNoticeChange(vm, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//private void button_checkAll_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var visible = GetVisibleVMs();
|
||||
// foreach (var item in visible)
|
||||
// {
|
||||
// item.IsChecked = true;
|
||||
// }
|
||||
//}
|
||||
//private void button_uncheckAll_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var visible = GetVisibleVMs();
|
||||
// foreach (var item in visible)
|
||||
// {
|
||||
// item.IsChecked = false;
|
||||
// }
|
||||
//}
|
||||
//private void button_printInvoices_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// var list = new List<GkvAbrechnungVM>();
|
||||
|
||||
// var items = datagrid_gkvAbrechnungen.ItemsSource as IList<GkvAbrechnungVM>;
|
||||
|
||||
// if (items != null)
|
||||
// {
|
||||
// for (int i = 0; i < items.Count; i++)
|
||||
// {
|
||||
// var vm = datagrid_gkvAbrechnungen.GetRow(i) as GkvAbrechnungVM;
|
||||
// /*
|
||||
// if (vm != null && vm.IsChecked)
|
||||
// {
|
||||
// list.Add(vm);
|
||||
// }
|
||||
// */
|
||||
// }
|
||||
// }
|
||||
|
||||
// // PrintInvoices(list);
|
||||
//}
|
||||
|
||||
//private void PrintInvoices(List<InvoiceBaseVM> list)
|
||||
//{
|
||||
// var oidList = list.Select(i => i.DataContract.InvoiceBaseOid.Value).ToList();
|
||||
|
||||
// ServiceFacade.DoReportServiceAsync(s => s.CreateInvoiceListReport(oidList), ms => BeWoApp.MainControl.Dispatch(() => BeWoUtils.ShowReportWindow(ms, "Rechnungen")));
|
||||
//}
|
||||
//private IList<GkvAbrechnungVM> GetVisibleVMs()
|
||||
//{
|
||||
// var list = new List<GkvAbrechnungVM>();
|
||||
|
||||
// var items = datagrid_gkvAbrechnungen.ItemsSource as IList<GkvAbrechnungVM>;
|
||||
|
||||
// if (items != null)
|
||||
// {
|
||||
// for (int i = 0; i < items.Count; i++)
|
||||
// {
|
||||
// if (datagrid_gkvAbrechnungen.IsRowVisible(i))
|
||||
// {
|
||||
// var vm = datagrid_gkvAbrechnungen.GetRow(i) as GkvAbrechnungVM;
|
||||
// if (vm != null)
|
||||
// {
|
||||
// list.Add(vm);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return list;
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,19 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.InvoiceOverview" xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View" xmlns:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting" xmlns:val="clr-namespace:BeWo.Validation" xmlns:proxy="clr-namespace:BeWo.ServiceProxy" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security" VerticalAlignment="Stretch" Focusable="True" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.InvoiceOverview"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:r="clr-namespace:BeWo.Security" VerticalAlignment="Stretch" Focusable="True"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
|
||||
|
||||
<Grid>
|
||||
<GroupBox x:Name="groupbox_editArea" Grid.Row="0" Header="Rechnungsübersicht" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
|
||||
@@ -365,8 +365,6 @@ namespace BeWo.View.Detail.Accounting
|
||||
e.Result = new SolidColorBrush((Color)ColorConverter.ConvertFromString(ib.BackgroundColor));
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//var data = srGridControl.rowhan
|
||||
|
||||
@@ -1,120 +1,120 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.NewGkvAbrechnungPopUpView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:val="clr-namespace:BeWo.Validation" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto"
|
||||
HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security"
|
||||
VerticalAlignment="Stretch" Focusable="True"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic" xmlns:localSearchView="clr-namespace:BeWo.View.Search">
|
||||
<GroupBox Width="1100" Style="{StaticResource PopUpWindowStyle}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
|
||||
<Image Source="..\..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
|
||||
<TextBox Margin="10,4,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
|
||||
FontSize="20" BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0"
|
||||
Padding="0,0,0,0" />
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<GroupBox Margin="10" Header="GKV-Abrechnung erstellen" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<AccessText Margin="2">Es wird eine GKV-Abrechnung für die in der Tabelle selektierten Rechnungen erstellt.</AccessText>
|
||||
<AccessText Margin="2">Rechnungen, die nicht enthalten sein sollen bitte ggf. deselektieren.</AccessText>
|
||||
<AccessText Margin="2">Anschließend bitte auf "Erstellen" klicken.</AccessText>
|
||||
</StackPanel>
|
||||
</Label>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="90" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="Rechnungszeitraum von" Grid.Row="0" Grid.Column="0" />
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Height="23" Margin="3" Grid.Row="0" Grid.Column="1" EditValue="{val:ValidationBinding Path=AbrechnungsZeitraumStart}" EditValueChanged="DateEdit_EditValueChanged"/>
|
||||
<Label Content="Rechnungszeitraum bis" Grid.Row="1" Grid.Column="0" />
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Height="23" Margin="3" Grid.Row="1" Grid.Column="1" EditValue="{val:ValidationBinding Path=AbrechnungsZeitraumEnde}" EditValueChanged="DateEdit2_EditValueChanged"/>
|
||||
<!--<Label Content="Annahmestelle" Grid.Row="0" Grid.Column="2" />
|
||||
<uc:PopUpEdit IsReadOnly="True"
|
||||
x:Name="popupedit_DatenannahmestelleSearch"
|
||||
Grid.Column="3" Margin="3" Height="23" Grid.Row="0"
|
||||
DeleteButtonVisibility="Collapsed"
|
||||
PopUpClick="popupedit_DatenannahmestelleSearch_PopUpClick" />-->
|
||||
<Label Content="Organisation" Grid.Row="0" Grid.Column="2" />
|
||||
<uc:PopUpEdit IsReadOnly="True"
|
||||
x:Name="popupedit_GkvSearch"
|
||||
Grid.Column="3" Margin="3" Height="23" Grid.Row="0"
|
||||
DeleteButtonVisibility="Collapsed"
|
||||
PopUpClick="popupedit_GkvSearch_PopUpClick" />
|
||||
<Label Content="Bemerkung" Grid.Row="0" Grid.Column="4" />
|
||||
<TextBox Grid.Row="0" Grid.Column="5" Grid.RowSpan="2" Margin="3" AcceptsReturn="True" TextWrapping="Wrap" Height="50" Text="{Binding Notice}" />
|
||||
</Grid>
|
||||
|
||||
<dxg:GridControl x:Name="grid_newInvoices" DataSource="{Binding InvoiceBases}" Margin="3" Grid.Row="1" Grid.ColumnSpan="2" MinHeight="200">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TypeString" Header="Art der Rechnung" Width="150" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceNumber" Header="Nummer" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceDate" Header="Datum" EditSettings="{dxe:DateSettings DisplayFormat=d}" MinWidth="70" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="CustomerName" Header="{markup:Translate Klient/in}" Width="100" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AccountingPeriodString" SortFieldName="AccountingPeriodStart" Header="Zeitraum" Width="100" />
|
||||
<!--<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Header="{markup:Translate EmpfängerSingular}" />-->
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TotalAmount" Header="Betrag" MinWidth="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Notice" Header="Bemerkung" MinWidth="200" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="PaidColumn" FieldName="IsPaid" Header="Bezahlt"></dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View >
|
||||
<dxg:TableView x:Name="gridView" ShowGroupPanel="False" CellValueChanging="TableView_CellValueChanging"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_checkAllLeistungen" Click="button_checkAll_Click"
|
||||
HorizontalAlignment="Left">Alle auswählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_uncheckAllLeistungen" Click="button_uncheckAll_Click"
|
||||
HorizontalAlignment="Left">Alle abwählen</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<Button Content="Erstellen" x:Name="btn_create" Click="btn_create_Click" Padding="5 0" Margin="3" />
|
||||
<Button Content="Abbrechen" x:Name="btn_cancel" Click="btn_cancel_Click" Margin="3" Padding="5 0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<Popup Margin="10" x:Name="popup_organisation" StaysOpen="False" Placement="MousePoint" Width="370" Height="250" Closed="popup_Closed" Opened="popup_Opened">
|
||||
<localSearchView:OrganisationSearchView SearchMode="All" x:Name="gkvsearchview" />
|
||||
</Popup>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.NewGkvAbrechnungPopUpView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:val="clr-namespace:BeWo.Validation" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto"
|
||||
HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security"
|
||||
VerticalAlignment="Stretch" Focusable="True"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic" xmlns:localSearchView="clr-namespace:BeWo.View.Search">
|
||||
<GroupBox Width="1100" Style="{StaticResource PopUpWindowStyle}">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
|
||||
<Image Source="..\..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
|
||||
<TextBox Margin="10,4,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
|
||||
FontSize="20" BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0"
|
||||
Padding="0,0,0,0" />
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<GroupBox Margin="10" Header="GKV-Abrechnung erstellen" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<AccessText Margin="2">Es wird eine GKV-Abrechnung für die in der Tabelle selektierten Rechnungen erstellt.</AccessText>
|
||||
<AccessText Margin="2">Rechnungen, die nicht enthalten sein sollen bitte ggf. deselektieren.</AccessText>
|
||||
<AccessText Margin="2">Anschließend bitte auf "Erstellen" klicken.</AccessText>
|
||||
</StackPanel>
|
||||
</Label>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="90" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="Rechnungszeitraum von" Grid.Row="0" Grid.Column="0" />
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Height="23" Margin="3" Grid.Row="0" Grid.Column="1" EditValue="{val:ValidationBinding Path=AbrechnungsZeitraumStart}" EditValueChanged="DateEdit_EditValueChanged"/>
|
||||
<Label Content="Rechnungszeitraum bis" Grid.Row="1" Grid.Column="0" />
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Height="23" Margin="3" Grid.Row="1" Grid.Column="1" EditValue="{val:ValidationBinding Path=AbrechnungsZeitraumEnde}" EditValueChanged="DateEdit2_EditValueChanged"/>
|
||||
<!--<Label Content="Annahmestelle" Grid.Row="0" Grid.Column="2" />
|
||||
<uc:PopUpEdit IsReadOnly="True"
|
||||
x:Name="popupedit_DatenannahmestelleSearch"
|
||||
Grid.Column="3" Margin="3" Height="23" Grid.Row="0"
|
||||
DeleteButtonVisibility="Collapsed"
|
||||
PopUpClick="popupedit_DatenannahmestelleSearch_PopUpClick" />-->
|
||||
<Label Content="Organisation" Grid.Row="0" Grid.Column="2" />
|
||||
<uc:PopUpEdit IsReadOnly="True"
|
||||
x:Name="popupedit_GkvSearch"
|
||||
Grid.Column="3" Margin="3" Height="23" Grid.Row="0"
|
||||
DeleteButtonVisibility="Collapsed"
|
||||
PopUpClick="popupedit_GkvSearch_PopUpClick" />
|
||||
<Label Content="Bemerkung" Grid.Row="0" Grid.Column="4" />
|
||||
<TextBox Grid.Row="0" Grid.Column="5" Grid.RowSpan="2" Margin="3" AcceptsReturn="True" TextWrapping="Wrap" Height="50" Text="{Binding Notice}" />
|
||||
</Grid>
|
||||
|
||||
<dxg:GridControl x:Name="grid_newInvoices" DataSource="{Binding InvoiceBases}" Margin="3" Grid.Row="1" Grid.ColumnSpan="2" MinHeight="200">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TypeString" Header="Art der Rechnung" Width="150" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceNumber" Header="Nummer" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceDate" Header="Datum" EditSettings="{dxe:DateSettings DisplayFormat=d}" MinWidth="70" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="CustomerName" Header="{markup:Translate Klient/in}" Width="100" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AccountingPeriodString" SortFieldName="AccountingPeriodStart" Header="Zeitraum" Width="100" />
|
||||
<!--<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Header="{markup:Translate EmpfängerSingular}" />-->
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TotalAmount" Header="Betrag" MinWidth="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Notice" Header="Bemerkung" MinWidth="200" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="PaidColumn" FieldName="IsPaid" Header="Bezahlt" ReadOnly="True"></dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View >
|
||||
<dxg:TableView x:Name="gridView" ShowGroupPanel="False" CellValueChanging="TableView_CellValueChanging"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_checkAllLeistungen" Click="button_checkAll_Click"
|
||||
HorizontalAlignment="Left">Alle auswählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_uncheckAllLeistungen" Click="button_uncheckAll_Click"
|
||||
HorizontalAlignment="Left">Alle abwählen</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<Button Content="Erstellen" x:Name="btn_create" Click="btn_create_Click" Padding="5 0" Margin="3" />
|
||||
<Button Content="Abbrechen" x:Name="btn_cancel" Click="btn_cancel_Click" Margin="3" Padding="5 0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<Popup Margin="10" x:Name="popup_organisation" StaysOpen="False" Placement="MousePoint" Width="370" Height="250" Closed="popup_Closed" Opened="popup_Opened">
|
||||
<localSearchView:OrganisationSearchView SearchMode="All" x:Name="gkvsearchview" />
|
||||
</Popup>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</localView:BeWoView>
|
||||
@@ -1,237 +1,238 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Xpf.Grid;
|
||||
|
||||
namespace BeWo.View.Detail.Accounting
|
||||
{
|
||||
public partial class NewGkvAbrechnungPopUpView : BeWoView
|
||||
{
|
||||
private long? _LoadedInvoiceBaseOid;
|
||||
|
||||
private List<InvoiceBaseDC> _InvoiceBaseDCs;
|
||||
|
||||
private List<string> _InvoiceNumbers;
|
||||
|
||||
private GkvAbrechnungVM _Viewmodel;
|
||||
|
||||
public event EventHandler<EventArgs<GkvAbrechnungDC>> CreateButtonClicked;
|
||||
|
||||
public event EventHandler CancelButtonClicked;
|
||||
|
||||
public NewGkvAbrechnungPopUpView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close,
|
||||
(s, e) =>
|
||||
{
|
||||
this._InvoiceBaseDCs?.Clear();
|
||||
if (CancelButtonClicked != null)
|
||||
CancelButtonClicked.Invoke(s, e);
|
||||
}));
|
||||
|
||||
this.grid_newInvoices.View.Loaded += (s, e) => ((TableView)this.grid_newInvoices.View).BestFitColumns();
|
||||
}
|
||||
|
||||
|
||||
public GkvAbrechnungVM ViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Viewmodel;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.DataContext = value;
|
||||
this._Viewmodel = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<InvoiceBaseDC> InvoiceBaseDcs
|
||||
{
|
||||
set
|
||||
{
|
||||
this._InvoiceNumbers = value.Select(i => i.InvoiceNumber).ToList();
|
||||
this._InvoiceBaseDCs = new List<InvoiceBaseDC>(value);
|
||||
this.grid_newInvoices.ItemsSource = this._InvoiceBaseDCs;
|
||||
}
|
||||
}
|
||||
|
||||
private void Fire()
|
||||
{
|
||||
if (this.CreateButtonClicked != null)
|
||||
{
|
||||
if (_InvoiceBaseDCs == null)
|
||||
_InvoiceBaseDCs = new List<InvoiceBaseDC>();
|
||||
|
||||
for (int i = 0; i < _InvoiceBaseDCs.Count; i++)
|
||||
{
|
||||
_InvoiceBaseDCs[i].InvoiceNumber = this._InvoiceNumbers[i];
|
||||
}
|
||||
|
||||
var gkvAbrechnung = ViewModel.CommitToDataContract();
|
||||
|
||||
this.CreateButtonClicked(this, new EventArgs<GkvAbrechnungDC>(gkvAbrechnung));
|
||||
}
|
||||
}
|
||||
public void Clear()
|
||||
{
|
||||
_LoadedInvoiceBaseOid = null;
|
||||
popupedit_GkvSearch.Text = string.Empty;
|
||||
popupedit_GkvSearch.Focus();
|
||||
}
|
||||
|
||||
private void btn_cancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ViewModel.InvoiceBases != null)
|
||||
ViewModel.InvoiceBases.Clear();
|
||||
this.CancelButtonClicked(this, e);
|
||||
}
|
||||
private void btn_create_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Fire();
|
||||
}
|
||||
|
||||
private void TableView_CellValueChanging(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
var si = e.Row as InvoiceBaseDC;
|
||||
if (e.Column.FieldName.Contains("NeuErstellen") && ((bool)e.Value))
|
||||
{
|
||||
if (si.DiffErstellen)
|
||||
{
|
||||
si.DiffErstellen = false;
|
||||
grid_newInvoices.RefreshData();
|
||||
}
|
||||
}
|
||||
else if (e.Column.FieldName.Contains("DiffErstellen") && ((bool)e.Value))
|
||||
{
|
||||
if (si.NeuErstellen)
|
||||
{
|
||||
si.NeuErstellen = false;
|
||||
grid_newInvoices.RefreshData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void popupedit_GkvSearch_PopUpClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
gkvsearchview.ItemSelected += gkvsearchview_OrganisationSelected;
|
||||
popup_organisation.IsOpen = true;
|
||||
}
|
||||
private void gkvsearchview_OrganisationSelected(object sender, EventArgs<CompactOrganisationDC> e)
|
||||
{
|
||||
popup_organisation.IsOpen = false;
|
||||
gkvsearchview.ItemSelected -= gkvsearchview_OrganisationSelected;
|
||||
|
||||
ViewModel.IKKostenträger = e.Data.IKKostentrager;
|
||||
ViewModel.IKVersichertenKarte = e.Data.IKKrankenkasse;
|
||||
ViewModel.IKDatenannahmestelle = e.Data.IKDatenannahmestelle;
|
||||
|
||||
popupedit_GkvSearch.Text = e.Data.ToString();
|
||||
popupedit_GkvSearch.Focus();
|
||||
|
||||
RefreshInvoiceBases(e.Data.OrganisationOid);
|
||||
}
|
||||
|
||||
private void RefreshInvoiceBases() => RefreshInvoiceBases(_LoadedInvoiceBaseOid);
|
||||
private void RefreshInvoiceBases(DateTime? start, DateTime? ende) => RefreshInvoiceBases(_LoadedInvoiceBaseOid, start ?? ViewModel?.AbrechnungsZeitraumStart, ende ?? ViewModel?.AbrechnungsZeitraumEnde);
|
||||
private void RefreshInvoiceBases(long? costOid) => RefreshInvoiceBases(costOid, ViewModel?.AbrechnungsZeitraumStart, ViewModel?.AbrechnungsZeitraumEnde);
|
||||
private void RefreshInvoiceBases(long? costOid, DateTime? start, DateTime? ende)
|
||||
{
|
||||
if (costOid != null && start != null && ende != null && ende >= start)
|
||||
{
|
||||
_LoadedInvoiceBaseOid = costOid;
|
||||
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.GetInvoiceBasesForCostBearerAndId(start, ende, (long)costOid, "RechnungSoziotherapie"), UpdateInvoiceList);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateInvoiceList(IList<InvoiceBaseDC> dcList)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
BindingList <InvoiceBaseVM> invoiceBaseVMs = new BindingList<InvoiceBaseVM>();
|
||||
foreach (var invoiceBaseDC in dcList)
|
||||
{
|
||||
InvoiceBaseVM invoiceBaseVM = new InvoiceBaseVM(invoiceBaseDC);
|
||||
invoiceBaseVM.IsChecked = false;
|
||||
invoiceBaseVMs.Add(invoiceBaseVM);
|
||||
}
|
||||
ViewModel.InvoiceBases = invoiceBaseVMs;
|
||||
grid_newInvoices.ItemsSource = ViewModel.InvoiceBases;
|
||||
this.gridView.BestFitColumns();
|
||||
});
|
||||
}
|
||||
|
||||
private void popupedit_DatenannahmestelleSearch_PopUpClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// tbd
|
||||
}
|
||||
|
||||
private void button_checkAll_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var visible = GetVisibleVMs();
|
||||
foreach (var item in visible)
|
||||
{
|
||||
item.IsChecked = true;
|
||||
}
|
||||
}
|
||||
private void button_uncheckAll_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var visible = GetVisibleVMs();
|
||||
foreach (var item in visible)
|
||||
{
|
||||
item.IsChecked = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private IList<InvoiceBaseVM> GetVisibleVMs()
|
||||
{
|
||||
var list = new List<InvoiceBaseVM>();
|
||||
|
||||
var items = grid_newInvoices.ItemsSource as IList<InvoiceBaseVM>;
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (grid_newInvoices.IsRowVisible(i))
|
||||
{
|
||||
var vm = grid_newInvoices.GetRow(i) as InvoiceBaseVM;
|
||||
if (vm != null)
|
||||
{
|
||||
list.Add(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private void DateEdit_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
{
|
||||
RefreshInvoiceBases((DateTime)e.NewValue, null);
|
||||
}
|
||||
|
||||
private void DateEdit2_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
{
|
||||
RefreshInvoiceBases(null, (DateTime)e.NewValue);
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Xpf.Grid;
|
||||
|
||||
namespace BeWo.View.Detail.Accounting
|
||||
{
|
||||
public partial class NewGkvAbrechnungPopUpView : BeWoView
|
||||
{
|
||||
private long? _LoadedInvoiceBaseOid;
|
||||
|
||||
private List<InvoiceBaseDC> _InvoiceBaseDCs;
|
||||
|
||||
private List<string> _InvoiceNumbers;
|
||||
|
||||
private GkvAbrechnungVM _Viewmodel;
|
||||
|
||||
public event EventHandler<EventArgs<GkvAbrechnungDC>> CreateButtonClicked;
|
||||
|
||||
public event EventHandler CancelButtonClicked;
|
||||
|
||||
public NewGkvAbrechnungPopUpView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close,
|
||||
(s, e) =>
|
||||
{
|
||||
this._InvoiceBaseDCs?.Clear();
|
||||
if (CancelButtonClicked != null)
|
||||
CancelButtonClicked.Invoke(s, e);
|
||||
}));
|
||||
|
||||
this.grid_newInvoices.View.Loaded += (s, e) => ((TableView)this.grid_newInvoices.View).BestFitColumns();
|
||||
}
|
||||
|
||||
|
||||
public GkvAbrechnungVM ViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Viewmodel;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.DataContext = value;
|
||||
this._Viewmodel = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<InvoiceBaseDC> InvoiceBaseDcs
|
||||
{
|
||||
set
|
||||
{
|
||||
this._InvoiceNumbers = value.Select(i => i.InvoiceNumber).ToList();
|
||||
this._InvoiceBaseDCs = new List<InvoiceBaseDC>(value);
|
||||
this.grid_newInvoices.ItemsSource = this._InvoiceBaseDCs;
|
||||
}
|
||||
}
|
||||
|
||||
private void Fire()
|
||||
{
|
||||
if (this.CreateButtonClicked != null)
|
||||
{
|
||||
if (_InvoiceBaseDCs == null)
|
||||
_InvoiceBaseDCs = new List<InvoiceBaseDC>();
|
||||
|
||||
for (int i = 0; i < _InvoiceBaseDCs.Count; i++)
|
||||
{
|
||||
_InvoiceBaseDCs[i].InvoiceNumber = this._InvoiceNumbers[i];
|
||||
}
|
||||
|
||||
var gkvAbrechnung = ViewModel.CommitToDataContract();
|
||||
|
||||
this.CreateButtonClicked(this, new EventArgs<GkvAbrechnungDC>(gkvAbrechnung));
|
||||
}
|
||||
}
|
||||
public void Clear()
|
||||
{
|
||||
_LoadedInvoiceBaseOid = null;
|
||||
popupedit_GkvSearch.Text = string.Empty;
|
||||
popupedit_GkvSearch.Focus();
|
||||
}
|
||||
|
||||
private void btn_cancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ViewModel.InvoiceBases != null)
|
||||
ViewModel.InvoiceBases.Clear();
|
||||
this.CancelButtonClicked(this, e);
|
||||
}
|
||||
private void btn_create_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Fire();
|
||||
}
|
||||
|
||||
private void TableView_CellValueChanging(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
var si = e.Row as InvoiceBaseDC;
|
||||
if (e.Column.FieldName.Contains("NeuErstellen") && ((bool)e.Value))
|
||||
{
|
||||
if (si.DiffErstellen)
|
||||
{
|
||||
si.DiffErstellen = false;
|
||||
grid_newInvoices.RefreshData();
|
||||
}
|
||||
}
|
||||
else if (e.Column.FieldName.Contains("DiffErstellen") && ((bool)e.Value))
|
||||
{
|
||||
if (si.NeuErstellen)
|
||||
{
|
||||
si.NeuErstellen = false;
|
||||
grid_newInvoices.RefreshData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void popupedit_GkvSearch_PopUpClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
gkvsearchview.ItemSelected += gkvsearchview_OrganisationSelected;
|
||||
popup_organisation.IsOpen = true;
|
||||
}
|
||||
private void gkvsearchview_OrganisationSelected(object sender, EventArgs<CompactOrganisationDC> e)
|
||||
{
|
||||
popup_organisation.IsOpen = false;
|
||||
gkvsearchview.ItemSelected -= gkvsearchview_OrganisationSelected;
|
||||
|
||||
ViewModel.IKKostenträger = e.Data.IKKostentrager;
|
||||
ViewModel.IKVersichertenKarte = e.Data.IKKrankenkasse;
|
||||
ViewModel.IKDatenannahmestelle = e.Data.IKDatenannahmestelle;
|
||||
|
||||
popupedit_GkvSearch.Text = e.Data.ToString();
|
||||
popupedit_GkvSearch.Focus();
|
||||
|
||||
RefreshInvoiceBases(e.Data.OrganisationOid);
|
||||
}
|
||||
|
||||
private void RefreshInvoiceBases() => RefreshInvoiceBases(_LoadedInvoiceBaseOid);
|
||||
private void RefreshInvoiceBases(DateTime? start, DateTime? ende) => RefreshInvoiceBases(_LoadedInvoiceBaseOid, start ?? ViewModel?.AbrechnungsZeitraumStart, ende ?? ViewModel?.AbrechnungsZeitraumEnde);
|
||||
private void RefreshInvoiceBases(long? costOid) => RefreshInvoiceBases(costOid, ViewModel?.AbrechnungsZeitraumStart, ViewModel?.AbrechnungsZeitraumEnde);
|
||||
private void RefreshInvoiceBases(long? costOid, DateTime? start, DateTime? ende)
|
||||
{
|
||||
if (costOid != null && start != null && ende != null && ende >= start)
|
||||
{
|
||||
_LoadedInvoiceBaseOid = costOid;
|
||||
|
||||
ServiceFacade.DoAccountingServiceAsync(s => s.GetInvoiceBasesForCostBearerAndId(start, ende, (long)costOid, "RechnungSoziotherapie"), UpdateInvoiceList);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateInvoiceList(IList<InvoiceBaseDC> dcList)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action)delegate
|
||||
{
|
||||
BindingList <InvoiceBaseVM> invoiceBaseVMs = new BindingList<InvoiceBaseVM>();
|
||||
foreach (var invoiceBaseDC in dcList)
|
||||
{
|
||||
InvoiceBaseVM invoiceBaseVM = new InvoiceBaseVM(invoiceBaseDC);
|
||||
invoiceBaseVM.IsChecked = false;
|
||||
invoiceBaseVMs.Add(invoiceBaseVM);
|
||||
}
|
||||
ViewModel.InvoiceBases = invoiceBaseVMs;
|
||||
grid_newInvoices.ItemsSource = ViewModel.InvoiceBases;
|
||||
this.gridView.BestFitColumns();
|
||||
});
|
||||
}
|
||||
|
||||
private void popupedit_DatenannahmestelleSearch_PopUpClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// tbd
|
||||
}
|
||||
|
||||
private void button_checkAll_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var visible = GetVisibleVMs();
|
||||
foreach (var item in visible)
|
||||
{
|
||||
item.IsChecked = true;
|
||||
}
|
||||
}
|
||||
private void button_uncheckAll_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var visible = GetVisibleVMs();
|
||||
foreach (var item in visible)
|
||||
{
|
||||
item.IsChecked = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private IList<InvoiceBaseVM> GetVisibleVMs()
|
||||
{
|
||||
var list = new List<InvoiceBaseVM>();
|
||||
|
||||
var items = grid_newInvoices.ItemsSource as IList<InvoiceBaseVM>;
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (grid_newInvoices.IsRowVisible(i))
|
||||
{
|
||||
var vm = grid_newInvoices.GetRow(i) as InvoiceBaseVM;
|
||||
if (vm != null)
|
||||
{
|
||||
list.Add(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private void DateEdit_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
{
|
||||
RefreshInvoiceBases((DateTime)e.NewValue, null);
|
||||
}
|
||||
|
||||
private void DateEdit2_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
{
|
||||
RefreshInvoiceBases(null, (DateTime)e.NewValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using BeWo.Validation;
|
||||
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using DevExpress.Xpf.Core;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
@@ -35,10 +37,6 @@ AntwortEntschluesseltAm
|
||||
public static string PropertyName_Transfername = "Transfername";
|
||||
|
||||
public static string PropertyName_ErstelltAm = "ErstelltAm";
|
||||
public static string PropertyName_VerschluesseltAm = "VerschluesseltAm";
|
||||
public static string PropertyName_UebertragenAm = "UebertragenAm";
|
||||
public static string PropertyName_AntwortErhaltenAm = "AntwortErhaltenAm";
|
||||
public static string PropertyName_AntwortEntschluesseltAm = "AntwortEntschluesseltAm";
|
||||
|
||||
private long? _GkvAbrechnungOid;
|
||||
private long? _GkvAbrechnungVersion;
|
||||
@@ -55,26 +53,30 @@ AntwortEntschluesseltAm
|
||||
private string _Nutzdatendatei;
|
||||
private string _Auftragsdatei;
|
||||
private string _Transfername;
|
||||
private int _Dateigröße;
|
||||
private int _Datenaustauschreferenz;
|
||||
|
||||
private DateTime? _ErstelltAm;
|
||||
private DateTime? _VerschluesseltAm;
|
||||
private DateTime? _UebertragenAm;
|
||||
private DateTime? _AntwortErhaltenAm;
|
||||
private DateTime? _AntwortEntschluesseltAm;
|
||||
|
||||
private decimal _Betrag;
|
||||
private bool _Bezahlt;
|
||||
|
||||
internal bool _IsChecked;
|
||||
internal bool _IsSendingRequestCurrently;
|
||||
internal bool _SendAndFailed;
|
||||
|
||||
private List<InvoiceBaseVM> _InvoiceBases2;
|
||||
private BindingList<InvoiceBaseVM> _InvoiceBases;
|
||||
private OrganisationDC _Organisation;
|
||||
|
||||
private List<GkvTransferProtokollDC> _TransferProtokolle;
|
||||
|
||||
public GkvAbrechnungVM(GkvAbrechnungDC pDC) : base(pDC, !pDC.GkvAbrechnungOid.HasValue)
|
||||
{
|
||||
_InvoiceBases = new BindingList<InvoiceBaseVM>();
|
||||
}
|
||||
|
||||
#region
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public string IKVersichertenKarte
|
||||
{
|
||||
@@ -239,6 +241,33 @@ AntwortEntschluesseltAm
|
||||
}
|
||||
}
|
||||
}
|
||||
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public int Dateigröße
|
||||
{
|
||||
get { return this._Dateigröße; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Dateigröße, value))
|
||||
{
|
||||
this._Dateigröße = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Dateigröße, value), nameof(Dateigröße));
|
||||
this.FirePropertyChanged(nameof(Dateigröße));
|
||||
FirePropertyChanged(nameof(DateigrößeDisplayname));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string DateigrößeDisplayname {
|
||||
get
|
||||
{
|
||||
return Utils.SizeSuffix(Dateigröße, 0);
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? ErstelltAm
|
||||
@@ -256,69 +285,23 @@ AntwortEntschluesseltAm
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? VerschluesseltAm
|
||||
{
|
||||
get { return this._VerschluesseltAm; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._VerschluesseltAm, value))
|
||||
{
|
||||
this._VerschluesseltAm = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.VerschluesseltAm, value), PropertyName_VerschluesseltAm);
|
||||
this.FirePropertyChanged(PropertyName_VerschluesseltAm);
|
||||
}
|
||||
}
|
||||
}
|
||||
//public string GesendetDisplay
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// if (IsSendingRequestCurrently)
|
||||
// return "Sendet";
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? UebertragenAm
|
||||
{
|
||||
get { return this._UebertragenAm; }
|
||||
// if (SendAndFailed)
|
||||
// return "Fehlgeschlagen";
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._UebertragenAm, value))
|
||||
{
|
||||
this._UebertragenAm = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.UebertragenAm, value), PropertyName_UebertragenAm);
|
||||
this.FirePropertyChanged(PropertyName_UebertragenAm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? AntwortErhaltenAm
|
||||
{
|
||||
get { return this._AntwortErhaltenAm; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._AntwortErhaltenAm, value))
|
||||
{
|
||||
this._AntwortErhaltenAm = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AntwortErhaltenAm, value), PropertyName_AntwortErhaltenAm);
|
||||
this.FirePropertyChanged(PropertyName_AntwortErhaltenAm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public DateTime? AntwortEntschluesseltAm
|
||||
{
|
||||
get { return this._AntwortEntschluesseltAm; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._AntwortEntschluesseltAm, value))
|
||||
{
|
||||
this._AntwortEntschluesseltAm = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AntwortEntschluesseltAm, value), PropertyName_AntwortEntschluesseltAm);
|
||||
this.FirePropertyChanged(PropertyName_AntwortEntschluesseltAm);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (GesendetAm.HasValue)
|
||||
// return GesendetAm.Value.ToString();
|
||||
// else
|
||||
// return "-";
|
||||
// }
|
||||
//}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public long? GkvAbrechnungOid
|
||||
@@ -383,6 +366,22 @@ AntwortEntschluesseltAm
|
||||
}
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public bool Bezahlt
|
||||
{
|
||||
get { return this._Bezahlt; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Bezahlt, value))
|
||||
{
|
||||
this._Bezahlt = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Bezahlt, value), nameof(Bezahlt));
|
||||
this.FirePropertyChanged(nameof(Bezahlt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get { return _IsChecked; }
|
||||
@@ -397,12 +396,60 @@ AntwortEntschluesseltAm
|
||||
}
|
||||
}
|
||||
|
||||
public List<InvoiceBaseVM> InvoiceBases2
|
||||
{
|
||||
get { return _InvoiceBases2; }
|
||||
set { _InvoiceBases2 = value; }
|
||||
}
|
||||
|
||||
public BindingList<InvoiceBaseVM> InvoiceBases
|
||||
{
|
||||
get { return _InvoiceBases; }
|
||||
set { _InvoiceBases = value; }
|
||||
}
|
||||
|
||||
public List<GkvTransferProtokollDC> TransferProtokolle
|
||||
{
|
||||
get { return _TransferProtokolle; }
|
||||
set { _TransferProtokolle = value; }
|
||||
}
|
||||
|
||||
public void UpdateGkvTransferProtokoll(List<GkvTransferProtokollDC> list)
|
||||
{
|
||||
_TransferProtokolle = list;
|
||||
FirePropertyChanged(nameof(TransferProtokolle));
|
||||
}
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
|
||||
public OrganisationDC Organisation
|
||||
{
|
||||
get { return this._Organisation; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._Organisation, value))
|
||||
{
|
||||
this._Organisation = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Organisation, value), nameof(Organisation));
|
||||
this.FirePropertyChanged(nameof(Organisation));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public string RecipientString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_InvoiceBases2 != null && _InvoiceBases2.Any())
|
||||
{
|
||||
return _InvoiceBases2.First().RecipientString;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(GkvAbrechnungDC pDataContract)
|
||||
{
|
||||
_IKDatenannahmestelle = pDataContract.IKDatenannahmestelle;
|
||||
@@ -414,20 +461,30 @@ AntwortEntschluesseltAm
|
||||
_Nutzdatendatei = pDataContract.Nutzdatendatei;
|
||||
_Auftragsdatei = pDataContract.Auftragsdatei;
|
||||
_Transfername = pDataContract.Transfername;
|
||||
_VerschluesseltAm = pDataContract.VerschluesseltAm;
|
||||
_UebertragenAm = pDataContract.UebertragenAm;
|
||||
_AntwortErhaltenAm = pDataContract.AntwortErhaltenAm;
|
||||
_AntwortEntschluesseltAm = pDataContract.AntwortEntschluesseltAm;
|
||||
_ErstelltAm = pDataContract.ErstelltAm;
|
||||
_Datenaustauschreferenz = pDataContract.Datenaustauschreferenz;
|
||||
_Dateigröße = pDataContract.Dateigröße;
|
||||
|
||||
_GkvAbrechnungOid = pDataContract.GkvAbrechnungOid;
|
||||
_GkvAbrechnungVersion = pDataContract.GkvAbrechnungVersion;
|
||||
_Notice = pDataContract.Notice;
|
||||
|
||||
_Betrag = pDataContract.Betrag;
|
||||
}
|
||||
_Bezahlt = pDataContract.Bezahlt;
|
||||
|
||||
if (pDataContract.InvoiceBases != null)
|
||||
{
|
||||
_InvoiceBases2 = pDataContract.InvoiceBases.Select(x => new InvoiceBaseVM(x, true)).ToList();
|
||||
_InvoiceBases = new BindingList<InvoiceBaseVM>(_InvoiceBases2);
|
||||
}
|
||||
|
||||
if (pDataContract.TransferProtokolle != null)
|
||||
{
|
||||
_TransferProtokolle = new List<GkvTransferProtokollDC>(pDataContract.TransferProtokolle);
|
||||
}
|
||||
|
||||
_Organisation = pDataContract.Organisation;
|
||||
}
|
||||
protected override GkvAbrechnungDC MapToDataContract(GkvAbrechnungDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.IKDatenannahmestelle = _IKDatenannahmestelle;
|
||||
@@ -439,18 +496,26 @@ AntwortEntschluesseltAm
|
||||
pDataContract.Nutzdatendatei = _Nutzdatendatei;
|
||||
pDataContract.Auftragsdatei = _Auftragsdatei;
|
||||
pDataContract.Transfername = _Transfername;
|
||||
pDataContract.VerschluesseltAm = _VerschluesseltAm;
|
||||
pDataContract.UebertragenAm = _UebertragenAm;
|
||||
pDataContract.AntwortErhaltenAm = _AntwortErhaltenAm;
|
||||
pDataContract.AntwortEntschluesseltAm = _AntwortEntschluesseltAm;
|
||||
|
||||
pDataContract.ErstelltAm = _ErstelltAm;
|
||||
|
||||
pDataContract.GkvAbrechnungOid = _GkvAbrechnungOid;
|
||||
pDataContract.GkvAbrechnungVersion = _GkvAbrechnungVersion;
|
||||
pDataContract.Dateigröße = _Dateigröße;
|
||||
|
||||
pDataContract.Notice = _Notice;
|
||||
pDataContract.Betrag = _Betrag;
|
||||
pDataContract.Bezahlt = _Bezahlt;
|
||||
pDataContract.Datenaustauschreferenz = _Datenaustauschreferenz;
|
||||
|
||||
if (_InvoiceBases != null && _InvoiceBases.Any())
|
||||
pDataContract.InvoiceBases = _InvoiceBases.Where(x => x.IsChecked).Select(vm => vm.CommitToDataContract()).ToList();
|
||||
else if (_InvoiceBases2 != null && _InvoiceBases2.Any())
|
||||
pDataContract.InvoiceBases = _InvoiceBases2.Where(x => x.IsChecked).Select(vm => vm.CommitToDataContract()).ToList();
|
||||
|
||||
pDataContract.Organisation = _Organisation;
|
||||
pDataContract.TransferProtokolle = _TransferProtokolle?.ToList();
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,9 +186,10 @@ namespace BeWo.ViewModel
|
||||
|
||||
#region Constructors and Destructors
|
||||
|
||||
public InvoiceBaseVM(InvoiceBaseDC pDC)
|
||||
public InvoiceBaseVM(InvoiceBaseDC pDC, bool isChecked = false)
|
||||
: base(pDC, pDC.InvoiceBaseOid == null)
|
||||
{
|
||||
_IsChecked = isChecked;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
|
||||
@@ -85,5 +85,14 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
this.FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
this.FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
}
|
||||
|
||||
internal void UpdateList(IList<InvoiceBaseVM> vmList)
|
||||
{
|
||||
this.VMList.Clear();
|
||||
this.VMList.AddRange(vmList);
|
||||
|
||||
this.FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
this.FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,6 @@
|
||||
<Compile Include="DakotaExtensions.cs" />
|
||||
<Compile Include="Models\DakotaException.cs" />
|
||||
<Compile Include="Models\DakotaFile.cs" />
|
||||
<Compile Include="Logic\DakotaFileCreator.cs" />
|
||||
<Compile Include="DakotaValidator.cs" />
|
||||
<Compile Include="Models\Auftragsdatei\AuftragssatzPart1.cs" />
|
||||
<Compile Include="Models\Blocke\Block.cs" />
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Dakota
|
||||
|
||||
public static string Absenderklassifikation => "SL";
|
||||
public static string Dateiidentifizierer => "S";
|
||||
public static string GetLogischerDateiname(int _month) => $"{Absenderklassifikation}{IKAbsender.Substring(2, 6)}{Dateiidentifizierer}{_month}";
|
||||
public static string GetLogischerDateiname(int _month) => $"{Absenderklassifikation}{IKAbsender.Substring(2, 6)}{Dateiidentifizierer}{_month:00}";
|
||||
|
||||
|
||||
public static SchlüsselAbrechnungscodes Abrechnungscode => SchlüsselAbrechnungscodes.SoziotherapeutischerLeistungserbringer;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using Dakota.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -21,7 +22,7 @@ namespace Dakota
|
||||
/// <summary>
|
||||
/// Validiert in erster Phase die Daten. Bei Fehler wird eine DakotaException geworfen.
|
||||
/// </summary>
|
||||
public static void ValidateFirstStep(MandatorDC mandatordc)
|
||||
public static void ValidateFirstStep(MandatorDC mandatordc, GkvAbrechnungRequestDC request)
|
||||
{
|
||||
if (mandatordc == null)
|
||||
throw new DakotaException("Mandator ist null");
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared.DataContracts;
|
||||
using Dakota;
|
||||
using Dakota.Models;
|
||||
using Dakota.Models.Infos;
|
||||
using Dakota.Models.Schlüssels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dakota.Logic
|
||||
{
|
||||
public static class DakotaFileCreator
|
||||
{
|
||||
public static DakotaFile CreateDakotaFilePair(List<InvoiceItemDC> invoiceitems)
|
||||
{
|
||||
var created = DateTime.Now;
|
||||
|
||||
DakotaInfoCreator.Reset();
|
||||
|
||||
// Hole InfoDateiAuftrag + Nutz
|
||||
//var info_nutzdaten = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(para2);
|
||||
//var info_auftrags = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(para2);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
//public static DakotaFile GenerateDakotaFile(List<DakotaInfoCreator.InfoCreatorParameter> paras, DakotaInfoCreator.InfoCreatorParameterFix para2)
|
||||
//{
|
||||
// DakotaInfoCreator.Reset();
|
||||
|
||||
// var info_nutzdaten = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(para2);
|
||||
// var info_auftrags = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(para2);
|
||||
|
||||
// foreach (var para in paras)
|
||||
// {
|
||||
// info_nutzdaten.AddDakotaInfoFile(para, para2);
|
||||
// }
|
||||
|
||||
// var dakota = new DakotaFile();
|
||||
|
||||
// dakota.Nutzdatendatei.Apply(info_nutzdaten);
|
||||
// dakota.Auftragsdatei.Apply(info_auftrags);
|
||||
|
||||
// return dakota;
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -10,21 +10,19 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Dakota.Logic
|
||||
{
|
||||
public static class DakotaInfoCreator
|
||||
public class DakotaInfoCreator
|
||||
{
|
||||
public static int NachrichtenRefenrenz { get; set; }
|
||||
public int NachrichtenRefenrenz { get; set; }
|
||||
public bool IsSammelrechnung { get; set; }
|
||||
|
||||
static DakotaInfoCreator()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
internal static void Reset()
|
||||
public DakotaInfoCreator(bool isSammelrechnung = false)
|
||||
{
|
||||
NachrichtenRefenrenz = 0;
|
||||
|
||||
IsSammelrechnung = isSammelrechnung;
|
||||
}
|
||||
|
||||
internal static int GetNextRefNumber()
|
||||
internal int GetNextRefNumber()
|
||||
{
|
||||
return ++NachrichtenRefenrenz;
|
||||
}
|
||||
@@ -48,7 +46,7 @@ namespace Dakota.Logic
|
||||
// return info;
|
||||
//}
|
||||
|
||||
internal static InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(string absender, string empfang, string logischerDateiname)
|
||||
internal InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(string absender, string empfang, string logischerDateiname, int datenaustauschreferenz)
|
||||
{
|
||||
var info = new InfoDateiNutzdaten();
|
||||
|
||||
@@ -56,23 +54,25 @@ namespace Dakota.Logic
|
||||
info.SyntaxVersion = "3";
|
||||
info.Absenderbezeichnung = absender;
|
||||
info.Empfangerbezeichnung = empfang;
|
||||
info.Datenaustauschreferenz = 1;
|
||||
info.Datenaustauschreferenz = datenaustauschreferenz;
|
||||
info.Leistungsbereich = SchlüsselLeistungserbringerSammelgruppenschlussel.SoziotherapeutischerLeistungserbringer;
|
||||
info.Anwendungsreferenz = logischerDateiname;
|
||||
info.Testindikator = SchlüsselTestindikator.Testdatei;
|
||||
|
||||
return info;
|
||||
}
|
||||
internal static InfoDateiAuftrags GetEmptyInfoAuftragsdatei(string empfang)
|
||||
internal InfoDateiAuftrags GetEmptyInfoAuftragsdatei(string empfang, string logischerDateiname, string verfahrenkennung, int datenaustauschreferenz)
|
||||
{
|
||||
var transfernummer = datenaustauschreferenz % 1000;
|
||||
|
||||
var info = new InfoDateiAuftrags();
|
||||
|
||||
info.Identifikator = 500000;
|
||||
info.Version = 1;
|
||||
info.LangeAuftrag = 348;
|
||||
info.SequenzNummer = 000;
|
||||
info.VerfahrenKennung = "TSOL0";
|
||||
info.TransferNummer = 000;
|
||||
info.VerfahrenKennung = verfahrenkennung;
|
||||
info.TransferNummer = transfernummer;
|
||||
info.VerfahrenKennungSpezifikation = "SGB1K";
|
||||
info.AbsenderEigner = DakotaConfig.IKAbsender;
|
||||
info.AbsenderPhysikalisch = DakotaConfig.IKAbsender;
|
||||
@@ -80,7 +80,7 @@ namespace Dakota.Logic
|
||||
info.EmpfangerPhysikalisch = empfang;
|
||||
info.FehlerNummer = 0;
|
||||
info.FehlerMassnahme = 0;
|
||||
info.Dateiname = "aok31052023";
|
||||
info.Dateiname = logischerDateiname;
|
||||
info.DatumUbertragungEmpfangenStart = "00000000000000";
|
||||
info.DatumUbertragungEmpfangenEnde = "00000000000000";
|
||||
info.DateiVersion = 0;
|
||||
@@ -98,39 +98,42 @@ namespace Dakota.Logic
|
||||
|
||||
// Part 3 nicht vom Absender
|
||||
|
||||
info.EMailAdresseAbsender = "rene.evertz@ownsoft.de";
|
||||
info.EMailAdresseAbsender = "dakota.exchange@ownsoft.de";
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
internal static void AddInfoParameter(this InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
|
||||
internal void AddInfoParameter(InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
|
||||
{
|
||||
var blockkostentrager = file.GetDakotaInfoBlockKostentrager(infoParameter, version);
|
||||
var blockkvkarte = blockkostentrager.GetDakotaInfoBlockKvKarte(infoParameter, version);
|
||||
var abrechnungsfall = blockkvkarte.GetDakotaInfoAbrechnungsfall(infoParameter);
|
||||
var abrechnungsposition = abrechnungsfall.GetDakotaInfoAbrechnungsposition(infoParameter);
|
||||
var blockkostentrager = GetDakotaInfoBlockKostentrager(file, infoParameter, version);
|
||||
var blockkvkarte = GetDakotaInfoBlockKvKarte(blockkostentrager, infoParameter, version);
|
||||
var abrechnungsfall = GetDakotaInfoAbrechnungsfall(blockkvkarte, infoParameter);
|
||||
var abrechnungsposition = GetDakotaInfoAbrechnungsposition(abrechnungsfall, infoParameter);
|
||||
|
||||
abrechnungsfall.InfosAbrechnungsposition.Add(abrechnungsposition);
|
||||
}
|
||||
|
||||
internal static InfoBlockKostentrager GetDakotaInfoBlockKostentrager(this InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
|
||||
internal InfoBlockKostentrager GetDakotaInfoBlockKostentrager(InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
|
||||
{
|
||||
var ikkostentrager = infoParameter.IKKostentrager;
|
||||
var block = file.BlockKostentragers.FirstOrDefault(x => x.IKKostentrager == ikkostentrager);
|
||||
|
||||
if (block is null)
|
||||
{
|
||||
block = new InfoBlockKostentrager(ikkostentrager)
|
||||
block = new InfoBlockKostentrager(ikkostentrager);
|
||||
|
||||
if (IsSammelrechnung)
|
||||
{
|
||||
DakotaInfoSLGA = CreateDakotaInfoNachricht(true, version),
|
||||
DakotaInfoNachrichtSLGA = CreateDakotaInfoNachrichtSLGA(infoParameter)
|
||||
};
|
||||
block.DakotaInfoSLGA = CreateDakotaInfoNachricht(true, version);
|
||||
block.DakotaInfoNachrichtSLGA = CreateDakotaInfoNachrichtSLGA(infoParameter);
|
||||
}
|
||||
|
||||
file.BlockKostentragers.Add(block);
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
internal static InfoBlockKrankenkasse GetDakotaInfoBlockKvKarte(this InfoBlockKostentrager blockkostentrager, InfoParameterInvoiceItem infoParameter, int version)
|
||||
internal InfoBlockKrankenkasse GetDakotaInfoBlockKvKarte(InfoBlockKostentrager blockkostentrager, InfoParameterInvoiceItem infoParameter, int version)
|
||||
{
|
||||
var ikkrankenkasse = infoParameter.IKKrankenkasse;
|
||||
var block = blockkostentrager.BlockKvKarte.FirstOrDefault(x => x.IKKrankenkasse == ikkrankenkasse);
|
||||
@@ -149,7 +152,7 @@ namespace Dakota.Logic
|
||||
|
||||
return block;
|
||||
}
|
||||
internal static InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(this InfoBlockKrankenkasse block, InfoParameterInvoiceItem infoParameter)
|
||||
internal InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(InfoBlockKrankenkasse block, InfoParameterInvoiceItem infoParameter)
|
||||
{
|
||||
var belegnummer = infoParameter.Customer.CustomerOid.ToString();
|
||||
var fall = block.DakotaInfoNachrichtSLLA.Abrechnungsfalle.FirstOrDefault(x => x.Belegnummer == belegnummer);
|
||||
@@ -162,7 +165,7 @@ namespace Dakota.Logic
|
||||
|
||||
return fall;
|
||||
}
|
||||
internal static InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(this InfoAbrechnungsfall fall, InfoParameterInvoiceItem infoParameter)
|
||||
internal InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(InfoAbrechnungsfall fall, InfoParameterInvoiceItem infoParameter)
|
||||
{
|
||||
var pos = CreateDakotaInfoAbrechnungsposition(infoParameter);
|
||||
|
||||
@@ -171,7 +174,7 @@ namespace Dakota.Logic
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
private static InfoNachricht CreateDakotaInfoNachricht(bool isSLGA, int version)
|
||||
private InfoNachricht CreateDakotaInfoNachricht(bool isSLGA, int version)
|
||||
{
|
||||
var info = new InfoNachricht();
|
||||
var typ = isSLGA ? "SLGA" : "SLLA";
|
||||
@@ -184,7 +187,7 @@ namespace Dakota.Logic
|
||||
|
||||
return info;
|
||||
}
|
||||
private static InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoParameterInvoiceItem infoParameter)
|
||||
private InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoParameterInvoiceItem infoParameter)
|
||||
{
|
||||
var info = new InfoNachrichtSLGA();
|
||||
|
||||
@@ -196,16 +199,16 @@ namespace Dakota.Logic
|
||||
|
||||
info.Rechnungsnummer = infoParameter.InvoiceBase.InvoiceNumber;
|
||||
info.Rechnungsdatum = infoParameter.InvoiceBase.InvoiceDate.Value;
|
||||
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungÜberAbrechnungsstelleOhnInkassovollmacht;
|
||||
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer;
|
||||
|
||||
info.Name1 = infoParameter.Mandator.Name;
|
||||
info.Name2 = "Max Mustermann";
|
||||
info.Name3 = "0177 0123456789";
|
||||
info.Name4 = "max@mustermann.de";
|
||||
info.Name2 = "Rene Evertz";
|
||||
info.Name3 = "Entwickler bei ownSoft";
|
||||
info.Name4 = "dakota.exchange@ownsoft.de";
|
||||
|
||||
return info;
|
||||
}
|
||||
private static InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoParameterInvoiceItem infoParameter)
|
||||
private InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoParameterInvoiceItem infoParameter)
|
||||
{
|
||||
var info = new InfoNachrichtSLLA();
|
||||
|
||||
@@ -223,7 +226,7 @@ namespace Dakota.Logic
|
||||
|
||||
return info;
|
||||
}
|
||||
private static InfoAbrechnungsfall CreateDakotaInfoAbrechnungsfall(InfoParameterInvoiceItem infoParameter)
|
||||
private InfoAbrechnungsfall CreateDakotaInfoAbrechnungsfall(InfoParameterInvoiceItem infoParameter)
|
||||
{
|
||||
var info = new InfoAbrechnungsfall();
|
||||
|
||||
@@ -243,7 +246,7 @@ namespace Dakota.Logic
|
||||
|
||||
return info;
|
||||
}
|
||||
private static InfoAbrechnungsposition CreateDakotaInfoAbrechnungsposition(InfoParameterInvoiceItem infoParameter)
|
||||
private InfoAbrechnungsposition CreateDakotaInfoAbrechnungsposition(InfoParameterInvoiceItem infoParameter)
|
||||
{
|
||||
var info = new InfoAbrechnungsposition();
|
||||
|
||||
@@ -268,7 +271,7 @@ namespace Dakota.Logic
|
||||
|
||||
return info;
|
||||
}
|
||||
private static InfoBlockDiagnosen CreateDakotaInfoDiagnosen()
|
||||
private InfoBlockDiagnosen CreateDakotaInfoDiagnosen()
|
||||
{
|
||||
var info = new InfoBlockDiagnosen();
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace Dakota.Logic
|
||||
public int Month { get; set; }
|
||||
public int Version { get; set; }
|
||||
|
||||
public DakotaInfoCreator DakotaInfoCreator { get; set; }
|
||||
public bool IsSammelrechnung { get; set; }
|
||||
|
||||
public Dictionary<string, DakotaFile> DakotaFileDict { get; set; }
|
||||
|
||||
public Dictionary<string, InfoDateiNutzdaten> DakotaInfoNutzDict { get; set; }
|
||||
@@ -23,7 +26,7 @@ namespace Dakota.Logic
|
||||
{
|
||||
|
||||
}
|
||||
public DakotaManager(int month, DateTime dateTime)
|
||||
public DakotaManager(int month, DateTime dateTime, bool isSammelrechnung = false)
|
||||
{
|
||||
Month = month;
|
||||
Version = GetVersion(dateTime);
|
||||
@@ -32,39 +35,49 @@ namespace Dakota.Logic
|
||||
|
||||
DakotaInfoNutzDict = new Dictionary<string, InfoDateiNutzdaten>();
|
||||
DakotaInfoAufDict = new Dictionary<string, InfoDateiAuftrags>();
|
||||
|
||||
DakotaInfoCreator = new DakotaInfoCreator(isSammelrechnung);
|
||||
IsSammelrechnung = isSammelrechnung;
|
||||
}
|
||||
|
||||
public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator)
|
||||
public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator, int datenaustauschreferenz)
|
||||
{
|
||||
try
|
||||
{
|
||||
var ik_datenannahmestelle = organisation.IKDatenannahmestelle;
|
||||
var success = DakotaInfoNutzDict.TryGetValue(ik_datenannahmestelle, out InfoDateiNutzdaten nutzdaten);
|
||||
|
||||
var ik_datenannahmestelle = organisation.IKDatenannahmestelle;
|
||||
var success = DakotaInfoNutzDict.TryGetValue(ik_datenannahmestelle, out InfoDateiNutzdaten nutzdaten);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
var info_nutz_add = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(DakotaConfig.IKAbsender, organisation.IKDatenannahmestelle, DakotaConfig.GetLogischerDateiname(Month));
|
||||
var info_auf_add = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(organisation.IKDatenannahmestelle);
|
||||
|
||||
DakotaInfoNutzDict.Add(ik_datenannahmestelle, info_nutz_add);
|
||||
DakotaInfoAufDict.Add(ik_datenannahmestelle, info_auf_add);
|
||||
|
||||
nutzdaten = info_nutz_add;
|
||||
}
|
||||
|
||||
foreach (var peroid in serviceInvoice.ServiceInvoicePeriods)
|
||||
{
|
||||
foreach (var invoice in peroid.InvoiceItems)
|
||||
if (!success)
|
||||
{
|
||||
var info_nutz_item = new InfoParameterInvoiceItem(serviceInvoice, invoice, organisation, customer, mandator);
|
||||
// Verfahrenkennung
|
||||
// Erste Stelle:
|
||||
// "E" - Echtdaten
|
||||
// "T" - Testdaten
|
||||
|
||||
nutzdaten.AddInfoParameter(info_nutz_item, Version);
|
||||
var verfahrenkennung = "TSOL0";
|
||||
var logischer_dateiname = DakotaConfig.GetLogischerDateiname(Month).Trim();
|
||||
|
||||
var info_nutz_add = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(DakotaConfig.IKAbsender, organisation.IKDatenannahmestelle, logischer_dateiname, datenaustauschreferenz);
|
||||
var info_auf_add = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(organisation.IKDatenannahmestelle, logischer_dateiname, verfahrenkennung, datenaustauschreferenz);
|
||||
|
||||
DakotaInfoNutzDict.Add(ik_datenannahmestelle, info_nutz_add);
|
||||
DakotaInfoAufDict.Add(ik_datenannahmestelle, info_auf_add);
|
||||
|
||||
nutzdaten = info_nutz_add;
|
||||
}
|
||||
|
||||
foreach (var peroid in serviceInvoice.ServiceInvoicePeriods)
|
||||
{
|
||||
foreach (var invoice in peroid.InvoiceItems)
|
||||
{
|
||||
var info_nutz_item = new InfoParameterInvoiceItem(serviceInvoice, invoice, organisation, customer, mandator);
|
||||
|
||||
DakotaInfoCreator.AddInfoParameter(nutzdaten, info_nutz_item, Version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e)
|
||||
catch (Exception e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
@@ -79,58 +92,16 @@ namespace Dakota.Logic
|
||||
var info_nutz = DakotaInfoNutzDict[ik_datenannahmestelle];
|
||||
var info_auf = DakotaInfoAufDict[ik_datenannahmestelle];
|
||||
|
||||
file.Nutzdatendatei.Apply(info_nutz);
|
||||
file.Nutzdatendatei.Apply(info_nutz, DakotaInfoCreator.IsSammelrechnung);
|
||||
file.Auftragsdatei.Apply(info_auf);
|
||||
|
||||
DakotaFileDict.Add(ik_datenannahmestelle, file);
|
||||
}
|
||||
}
|
||||
|
||||
public void Save(string root_path, bool debug_mode = false)
|
||||
{
|
||||
if (!root_path.EndsWith("\\"))
|
||||
{
|
||||
root_path += '\\';
|
||||
}
|
||||
|
||||
foreach (var ik_datenannahmestelle in DakotaFileDict.Keys)
|
||||
{
|
||||
var code = DakotaFileDict[ik_datenannahmestelle];
|
||||
var empfang = code.GetIKDatenannahmestelle();
|
||||
|
||||
var transferdateiname = code.GetTransferName();
|
||||
|
||||
string subpath;
|
||||
if (debug_mode)
|
||||
{
|
||||
subpath = $"{empfang}-{transferdateiname}";
|
||||
}
|
||||
else
|
||||
{
|
||||
subpath = $@"{empfang}\{transferdateiname}";
|
||||
}
|
||||
|
||||
//var pathauf = @"C:\Projects\out.auf";
|
||||
//var path2 = $@"C:\dakotale\TP5Daten\{empfang}\{transferdateiname}";
|
||||
//var path2auf = $@"C:\dakotale\TP5Daten\{empfang}\{transferdateiname}.auf";
|
||||
//var path3 = $@"C:\dakotale\TP5Daten\{empfang}";
|
||||
|
||||
var auftragsdatei = code.GetAuftragsdatei();
|
||||
var nutzdatendatei = code.GetNutzdatendatei();
|
||||
|
||||
var auftragsdatei2 = Encoding.GetEncoding("ISO-8859-1").GetBytes(auftragsdatei);
|
||||
|
||||
var finalpath = root_path + subpath;
|
||||
|
||||
Directory.CreateDirectory(root_path);
|
||||
File.WriteAllText(finalpath, nutzdatendatei);
|
||||
File.WriteAllBytes(finalpath + ".auf", auftragsdatei2);
|
||||
}
|
||||
}
|
||||
|
||||
private int GetVersion(DateTime create4month)
|
||||
{
|
||||
if(create4month < new DateTime(2023, 7, 1))
|
||||
if (create4month < new DateTime(2023, 7, 1))
|
||||
throw new NotImplementedException("Keine Unterstützung von Version 17 oder niedriger");
|
||||
|
||||
if (create4month < new DateTime(2024, 1, 1))
|
||||
|
||||
@@ -84,14 +84,14 @@ namespace Dakota.Models.Blocke
|
||||
SegmentUNH.NachrichtenFreigabeNrDesTypes.SetValue(info.DakotaInfoSLGA.NachrichtenFreigabeNrTages);
|
||||
SegmentUNH.NachrichtenVerwaltendeOrganisation.SetValue(info.DakotaInfoSLGA.NachrichtenVerwaltendeOrganisation);
|
||||
|
||||
NachrichtSLGASammelrechnung.Apply(info.DakotaInfoNachrichtSLGA);
|
||||
NachrichtSLGASammelrechnung.Apply(info.DakotaInfoNachrichtSLGA, true);
|
||||
}
|
||||
|
||||
foreach (var infoblock in info.BlockKvKarte)
|
||||
{
|
||||
var blockkvkarte = new BlockKrankenkasse();
|
||||
|
||||
blockkvkarte.Apply(infoblock);
|
||||
blockkvkarte.Apply(infoblock, IsSammelrechnung);
|
||||
|
||||
Add(blockkvkarte);
|
||||
}
|
||||
|
||||
@@ -61,10 +61,10 @@ namespace Dakota.Models.Blocke
|
||||
return 2;
|
||||
}
|
||||
|
||||
public void Apply(InfoBlockKrankenkasse blockinfo)
|
||||
public void Apply(InfoBlockKrankenkasse blockinfo, bool isSammelrechnung)
|
||||
{
|
||||
ApplySLGA(blockinfo.DakotaInfoSLGA);
|
||||
ApplyNachrichtSLGA(blockinfo.DakotaInfoNachrichtSLGA);
|
||||
ApplyNachrichtSLGA(blockinfo.DakotaInfoNachrichtSLGA, isSammelrechnung);
|
||||
ApplySLLA(blockinfo.DakotaInfoSLLA);
|
||||
ApplyNachrichtSLLA(blockinfo.DakotaInfoNachrichtSLLA);
|
||||
CalculateSLGA();
|
||||
@@ -79,9 +79,9 @@ namespace Dakota.Models.Blocke
|
||||
|
||||
SegmentSLGAUNT.Nachrichtenreferenznummer.SetValue(info.Nachrichtenreferenznummer);
|
||||
}
|
||||
private void ApplyNachrichtSLGA(InfoNachrichtSLGA info)
|
||||
private void ApplyNachrichtSLGA(InfoNachrichtSLGA info, bool isSammelrechnung)
|
||||
{
|
||||
NachrichtSLGA.Apply(info);
|
||||
NachrichtSLGA.Apply(info, isSammelrechnung);
|
||||
}
|
||||
|
||||
private void ApplySLLA(InfoNachricht info)
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Dakota.Models.Blocke
|
||||
{
|
||||
BlockKostenträger.Add(blockkosten);
|
||||
}
|
||||
public void Apply(InfoDateiNutzdaten info)
|
||||
public void Apply(InfoDateiNutzdaten info, bool isSammelrechnung)
|
||||
{
|
||||
SegmentUNB.SyntaxKennung.SetValue(info.SyntaxKennung);
|
||||
SegmentUNB.SyntaxVersionsnummer.SetValue(info.SyntaxVersion);
|
||||
@@ -74,7 +74,7 @@ namespace Dakota.Models.Blocke
|
||||
|
||||
foreach (var blockinfo in info.BlockKostentragers)
|
||||
{
|
||||
var block = new BlockKostenträger();
|
||||
var block = new BlockKostenträger(isSammelrechnung);
|
||||
|
||||
block.Apply(blockinfo);
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ namespace Dakota
|
||||
Created = created;
|
||||
}
|
||||
|
||||
public int GetDatenaustauschreferenz()
|
||||
{
|
||||
return Nutzdatendatei.SegmentUNB.Datenaustauschreferenz.Value;
|
||||
}
|
||||
|
||||
public string GetTransferName()
|
||||
{
|
||||
return Verfahrenskennung + Transfernummer;
|
||||
|
||||
@@ -22,8 +22,6 @@ namespace Dakota.Models.Infos
|
||||
public string IKKrankenkasse => Organisation.IKKrankenkasse;
|
||||
public string IKLeistungserbringer => Mandator.IKLeistungserbringer;
|
||||
|
||||
public string Belegnummer => "444444test";
|
||||
|
||||
public InfoParameterInvoiceItem(ServiceInvoiceDC serviceInvoice, InvoiceItemDC invoiceItem, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator)
|
||||
{
|
||||
InvoiceItem = invoiceItem;
|
||||
|
||||
@@ -73,10 +73,13 @@ namespace Dakota.Models.Nachrichten
|
||||
return res;
|
||||
}
|
||||
|
||||
public void Apply(InfoNachrichtSLGA info)
|
||||
public void Apply(InfoNachrichtSLGA info, bool isSammelrechnung)
|
||||
{
|
||||
SegmentFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen);
|
||||
SegmentFKT.Sammelrechnung.SetValue("J");
|
||||
|
||||
if(isSammelrechnung)
|
||||
SegmentFKT.Sammelrechnung.SetValue("J");
|
||||
|
||||
SegmentFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringer);
|
||||
SegmentFKT.IKKostenträger.SetValue(info.IKKostentrager);
|
||||
SegmentFKT.IKVersichertenKarte.SetValue(info.IKKrankenkasse);
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace BeWo.Data
|
||||
|
||||
private static bool ShouldConfigureHibernateSession(HttpApplication context)
|
||||
{
|
||||
return string.IsNullOrEmpty(context.Request.FilePath) || context.Request.FilePath.IndexOf("Admin.aspx") < 0;
|
||||
return string.IsNullOrEmpty(context.Request.FilePath) || context.Request.FilePath.IndexOf("Admin.aspx") < 0 || context.Request.FilePath.IndexOf("GkvAbrechnungView.aspx") < 0;
|
||||
}
|
||||
|
||||
private static bool ConfigureHibernateSession(HttpApplication context)
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
<Compile Include="Entities\Dienstvertretung.cs" />
|
||||
<Compile Include="Entities\Dokumentvorlage.cs" />
|
||||
<Compile Include="Entities\GeschenkterUrlaubstag.cs" />
|
||||
<Compile Include="Entities\GkvTransferprotokoll.cs" />
|
||||
<Compile Include="Entities\GoalRating.cs" />
|
||||
<Compile Include="Entities\Preis.cs" />
|
||||
<Compile Include="Entities\Quittierungsbelegsstatus.cs" />
|
||||
@@ -755,6 +756,7 @@
|
||||
<EmbeddedResource Include="Mappings\AddressRoute.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Mappings\GkvTransferProtokoll.hbm.xml" />
|
||||
<Content Include="Mappings\Timesheet2Mail.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\ContactHistory.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace BeWo.Data.Entities
|
||||
this._Tid = TableID.GkvAbrechnung;
|
||||
}
|
||||
|
||||
public virtual string Kundennummer { get; set; }
|
||||
|
||||
public virtual string IKLeistungserbringer { get; set; }
|
||||
|
||||
public virtual string IKVersichertenKarte { get; set; }
|
||||
@@ -30,46 +28,20 @@ namespace BeWo.Data.Entities
|
||||
|
||||
public virtual string Auftragsdatei { get; set; }
|
||||
|
||||
public virtual int Dateigrosse { get; set; }
|
||||
|
||||
public virtual string Transfername { get; set; }
|
||||
|
||||
public virtual int Datenaustauschreferenz { get; set; }
|
||||
|
||||
public virtual DateTime? ErstelltAm { get; set; }
|
||||
|
||||
public virtual DateTime? VerschluesseltAm { get; set; }
|
||||
|
||||
public virtual DateTime? UebertragenAm { get; set; }
|
||||
|
||||
public virtual DateTime? AntwortErhaltenAm { get; set; }
|
||||
|
||||
public virtual DateTime? AntwortEntschluesseltAm { get; set; }
|
||||
|
||||
public virtual decimal Betrag { get; set; }
|
||||
|
||||
public virtual bool Bezahlt { get; set; }
|
||||
|
||||
public virtual IList<InvoiceBase> InvoiceBases { get; set; }
|
||||
|
||||
// Kundennummer nur bei App8
|
||||
|
||||
/*
|
||||
IKLeistungserbringer
|
||||
IKVersichertenKarte
|
||||
IKKostentrager
|
||||
IKDatenannahmestelle
|
||||
*/
|
||||
|
||||
/*
|
||||
Notice
|
||||
Kundennummer
|
||||
AbrechnungsZeitraumStart
|
||||
AbrechnungsZeitraumEnde
|
||||
Nutzdatendatei
|
||||
Auftragsdatei
|
||||
Transfername
|
||||
VerschluesseltAm
|
||||
UebertragenAm
|
||||
AntwortErhaltenAm
|
||||
AntwortEntschluesseltAm
|
||||
*/
|
||||
|
||||
public virtual IList<GkvTransferProtokoll> GkvTransferProtokolle { get; set; }
|
||||
}
|
||||
}
|
||||
27
Data/Entities/GkvTransferprotokoll.cs
Normal file
27
Data/Entities/GkvTransferprotokoll.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BS.Shared;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class GkvTransferProtokoll : BeWoEntityBase
|
||||
{
|
||||
public GkvTransferProtokoll()
|
||||
{
|
||||
this._Tid = TableID.GkvTransferprotokoll;
|
||||
}
|
||||
|
||||
public virtual long GkvAbrechnungOid { get; set; }
|
||||
public virtual string AbsenderBezeichnung { get; set; }
|
||||
public virtual string EmpfangerBezeichnung { get; set; }
|
||||
public virtual string Dateityp { get; set; }
|
||||
public virtual string Dateiname { get; set; }
|
||||
public virtual DateTime? PruftDatum { get; set; }
|
||||
public virtual string PruftFehler { get; set; }
|
||||
public virtual DateTime? VerschlusseltDatum { get; set; }
|
||||
public virtual string VerschlusseltFehler { get; set; }
|
||||
public virtual DateTime? UbertragDatum { get; set; }
|
||||
public virtual string UbertragFehler { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
</id>
|
||||
<version type="Int64" column="Version" name="Version" />
|
||||
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
|
||||
<property column="Kundennummer" type="string" name="Kundennummer" />
|
||||
<property column="IKLeistungserbringer" type="string" name="IKLeistungserbringer" />
|
||||
<property column="IKVersichertenKarte" type="string" name="IKVersichertenKarte" />
|
||||
<property column="IKKostentrager" type="string" name="IKKostentrager" />
|
||||
@@ -17,12 +16,9 @@
|
||||
<property column="Nutzdatendatei" type="string" name="Nutzdatendatei" />
|
||||
<property column="Auftragsdatei" type="string" name="Auftragsdatei" />
|
||||
<property column="Transfername" type="string" name="Transfername" />
|
||||
<property column="Datenaustauschreferenz" type="int" name="Datenaustauschreferenz" />
|
||||
<property column="ErstelltAm" type="DateTime" name="ErstelltAm" />
|
||||
<property column="VerschluesseltAm" type="DateTime" name="VerschluesseltAm" />
|
||||
<property column="UebertragenAm" type="DateTime" name="UebertragenAm" />
|
||||
<property column="AntwortErhaltenAm" type="DateTime" name="AntwortErhaltenAm" />
|
||||
<property column="AntwortEntschluesseltAm" type="DateTime" name="AntwortEntschluesseltAm" />
|
||||
<property column="Dateigrosse" type="int" name="Dateigrosse" />
|
||||
<property column="Datenaustauschreferenz" type="int" name="Datenaustauschreferenz" />
|
||||
<property column="ErstelltAm" type="DateTime" name="ErstelltAm" />
|
||||
<property column="Notice" type="String" name="Notice" length="1024" />
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
@@ -30,10 +26,15 @@
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
<property column="Betrag" type="decimal" name="Betrag" />
|
||||
<property column="Bezahlt" type="bool" name="Bezahlt" />
|
||||
|
||||
<bag name="InvoiceBases" table="gkvabrechnung2invoicebase" generic="true" cascade="none" batch-size="250">
|
||||
<key column="gkvabrechnungoid" />
|
||||
<many-to-many column="invoicebaseoid" class="BeWo.Data.Entities.InvoiceBase, BeWo.Data" />
|
||||
</bag>
|
||||
<bag name="GkvTransferProtokolle" table="gkvtransferprotokoll" generic="true" cascade="all-delete-orphan" batch-size="250">
|
||||
<key column="gkvabrechnungoid" />
|
||||
<one-to-many class="BeWo.Data.Entities.GkvTransferProtokoll, BeWo.Data" />
|
||||
</bag>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
||||
28
Data/Mappings/GkvTransferProtokoll.hbm.xml
Normal file
28
Data/Mappings/GkvTransferProtokoll.hbm.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="BeWo.Data.Entities.GkvTransferProtokoll, BeWo.Data" table="GkvTransferProtokoll">
|
||||
<id name="Oid" column="Oid" type="Int64" unsaved-value="null">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<version type="Int64" column="Version" name="Version" />
|
||||
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
|
||||
<property column="Notice" type="String" name="Notice" length="1024" />
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
<property column="UdpUser" type="String" name="UdpUser" length="256" />
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
<property column="GkvAbrechnungOid" type="Int64" name="GkvAbrechnungOid" />
|
||||
<property column="AbsenderBezeichnung" type="string" name="AbsenderBezeichnung" />
|
||||
<property column="EmpfangerBezeichnung" type="string" name="EmpfangerBezeichnung" />
|
||||
<property column="Dateityp" type="string" name="Dateityp" />
|
||||
<property column="Dateiname" type="string" name="Dateiname" />
|
||||
<property column="PruftDatum" type="DateTime" name="PruftDatum" />
|
||||
<property column="PruftFehler" type="string" name="PruftFehler" />
|
||||
<property column="VerschlusseltDatum" type="DateTime" name="VerschlusseltDatum" />
|
||||
<property column="VerschlusseltFehler" type="string" name="VerschlusseltFehler" />
|
||||
<property column="UbertragDatum" type="DateTime" name="UbertragDatum" />
|
||||
<property column="UbertragFehler" type="string" name="UbertragFehler" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -163,7 +163,8 @@ namespace BeWo.Data
|
||||
|
||||
public static bool TenantExists()
|
||||
{
|
||||
String path = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + MultitenancyOperationContextExt.Current.Tenant + ".config");
|
||||
var tenant = MultitenancyOperationContextExt.Current?.Tenant ?? SessionFacade.Tenant;
|
||||
String path = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"Multitenancy\" + tenant + ".config");
|
||||
|
||||
return File.Exists(path);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GkvAbrechnungView.aspx.cs" Inherits="Host.GkvAbrechnungView" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GkvAbrechnungView.aspx.cs" Inherits="Host.GkvAbrechnungView"%>
|
||||
|
||||
<%@ Register assembly="DevExpress.XtraReports.v23.2.Web.WebForms, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraReports.Web" tagprefix="dxxr" %>
|
||||
|
||||
@@ -17,266 +17,272 @@ using DevExpress.XtraReports.UI;
|
||||
|
||||
using Page = System.Web.UI.Page;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using System.Net;
|
||||
using System.Collections.Specialized;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared.Extensions;
|
||||
using System.Threading;
|
||||
|
||||
namespace Host
|
||||
{
|
||||
public partial class GkvAbrechnungView : Page
|
||||
{
|
||||
private Dictionary<string, object> slicedToken;
|
||||
private AbstractReportCreator reportCreator;
|
||||
private string GETSERVER_URL = "https://support.bewoplaner.de/api/getserver.php?k={0}&t=0";
|
||||
private string LOGINSERVER_URL = "{0}/Host/Login.aspx";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public GkvApp8Request GkvRequest { get; set; }
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
//if(!SessionFacade.IsUserLoggedIn())
|
||||
//{
|
||||
// throw new SecurityException("Anmeldung erforderlich!");
|
||||
//}
|
||||
//https://app8.bewoplaner.de/Host/GkvAbrechungview?k=12345&username=meier&password=test
|
||||
|
||||
var report = CreateReport();
|
||||
using (var repxStream = new MemoryStream())
|
||||
var str = new StreamReader(Request.InputStream).ReadToEnd();
|
||||
|
||||
if (string.IsNullOrEmpty(str))
|
||||
SendErrorResponse("Ungültige Eingabe");
|
||||
|
||||
GkvRequest = JsonConvert.DeserializeObject<GkvApp8Request>(str);
|
||||
|
||||
if (!CheckValues())
|
||||
SendErrorResponse("Check Fehlgeschlagen");
|
||||
|
||||
if (!TryLogin())
|
||||
SendErrorResponse("Login Fehlgeschlagen");
|
||||
|
||||
switch (GkvRequest.Type)
|
||||
{
|
||||
case GkvAbrechnungApp8RequestTypeDC.SendNew:
|
||||
SendNew(JsonConvert.DeserializeObject<GkvApp8SendNewRequest>(str));
|
||||
return;
|
||||
case GkvAbrechnungApp8RequestTypeDC.GetStatus:
|
||||
GetStatus(JsonConvert.DeserializeObject<GkvApp8GetStatusRequest>(str));
|
||||
return;
|
||||
case GkvAbrechnungApp8RequestTypeDC.GetIKNumber:
|
||||
GetIK(JsonConvert.DeserializeObject<GkvApp8GetIKRequest>(str));
|
||||
return;
|
||||
default:
|
||||
SendErrorResponse("GkvAbrechnungType unbekannt.");
|
||||
return;
|
||||
}
|
||||
|
||||
report.PrintingSystem.SaveDocument(repxStream, new NativeFormatOptions { Compressed = true });
|
||||
SendErrorResponse("Unbekannter Fehler");
|
||||
}
|
||||
catch(ThreadAbortException eee)
|
||||
{
|
||||
|
||||
//var test = new XtraReport();
|
||||
//test.PrintingSystem.LoadDocument(repxStream);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var ex_text = ex.Message + "\n\n" + ex.StackTrace;
|
||||
SendErrorResponse(ex_text);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var bytesToWrite = repxStream.ToArray();
|
||||
private void SendErrorResponse(string message)
|
||||
{
|
||||
var response = new GkvApp8Response();
|
||||
|
||||
Response.OutputStream.Write(bytesToWrite, 0, bytesToWrite.Length);
|
||||
response.Success = false;
|
||||
response.Message = message;
|
||||
|
||||
SendResponse(JsonConvert.SerializeObject(response));
|
||||
}
|
||||
private void SendResponse(object res) => SendResponse(JsonConvert.SerializeObject(res));
|
||||
private void SendResponse(string str)
|
||||
{
|
||||
Response.Write(str);
|
||||
|
||||
Response.End();
|
||||
//Context.ApplicationInstance.CompleteRequest();
|
||||
}
|
||||
|
||||
private bool CheckValues() => CheckValues(GkvRequest);
|
||||
private bool CheckValues(GkvApp8Request request)
|
||||
{
|
||||
if (request == null)
|
||||
return false;
|
||||
if (request.Type == GkvAbrechnungApp8RequestTypeDC.Default)
|
||||
return false;
|
||||
if (string.IsNullOrWhiteSpace(request.Username))
|
||||
return false;
|
||||
if (string.IsNullOrWhiteSpace(request.Tenant))
|
||||
return false;
|
||||
if (string.IsNullOrWhiteSpace(request.Password))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool TryLogin() => TryLogin(GkvRequest);
|
||||
private bool TryLogin(GkvApp8Request gkv_request)
|
||||
{
|
||||
var server = GetServerFromTenant(gkv_request.Tenant);
|
||||
var loginurl = string.Format(LOGINSERVER_URL, server);
|
||||
|
||||
#if DEBUG
|
||||
//loginurl = string.Format(LOGINSERVER_URL, "https://app4.bewoplaner.de");
|
||||
loginurl = string.Format(LOGINSERVER_URL, "http://localhost:3777");
|
||||
#endif
|
||||
|
||||
bool successful = false;
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
var nvc = new NameValueCollection();
|
||||
nvc.Add("password", gkv_request.Password);
|
||||
nvc.Add("username", gkv_request.Username);
|
||||
nvc.Add("tenant", gkv_request.Tenant);
|
||||
|
||||
var loginresponse = client.UploadValues(loginurl, "POST", nvc);
|
||||
|
||||
successful = BitConverter.ToBoolean(loginresponse, 0);
|
||||
}
|
||||
|
||||
return successful;
|
||||
}
|
||||
|
||||
|
||||
private void SendNew(GkvApp8SendNewRequest req)
|
||||
{
|
||||
var debug_mode = true;
|
||||
|
||||
// Save File
|
||||
SaveFileInFileSystem(req, debug_mode);
|
||||
|
||||
// Make DB Entry
|
||||
//var entry = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewEntity(req.GkvAbrechnung);
|
||||
|
||||
//entry.Kundennummer = req.Tenant;
|
||||
|
||||
// DAOFactory.GenericDAO.Insert(entry);
|
||||
|
||||
// Dakota Send
|
||||
|
||||
// Response
|
||||
var response = new GkvApp8SendNewResponse();
|
||||
|
||||
response.Success = true;
|
||||
response.GkvTransferProtokollDC = new GkvTransferProtokollDC()
|
||||
{
|
||||
AbsenderBezeichnung = "Absender",
|
||||
Dateiname = req.GkvAbrechnung.Transfername,
|
||||
Dateityp = "Nutzdatendatei",
|
||||
EmpfangerBezeichnung = "Empfang",
|
||||
GkvAbrechnungOid = req.GkvAbrechnung.GkvAbrechnungOid.Value,
|
||||
PruftFehler = "Manueller Insert",
|
||||
PruftDatum = DateTime.Now
|
||||
};
|
||||
|
||||
SendResponse(response);
|
||||
}
|
||||
private void SaveFileInFileSystem(GkvApp8SendNewRequest req, bool debug_mode = false)
|
||||
{
|
||||
string root_path;
|
||||
string file_path;
|
||||
if (debug_mode)
|
||||
{
|
||||
root_path = $@"C:\GkvAbrechnung\";
|
||||
file_path = $@"{req.Tenant}-{req.GkvAbrechnung.IKDatenannahmestelle}-{req.GkvAbrechnung.Transfername}";
|
||||
}
|
||||
else
|
||||
{
|
||||
root_path = $@"C:\GkvAbrechnung\{req.Tenant}\{req.GkvAbrechnung.IKDatenannahmestelle}\";
|
||||
file_path = $@"{req.GkvAbrechnung.Transfername}";
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(root_path);
|
||||
|
||||
var finalpath = root_path + file_path;
|
||||
|
||||
File.WriteAllText(finalpath, req.GkvAbrechnung.Nutzdatendatei);
|
||||
|
||||
var auftragsdatei2 = Encoding.GetEncoding("ISO-8859-1").GetBytes(req.GkvAbrechnung.Auftragsdatei);
|
||||
|
||||
File.WriteAllBytes(finalpath + ".auf", auftragsdatei2);
|
||||
}
|
||||
|
||||
private void GetStatus(GkvApp8GetStatusRequest req)
|
||||
{
|
||||
// Get Keys
|
||||
//var gkv_oid = req.GkvAbrechnungDC.GkvAbrechnungOid;
|
||||
//var kundennummer = req.GkvAbrechnungDC.Kundennummer;
|
||||
|
||||
// Get Entry
|
||||
var entries = DAOFactory.GenericDAO.GetAllActive<GkvAbrechnung>();
|
||||
|
||||
var tuples = req.Tuples;
|
||||
var tuples_len = tuples.Length;
|
||||
|
||||
var response_tuples = new Tuple<bool, GkvAbrechnungDC>[tuples_len];
|
||||
|
||||
for (int i = 0; i < tuples_len; i++)
|
||||
{
|
||||
var tuple = tuples[i];
|
||||
var gkv_abrechnung = tuple.Item1;
|
||||
var gkv_abrechnung_oid = tuple.Item2;
|
||||
|
||||
var app8_gkv_abrechnung = entries.First(x => x.Oid == gkv_abrechnung_oid);
|
||||
var app8_gkv_abrechnung_dc = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(app8_gkv_abrechnung);
|
||||
|
||||
if (gkv_abrechnung.IsUpToDate(app8_gkv_abrechnung_dc))
|
||||
{
|
||||
response_tuples[i] = new Tuple<bool, GkvAbrechnungDC>(true, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
response_tuples[i] = new Tuple<bool, GkvAbrechnungDC>(false, app8_gkv_abrechnung_dc);
|
||||
}
|
||||
}
|
||||
|
||||
// Response
|
||||
var response = new GkvApp8GetStatusResponse();
|
||||
|
||||
response.Success = true;
|
||||
response.Tuples = response_tuples;
|
||||
|
||||
SendResponse(response);
|
||||
}
|
||||
|
||||
private void GetIK(GkvApp8GetIKRequest req)
|
||||
{
|
||||
var input = req.KrankenkassenIK;
|
||||
|
||||
var response = new GkvApp8GetIKResponse();
|
||||
|
||||
response.Success = true;
|
||||
response.IKVersichertenKarte = input;
|
||||
response.IKDatenannahmestelle = "111222333";
|
||||
response.IKKostenträger = "333444555";
|
||||
|
||||
SendResponse(response);
|
||||
}
|
||||
|
||||
private string GetServerFromTenant(string tenant)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
String url = String.Format(GETSERVER_URL, tenant);
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
//MessageBox.Show(hostAddress);
|
||||
byte[] response = client.UploadValues(url, "POST", new NameValueCollection());
|
||||
|
||||
String server = System.Text.Encoding.ASCII.GetString(response);
|
||||
|
||||
return server;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Response.Write(ex.Message + "\n\n" + ex.StackTrace);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private XtraReport CreateReport()
|
||||
{
|
||||
String kundennummer = Request.Params["Kundennummer"];
|
||||
String ikDatenannahmestelle = Request.Params["IKDatenannahmestelle"];
|
||||
String ikEmpfang = Request.Params["IKEmpfang"];
|
||||
String transferName = Request.Params["TransferName"];
|
||||
String nutzdatendatei = Request.Params["Nutzdatendatei"];
|
||||
String auftragsdatei = Request.Params["Auftragsdatei"];
|
||||
|
||||
var auftragsdateiEncoded = Encoding.GetEncoding("ISO-8859-1").GetBytes(auftragsdatei);
|
||||
|
||||
var basePath = $@"C:\GkvAbrechnung\{kundennummer}\{ikDatenannahmestelle}";
|
||||
var nutzdatendateiPath = $@"{basePath}\{transferName}";
|
||||
var auftragsdateiPath = $@"{basePath}\{transferName}.auf";
|
||||
|
||||
Directory.CreateDirectory(basePath);
|
||||
File.WriteAllText(nutzdatendateiPath, nutzdatendatei);
|
||||
File.WriteAllBytes(auftragsdateiPath, auftragsdateiEncoded);
|
||||
|
||||
/*
|
||||
var token = Request.Params["token"].Split(',')[0];
|
||||
if (SecurityUtils.CheckToken(token, Request.Url.ToString()))
|
||||
{
|
||||
slicedToken = SecurityUtils.sliceToken(Request.Params["token"].Split(',')[0], Request.Url.ToString());
|
||||
reportCreator = GetReportCreator();
|
||||
|
||||
var lType = Utils.EnumParse<ReportTypes>(Request.Params["type"]);
|
||||
|
||||
XtraReport report;
|
||||
switch (lType)
|
||||
{
|
||||
case ReportTypes.Settlement:
|
||||
report = CreateSettlementReport();
|
||||
break;
|
||||
case ReportTypes.ServiceOverviewAllCustomers:
|
||||
return CreateServiceOverviewAllCustomersReport();
|
||||
case ReportTypes.ServicesOverviewNew:
|
||||
report = CreateServiceOverviewNew();
|
||||
break;
|
||||
case ReportTypes.ValidationMessageReport:
|
||||
report = CreateValidationMessageListReport();
|
||||
break;
|
||||
default:
|
||||
report = CreateQueryReport();
|
||||
break;
|
||||
}
|
||||
if (report != null && lType != ReportTypes.ServiceOverviewAllCustomers &&
|
||||
lType != ReportTypes.ServiceInvoice)
|
||||
{
|
||||
if (report.Pages.Count == 0)
|
||||
{
|
||||
report.CreateDocument();
|
||||
}
|
||||
}
|
||||
return report;
|
||||
}
|
||||
*/
|
||||
|
||||
Response.Write("GkvAbrechnung.View erfolgreich aufgerufen :)");
|
||||
return new XtraReport();
|
||||
}
|
||||
|
||||
private XtraReport CreateTestReportKalender()
|
||||
{
|
||||
var abc = Request.Params["r"].Split('-');
|
||||
var rightsList = abc.Select(r => (UserRightType)Int32.Parse(r)).ToList();
|
||||
//employeeOid, viewType
|
||||
var datesList = new List<DateTime>();
|
||||
string datesString = Request.Params["d"];
|
||||
for (var i = 0; i < datesString.Length; i += 8)
|
||||
{
|
||||
var x = datesString.Substring(i, 8);
|
||||
datesList.Add(new DateTime(Convert.ToInt32(x.Substring(4, 4)), Convert.ToInt32(x.Substring(2, 2)), Convert.ToInt32(x.Substring(0, 2))));
|
||||
}
|
||||
|
||||
var vt = (AppointmentViewType) int.Parse(Request.Params["vt"]);
|
||||
var s = DateTime.Parse(Request.Params["s"]);
|
||||
var e = DateTime.Parse(Request.Params["e"]);
|
||||
var employeeOid = long.Parse(Request.Params["eOid"]);
|
||||
return reportCreator.CreateKalenderReport(employeeOid, vt, s, e, datesList, rightsList);
|
||||
}
|
||||
|
||||
|
||||
private XtraReport CreateQueryReport()
|
||||
{
|
||||
var queryOid = long.Parse(Request.Params["qoid"]);
|
||||
var queryReportId = Request.Params["dcid"];
|
||||
|
||||
return reportCreator.CreateQueryReport(queryOid, queryReportId);
|
||||
}
|
||||
|
||||
private XtraReport CreateServiceOverviewAllCustomersReport()
|
||||
{
|
||||
int month = int.Parse(this.Request.Params["month"]);
|
||||
int year = int.Parse(this.Request.Params["year"]);
|
||||
long orgaOid = long.Parse(this.Request.Params["orgaOid"]);
|
||||
long empOid = long.Parse(this.Request.Params["empOid"]);
|
||||
|
||||
int startDay = 1;
|
||||
if (Request.Params["start"] != null)
|
||||
{
|
||||
startDay = int.Parse(Request.Params["start"]);
|
||||
}
|
||||
|
||||
int endDay = DateTime.DaysInMonth(year, month);
|
||||
if (Request.Params["end"] != null)
|
||||
{
|
||||
endDay = int.Parse(Request.Params["end"]);
|
||||
}
|
||||
|
||||
long? scOid = null;
|
||||
if (Request.Params["scOid"] != null)
|
||||
scOid = long.Parse(Request.Params["scOid"]);
|
||||
|
||||
return reportCreator.CreateServiceOverviewAllCustomersReport(month, year, orgaOid, empOid, scOid, startDay, endDay, false);
|
||||
}
|
||||
|
||||
private XtraReport CreateServiceOverviewNew()
|
||||
{
|
||||
|
||||
int month = int.Parse(Request.Params["month"]);
|
||||
int year = int.Parse(Request.Params["year"]);
|
||||
int filterType = int.Parse(Request.Params["ft"]);
|
||||
|
||||
long? customerOid = null;
|
||||
if (Request.Params["cOid"] != null)
|
||||
{
|
||||
customerOid = long.Parse(Request.Params["cOid"]);
|
||||
}
|
||||
|
||||
long? teamOid = null;
|
||||
if (Request.Params["tOid"] != null)
|
||||
{
|
||||
teamOid =long.Parse(Request.Params["tOid"]);
|
||||
}
|
||||
|
||||
long? orgaOid = null;
|
||||
if (Request.Params["orgaOid"] != null)
|
||||
{
|
||||
orgaOid = long.Parse(Request.Params["orgaOid"]);
|
||||
}
|
||||
|
||||
long? empOid = null;
|
||||
if (Request.Params["empOid"] != null)
|
||||
{
|
||||
empOid = long.Parse(Request.Params["empOid"]);
|
||||
}
|
||||
|
||||
int startDay = 1;
|
||||
if (Request.Params["start"] != null)
|
||||
{
|
||||
startDay = int.Parse(Request.Params["start"]);
|
||||
}
|
||||
|
||||
int endDay = DateTime.DaysInMonth(year, month);
|
||||
if (Request.Params["end"] != null)
|
||||
{
|
||||
endDay = int.Parse(Request.Params["end"]);
|
||||
}
|
||||
|
||||
long? scOid;
|
||||
if (Request.Params["scOid"] != null)
|
||||
scOid = long.Parse(Request.Params["scOid"]);
|
||||
else
|
||||
scOid = null;
|
||||
//nf = nur fehlende:-)
|
||||
bool nf = false;
|
||||
if (Request.Params["nf"] != null && Request.Params["nf"] == "1")
|
||||
{
|
||||
nf = true;
|
||||
}
|
||||
|
||||
return reportCreator.CreateServiceOverviewReportNew(month, year, (QBFilterEnum)filterType, customerOid, teamOid, empOid, orgaOid, scOid, startDay, endDay, nf);
|
||||
}
|
||||
|
||||
|
||||
private XtraReport CreateSettlementReport()
|
||||
{
|
||||
String dcId = Request.Params["dcid"];
|
||||
|
||||
long? invoiceBaseOid = null;
|
||||
if (Request.Params["ibid"] != null)
|
||||
invoiceBaseOid = long.Parse(Request.Params["ibid"]);
|
||||
|
||||
return reportCreator.CreateSettlementReport(dcId, invoiceBaseOid);
|
||||
}
|
||||
|
||||
private XtraReport CreateValidationMessageListReport()
|
||||
{
|
||||
DateTime start = DateTime.Now.Date;
|
||||
DateTime end = start.AddMonths(1).AddTicks(-1);
|
||||
|
||||
return reportCreator.CreateValidationMessageListReport(start, end);
|
||||
}
|
||||
|
||||
|
||||
private AbstractReportCreator GetReportCreator()
|
||||
{
|
||||
long? templateOid = null;
|
||||
if (Request.Params["template"] != null)
|
||||
{
|
||||
templateOid = long.Parse(Request.Params["template"]);
|
||||
}
|
||||
|
||||
String t = slicedToken["tenant"].ToString();
|
||||
SessionFacade.Tenant = t;
|
||||
|
||||
AbstractReportCreator creator = PluginLoader.FindClass<DefaultReportCreator>();
|
||||
|
||||
|
||||
if (creator == null)
|
||||
creator = new DefaultReportCreator();
|
||||
creator.TemplateOid = templateOid;
|
||||
|
||||
#if DEBUG
|
||||
creator.TempPath = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"demo\temp");
|
||||
#else
|
||||
|
||||
creator.TempPath = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, t + @"\temp");
|
||||
#endif
|
||||
|
||||
|
||||
return creator;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<%@ ServiceHost Language="C#" Debug="true" Service="BeWo.Service.ServiceImplementations.GkvInvoiceServiceImp" %>
|
||||
@@ -99,6 +99,7 @@
|
||||
<Reference Include="Microsoft.CodeAnalysis.Workspaces, Version=3.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.3.4.0\lib\netstandard2.0\Microsoft.CodeAnalysis.Workspaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" />
|
||||
<Reference Include="NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Lib\NHibernate.dll</HintPath>
|
||||
@@ -198,7 +199,6 @@
|
||||
<Content Include="CustomerService.svc" />
|
||||
<Content Include="DocumentDownload.aspx" />
|
||||
<Content Include="Download.aspx" />
|
||||
<Content Include="GkvInvoiceService.svc" />
|
||||
<Content Include="DownloadService.svc" />
|
||||
<Content Include="GkvAbrechnungView.aspx" />
|
||||
<Content Include="ReportService.svc" />
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
using System;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace Host
|
||||
@@ -7,6 +17,21 @@ namespace Host
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
var username = Request.Form["username"];
|
||||
var password = Request.Form["password"];
|
||||
|
||||
var service = new UserServiceImp();
|
||||
|
||||
var result_valid = service.IsUserValid(username, password);
|
||||
var result = result_valid == BS.Shared.UserValidationResult.UserValid;
|
||||
|
||||
if (!result)
|
||||
{
|
||||
System.Threading.Thread.Sleep(3000);
|
||||
}
|
||||
|
||||
Response.Write(result);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -962,7 +962,6 @@ namespace Host
|
||||
|
||||
AbstractReportCreator creator = PluginLoader.FindClass<DefaultReportCreator>();
|
||||
|
||||
|
||||
if (creator == null)
|
||||
creator = new DefaultReportCreator();
|
||||
creator.TemplateOid = templateOid;
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
CREATE TABLE `gkvabrechnung` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`Kundennummer` varchar(256) DEFAULT NULL,
|
||||
`IKLeistungserbringer` varchar(256) DEFAULT NULL,
|
||||
`IKVersichertenKarte` varchar(256) DEFAULT NULL,
|
||||
`IKKostentrager` varchar(256) DEFAULT NULL,
|
||||
`IKDatenannahmestelle` varchar(256) DEFAULT NULL,
|
||||
`AbrechnungsZeitraumStart` datetime DEFAULT NULL,
|
||||
`AbrechnungsZeitraumEnde` datetime DEFAULT NULL,
|
||||
`Nutzdatendatei` text,
|
||||
`Auftragsdatei` varchar(1024) DEFAULT NULL,
|
||||
`Transfername` varchar(256) DEFAULT NULL,
|
||||
`Datenaustauschreferenz` int DEFAULT NULL,
|
||||
`ErstelltAm` datetime DEFAULT NULL,
|
||||
`VerschluesseltAm` datetime DEFAULT NULL,
|
||||
`UebertragenAm` datetime DEFAULT NULL,
|
||||
`AntwortErhaltenAm` datetime DEFAULT NULL,
|
||||
`AntwortEntschluesseltAm` datetime DEFAULT NULL,
|
||||
`Betrag` decimal(18,10) DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1
|
||||
@@ -1,8 +0,0 @@
|
||||
CREATE TABLE `gkvabrechnung2invoicebase` (
|
||||
`GkvAbrechnungOid` bigint NOT NULL,
|
||||
`InvoiceBaseOid` bigint NOT NULL,
|
||||
PRIMARY KEY (`GkvAbrechnungOid`,`InvoiceBaseOid`),
|
||||
KEY `fk_invoicebaseoid_idx` (`InvoiceBaseOid`),
|
||||
CONSTRAINT `fk_gkvabrechnungoid` FOREIGN KEY (`GkvAbrechnungOid`) REFERENCES `gkvabrechnung` (`Oid`),
|
||||
CONSTRAINT `fk_invoicebaseoid` FOREIGN KEY (`InvoiceBaseOid`) REFERENCES `invoicebase` (`Oid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
61
Model/Changes_2024_05_15 ALLE GKV TABELLEN.txt
Normal file
61
Model/Changes_2024_05_15 ALLE GKV TABELLEN.txt
Normal file
@@ -0,0 +1,61 @@
|
||||
CREATE TABLE `gkvabrechnung` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`IKLeistungserbringer` varchar(256) DEFAULT NULL,
|
||||
`IKVersichertenKarte` varchar(256) DEFAULT NULL,
|
||||
`IKKostentrager` varchar(256) DEFAULT NULL,
|
||||
`IKDatenannahmestelle` varchar(256) DEFAULT NULL,
|
||||
`AbrechnungsZeitraumStart` datetime DEFAULT NULL,
|
||||
`AbrechnungsZeitraumEnde` datetime DEFAULT NULL,
|
||||
`Nutzdatendatei` text,
|
||||
`Auftragsdatei` varchar(1024) DEFAULT NULL,
|
||||
`Transfername` varchar(256) DEFAULT NULL,
|
||||
`Dateigrosse` int DEFAULT NULL,
|
||||
`Datenaustauschreferenz` int DEFAULT NULL,
|
||||
`ErstelltAm` datetime DEFAULT NULL,
|
||||
`Betrag` decimal(18,10) DEFAULT NULL,
|
||||
`Bezahlt` tinyint DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `gkvabrechnung2invoicebase` (
|
||||
`GkvAbrechnungOid` bigint NOT NULL,
|
||||
`InvoiceBaseOid` bigint NOT NULL,
|
||||
PRIMARY KEY (`GkvAbrechnungOid`,`InvoiceBaseOid`),
|
||||
KEY `fk_invoicebaseoid_idx` (`InvoiceBaseOid`),
|
||||
CONSTRAINT `fk_gkvabrechnungoid` FOREIGN KEY (`GkvAbrechnungOid`) REFERENCES `gkvabrechnung` (`Oid`),
|
||||
CONSTRAINT `fk_invoicebaseoid` FOREIGN KEY (`InvoiceBaseOid`) REFERENCES `invoicebase` (`Oid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `gkvtransferprotokoll` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int NOT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`GkvAbrechnungOid` bigint DEFAULT NULL,
|
||||
`AbsenderBezeichnung` varchar(4096) DEFAULT NULL,
|
||||
`EmpfangerBezeichnung` varchar(4096) DEFAULT NULL,
|
||||
`Dateityp` varchar(4096) DEFAULT NULL,
|
||||
`Dateiname` varchar(4096) DEFAULT NULL,
|
||||
`PruftDatum` datetime DEFAULT NULL,
|
||||
`PruftFehler` varchar(4096) DEFAULT NULL,
|
||||
`VerschlusseltDatum` datetime DEFAULT NULL,
|
||||
`VerschlusseltFehler` varchar(4096) DEFAULT NULL,
|
||||
`UbertragDatum` datetime DEFAULT NULL,
|
||||
`UbertragFehler` varchar(4096) DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`),
|
||||
KEY `FK_GKVTRANSFERPROTOKOLL_GKVABRECHNUNG` (`GkvAbrechnungOid`),
|
||||
CONSTRAINT `FK_GKVTRANSFERPROTOKOLL_GKVABRECHNUNG` FOREIGN KEY (`GkvAbrechnungOid`) REFERENCES `gkvabrechnung` (`Oid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
|
||||
@@ -2,8 +2,10 @@
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using NHibernate.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
@@ -11,6 +13,12 @@ namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public override GkvAbrechnungDC MergeWithDC(GkvAbrechnung pEntity, GkvAbrechnungDC pDataContract)
|
||||
{
|
||||
if(pEntity.InvoiceBases == null || !pEntity.InvoiceBases.Any())
|
||||
{
|
||||
|
||||
}
|
||||
var orga = pEntity.InvoiceBases.First().CostBearer2SupportConcept.CostBearer.Organisation;
|
||||
|
||||
pDataContract.GkvAbrechnungOid = pEntity.Oid;
|
||||
pDataContract.GkvAbrechnungVersion = pEntity.Version;
|
||||
pDataContract.Notice = pEntity.Notice;
|
||||
@@ -26,18 +34,20 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.Nutzdatendatei = pEntity.Nutzdatendatei;
|
||||
pDataContract.Auftragsdatei = pEntity.Auftragsdatei;
|
||||
pDataContract.Transfername = pEntity.Transfername;
|
||||
pDataContract.Dateigröße = pEntity.Dateigrosse;
|
||||
pDataContract.Datenaustauschreferenz = pEntity.Datenaustauschreferenz;
|
||||
|
||||
pDataContract.UebertragenAm = pEntity.UebertragenAm;
|
||||
pDataContract.AntwortErhaltenAm = pEntity.AntwortErhaltenAm;
|
||||
pDataContract.AntwortEntschluesseltAm = pEntity.AntwortEntschluesseltAm;
|
||||
pDataContract.UebertragenAm = pEntity.UebertragenAm;
|
||||
pDataContract.ErstelltAm = pEntity.ErstelltAm;
|
||||
|
||||
pDataContract.Betrag = pEntity.Betrag;
|
||||
pDataContract.Bezahlt = pEntity.Bezahlt;
|
||||
|
||||
pDataContract.InvoiceBases = MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDCs(pEntity.InvoiceBases);
|
||||
|
||||
pDataContract.Organisation = MapperFactory.OrganisationDC_OrganisationMapper.MapToNewDC(orga);
|
||||
|
||||
pDataContract.TransferProtokolle = MapperFactory.GkvTransferProtokollDC_GkvTransferprotokoll.MapToNewDCs(pEntity.GkvTransferProtokolle);
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
@@ -60,29 +70,23 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pEntity.Nutzdatendatei = pDataContract.Nutzdatendatei;
|
||||
pEntity.Auftragsdatei = pDataContract.Auftragsdatei;
|
||||
pEntity.Transfername = pDataContract.Transfername;
|
||||
pEntity.Dateigrosse = pDataContract.Dateigröße;
|
||||
pEntity.Datenaustauschreferenz = pDataContract.Datenaustauschreferenz;
|
||||
|
||||
pEntity.ErstelltAm = pDataContract.ErstelltAm;
|
||||
pEntity.VerschluesseltAm = pDataContract.VerschluesseltAm;
|
||||
pEntity.UebertragenAm = pDataContract.UebertragenAm;
|
||||
pEntity.AntwortErhaltenAm = pDataContract.AntwortErhaltenAm;
|
||||
pEntity.AntwortEntschluesseltAm = pDataContract.AntwortEntschluesseltAm;
|
||||
|
||||
pEntity.Betrag = pDataContract.Betrag;
|
||||
pEntity.Bezahlt = pDataContract.Bezahlt;
|
||||
|
||||
if (pEntity.GkvTransferProtokolle is null)
|
||||
pEntity.GkvTransferProtokolle = new List<GkvTransferProtokoll>();
|
||||
|
||||
MapperFactory.GkvTransferProtokollDC_GkvTransferprotokoll.MergeWithEntitys(pDataContract.TransferProtokolle, pEntity.GkvTransferProtokolle);
|
||||
|
||||
if (pEntity.InvoiceBases is null)
|
||||
pEntity.InvoiceBases = new List<InvoiceBase>();
|
||||
|
||||
pDataContract.InvoiceBases.ForEach(
|
||||
i =>
|
||||
{
|
||||
var original = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(i.InvoiceBaseOid.Value);
|
||||
|
||||
MapperFactory.InvoiceBaseDC_InvoiceBase.MergeWithEntity(i, original);
|
||||
|
||||
pEntity.InvoiceBases.Add(original);
|
||||
}
|
||||
);
|
||||
pEntity.InvoiceBases = DAOFactory.GenericDAO.LoadByIDs<InvoiceBase>(pDataContract.InvoiceBases.Select(x => x.InvoiceBaseOid.Value));
|
||||
|
||||
//MapperFactory.InvoiceBaseDC_InvoiceBase.MergeWithEntitys(pDataContract.InvoiceBases, pEntity.InvoiceBases);
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using NHibernate.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class GkvTransferProtokollDC_GkvTransferprotokoll : AbstractIDCEntityMapper<GkvTransferProtokoll, GkvTransferProtokollDC>
|
||||
{
|
||||
public override GkvTransferProtokollDC MergeWithDC(GkvTransferProtokoll pEntity, GkvTransferProtokollDC pDataContract)
|
||||
{
|
||||
pDataContract.AbsenderBezeichnung = pEntity.AbsenderBezeichnung;
|
||||
pDataContract.Dateiname = pEntity.Dateiname;
|
||||
pDataContract.Dateityp = pEntity.Dateityp;
|
||||
pDataContract.EmpfangerBezeichnung = pEntity.EmpfangerBezeichnung;
|
||||
pDataContract.GkvAbrechnungOid = pEntity.GkvAbrechnungOid;
|
||||
pDataContract.GkvTransferProtokollOid = pEntity.Oid;
|
||||
pDataContract.GkvTransferProtokollVersion = pEntity.Version;
|
||||
pDataContract.Notice = pEntity.Notice;
|
||||
pDataContract.PruftDatum = pEntity.PruftDatum;
|
||||
pDataContract.PruftFehler = pEntity.PruftFehler;
|
||||
pDataContract.UbertragDatum = pEntity.UbertragDatum;
|
||||
pDataContract.UbertragFehler = pEntity.UbertragFehler;
|
||||
pDataContract.VerschlusseltDatum = pEntity.VerschlusseltDatum;
|
||||
pDataContract.VerschlusseltFehler = pEntity.VerschlusseltFehler;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public override GkvTransferProtokoll MergeWithEntity(GkvTransferProtokollDC pDataContract, GkvTransferProtokoll pEntity)
|
||||
{
|
||||
this.ConcurrencyCheck(pDataContract.GkvTransferProtokollVersion, pEntity);
|
||||
|
||||
pEntity.AbsenderBezeichnung = pDataContract.AbsenderBezeichnung;
|
||||
pEntity.Dateiname = pDataContract.Dateiname;
|
||||
pEntity.Dateityp = pDataContract.Dateityp;
|
||||
pEntity.EmpfangerBezeichnung = pDataContract.EmpfangerBezeichnung;
|
||||
pEntity.GkvAbrechnungOid = pDataContract.GkvAbrechnungOid;
|
||||
pEntity.Oid = pDataContract.GkvTransferProtokollOid;
|
||||
pEntity.Version = pDataContract.GkvTransferProtokollVersion;
|
||||
pEntity.Notice = pDataContract.Notice;
|
||||
pEntity.PruftDatum = pDataContract.PruftDatum;
|
||||
pEntity.PruftFehler = pDataContract.PruftFehler;
|
||||
pEntity.UbertragDatum = pDataContract.UbertragDatum;
|
||||
pEntity.UbertragFehler = pDataContract.UbertragFehler;
|
||||
pEntity.VerschlusseltDatum = pDataContract.VerschlusseltDatum;
|
||||
pEntity.VerschlusseltFehler = pDataContract.VerschlusseltFehler;
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
|
||||
protected override bool AreDCAndEntityEqual(GkvTransferProtokollDC pDC, GkvTransferProtokoll pEntity)
|
||||
{
|
||||
if (pDC.GkvTransferProtokollOid == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return pDC.GkvTransferProtokollOid == pEntity.Oid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
private static GkvAbrechnungDC_GkvAbrechnung _GkvAbrechungDC_GkvAbrechung;
|
||||
|
||||
private static GkvTransferProtokollDC_GkvTransferprotokoll _GkvTransferProtokollDC_GkvTransferprotokoll;
|
||||
|
||||
private static InvoiceBaseDC_InvoiceBase _InvoiceBaseDC_InvoiceBase;
|
||||
|
||||
private static InvoiceDC_Invoice _InvoiceDC_Invoice;
|
||||
@@ -546,6 +548,9 @@ namespace BeWo.Service.DCEntityMapper
|
||||
public static GkvAbrechnungDC_GkvAbrechnung GkvAbrechnungDC_GkvAbrechnung =>
|
||||
_GkvAbrechungDC_GkvAbrechung ?? (_GkvAbrechungDC_GkvAbrechung = new GkvAbrechnungDC_GkvAbrechnung());
|
||||
|
||||
public static GkvTransferProtokollDC_GkvTransferprotokoll GkvTransferProtokollDC_GkvTransferprotokoll =>
|
||||
_GkvTransferProtokollDC_GkvTransferprotokoll ?? (_GkvTransferProtokollDC_GkvTransferprotokoll = new GkvTransferProtokollDC_GkvTransferprotokoll());
|
||||
|
||||
public static InvoiceBaseDC_InvoiceBase InvoiceBaseDC_InvoiceBase =>
|
||||
_InvoiceBaseDC_InvoiceBase ?? (_InvoiceBaseDC_InvoiceBase = new InvoiceBaseDC_InvoiceBase());
|
||||
|
||||
|
||||
@@ -230,6 +230,7 @@
|
||||
<Compile Include="DCEntityMapper\DienstvertretungDC_Dienstvertretung.cs" />
|
||||
<Compile Include="DCEntityMapper\DokumentvorlageDC_Dokumentvorlage.cs" />
|
||||
<Compile Include="DCEntityMapper\AdditionalServiceNoticeDC_AdditionalServiceNotice.cs" />
|
||||
<Compile Include="DCEntityMapper\GkvTransferProtokollDC_GkvTransferprotokoll.cs" />
|
||||
<Compile Include="DCEntityMapper\GkvAbrechnungDC_GkvAbrechnung.cs" />
|
||||
<Compile Include="DCEntityMapper\GeschenkterUrlaubstagDC_GeschenkterUrlaubstag.cs" />
|
||||
<Compile Include="DCEntityMapper\PreisDC_Preis.cs" />
|
||||
@@ -468,7 +469,6 @@
|
||||
<Compile Include="ServiceContracts\IAccountingService.cs" />
|
||||
<Compile Include="ServiceContracts\IAnalysisService.cs" />
|
||||
<Compile Include="ServiceContracts\IMailService.cs" />
|
||||
<Compile Include="ServiceContracts\IGkvInvoiceService.cs" />
|
||||
<Compile Include="ServiceContracts\IOperationsService.cs" />
|
||||
<Compile Include="ServiceContracts\IDownloadService.cs" />
|
||||
<Compile Include="ServiceContracts\IEmployeeService.cs" />
|
||||
@@ -480,7 +480,6 @@
|
||||
<Compile Include="ServiceImplementations\AccountingServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\AnalysisServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\MailServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\GkvInvoiceServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\OperationsServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\QueryServiceImp.cs" />
|
||||
<Compile Include="ServiceImplementations\SearchServiceImp.cs" />
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.ServiceModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.DataContracts.Reports;
|
||||
|
||||
namespace BeWo.Service.ServiceContracts
|
||||
@@ -155,5 +156,17 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
GkvAbrechnungResponseDC CreateNewGkvAbrechnung(GkvAbrechnungRequestDC request);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
GkvAbrechnungDC UpdateGkvAbrechnung(GkvAbrechnungDC abrechnung);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void DeleteGkvAbrechnung(GkvAbrechnungDC abrechnung);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(GkvAbrechnungSendRequestDC req);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ServiceModel;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
|
||||
namespace BeWo.Service.ServiceContracts
|
||||
{
|
||||
[ServiceContract]
|
||||
public interface IGkvInvoiceService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -20,13 +20,18 @@ using BeWo.Service.Invoicing;
|
||||
using Dakota.Logic;
|
||||
using Dakota;
|
||||
using Dakota.Models;
|
||||
using System.Net;
|
||||
using System.Collections.Specialized;
|
||||
using Newtonsoft.Json;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
||||
public class AccountingServiceImp : IAccountingService
|
||||
{
|
||||
|
||||
|
||||
public void DeactivateInvoiceBases(List<InvoiceBaseDC> invoices)
|
||||
{
|
||||
try
|
||||
@@ -34,7 +39,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var s = PluginLoader.FindClass<AccountingService>();
|
||||
s.DeactivateInvoiceBases(invoices);
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -112,20 +117,20 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public List<InvoiceBaseDC> GetInvoiceBases(DateTime? startDate, DateTime? endDate)
|
||||
{
|
||||
try
|
||||
{
|
||||
var s = PluginLoader.FindClass<AccountingService>();
|
||||
public List<InvoiceBaseDC> GetInvoiceBases(DateTime? startDate, DateTime? endDate)
|
||||
{
|
||||
try
|
||||
{
|
||||
var s = PluginLoader.FindClass<AccountingService>();
|
||||
|
||||
return s.GetInvoiceBases(startDate, endDate);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
return s.GetInvoiceBases(startDate, endDate);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<InvoiceBaseDC> GetInvoiceBases2(DateTime? startDate, DateTime? endDate, bool filterByInvoiceDate)
|
||||
{
|
||||
@@ -233,7 +238,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
return y.InvoiceBase.InvoiceDate.Value.Date.CompareTo(x.InvoiceBase.InvoiceDate.Value.Date);
|
||||
});
|
||||
|
||||
|
||||
var dcList = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDCs(entities);
|
||||
|
||||
foreach (var serviceInvoice in dcList)
|
||||
@@ -314,27 +319,27 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
ib.SenderContactInformations = new List<ContactDC>();
|
||||
|
||||
|
||||
|
||||
foreach (var contact in loggedInUser.Employee.Person.Contacts)
|
||||
{
|
||||
var newContact = new ContactDC();
|
||||
newContact.ContactType = contact.Type;
|
||||
newContact.ContactValue = contact.Value;
|
||||
|
||||
|
||||
ib.SenderContactInformations.Add(newContact);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
var newInvoices = MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewEntities(invoices);
|
||||
int count = 0;
|
||||
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
|
||||
foreach (var ib in newInvoices)
|
||||
{
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
|
||||
foreach (var ib in newInvoices)
|
||||
{
|
||||
if (ib.Type == InvoiceType.General)
|
||||
{
|
||||
foreach (var item in ib.InvoiceItems)
|
||||
@@ -342,24 +347,24 @@ namespace BeWo.Service.ServiceImplementations
|
||||
item.AmountTotal = Math.Round(item.AmountTotal ?? 0, 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
}
|
||||
var nextNumber = inc.GetNextInvoiceNumber(count, ib);
|
||||
if (!String.IsNullOrEmpty(nextNumber))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(ib.InvoiceNumber)) // Rechnungsnummer schon vorher erzeugt oder per Hand vergeben.
|
||||
{
|
||||
if (ib.InvoiceNumber == nextNumber)
|
||||
//Die per Hand vergebene Rechnungsnummer ist gleich der nächsten berechneten Rechnungsnummer, daher Rechnungsnummerzähler erhöhen
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ib.InvoiceNumber = nextNumber;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
var nextNumber = inc.GetNextInvoiceNumber(count, ib);
|
||||
if (!String.IsNullOrEmpty(nextNumber))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(ib.InvoiceNumber)) // Rechnungsnummer schon vorher erzeugt oder per Hand vergeben.
|
||||
{
|
||||
if (ib.InvoiceNumber == nextNumber)
|
||||
//Die per Hand vergebene Rechnungsnummer ist gleich der nächsten berechneten Rechnungsnummer, daher Rechnungsnummerzähler erhöhen
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ib.InvoiceNumber = nextNumber;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var factory = PluginLoader.FindClass<InvoiceFactory>();
|
||||
|
||||
@@ -379,13 +384,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DAOFactory.GenericDAO.Insert(newInvoices);
|
||||
|
||||
|
||||
inc.IncreaseInvoiceNumber(count, newInvoices);
|
||||
|
||||
return newInvoices.Select(i => i.Oid.Value).ToList();
|
||||
@@ -419,38 +424,38 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
var newInvoices = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewEntities(neueRechnungen);
|
||||
newInvoices.AddRange(MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewEntities(diffRechnungen));
|
||||
if (newInvoices.Count > 0)
|
||||
{
|
||||
int count = 0;
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
if (newInvoices.Count > 0)
|
||||
{
|
||||
int count = 0;
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
|
||||
foreach (var i in newInvoices)
|
||||
{
|
||||
var nextNumber = inc.GetNextInvoiceNumber(count, i.InvoiceBase);
|
||||
if (!String.IsNullOrEmpty(nextNumber))
|
||||
{
|
||||
//if (!String.IsNullOrEmpty(i.InvoiceBase.InvoiceNumber) && newInvoices.Count == 1)
|
||||
// // Rechnungsnummer schon vorher erzeugt oder per Hand vergeben.
|
||||
//{
|
||||
// if (i.InvoiceBase.InvoiceNumber == nextNumber || newInvoices.Count > 1)
|
||||
// //Die per Hand vergebene Rechnungsnummer ist gleich der nächsten berechneten Rechnungsnummer, daher Rechnungsnummerzähler erhöhen
|
||||
// {
|
||||
// count++;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
i.InvoiceBase.InvoiceNumber = nextNumber;
|
||||
count++;
|
||||
//}
|
||||
}
|
||||
}
|
||||
foreach (var i in newInvoices)
|
||||
{
|
||||
var nextNumber = inc.GetNextInvoiceNumber(count, i.InvoiceBase);
|
||||
if (!String.IsNullOrEmpty(nextNumber))
|
||||
{
|
||||
//if (!String.IsNullOrEmpty(i.InvoiceBase.InvoiceNumber) && newInvoices.Count == 1)
|
||||
// // Rechnungsnummer schon vorher erzeugt oder per Hand vergeben.
|
||||
//{
|
||||
// if (i.InvoiceBase.InvoiceNumber == nextNumber || newInvoices.Count > 1)
|
||||
// //Die per Hand vergebene Rechnungsnummer ist gleich der nächsten berechneten Rechnungsnummer, daher Rechnungsnummerzähler erhöhen
|
||||
// {
|
||||
// count++;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
i.InvoiceBase.InvoiceNumber = nextNumber;
|
||||
count++;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(newInvoices);
|
||||
DAOFactory.GenericDAO.Insert(newInvoices);
|
||||
|
||||
inc.IncreaseInvoiceNumber(count, newInvoices);
|
||||
}
|
||||
return newInvoices.Select(i => i.Oid.Value).ToList();
|
||||
inc.IncreaseInvoiceNumber(count, newInvoices);
|
||||
}
|
||||
return newInvoices.Select(i => i.Oid.Value).ToList();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -466,28 +471,28 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
var newInvoices = MapperFactory.SettlementDC_SettlementInvoice.MapToNewEntities(invoices);
|
||||
int count = 0;
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
var inc = PluginLoader.FindClass<InvoiceNumberGenerator>();
|
||||
|
||||
foreach (var i in newInvoices)
|
||||
{
|
||||
var nextNumber = inc.GetNextInvoiceNumber(count, i.InvoiceBase);
|
||||
if (!String.IsNullOrEmpty(nextNumber))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(i.InvoiceBase.InvoiceNumber)) // Rechnungsnummer schon vorher erzeugt oder per Hand vergeben.
|
||||
{
|
||||
if (i.InvoiceBase.InvoiceNumber == nextNumber)
|
||||
//Die per Hand vergebene Rechnungsnummer ist gleich der nächsten berechneten Rechnungsnummer, daher Rechnungsnummerzähler erhöhen
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i.InvoiceBase.InvoiceNumber = nextNumber;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var i in newInvoices)
|
||||
{
|
||||
var nextNumber = inc.GetNextInvoiceNumber(count, i.InvoiceBase);
|
||||
if (!String.IsNullOrEmpty(nextNumber))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(i.InvoiceBase.InvoiceNumber)) // Rechnungsnummer schon vorher erzeugt oder per Hand vergeben.
|
||||
{
|
||||
if (i.InvoiceBase.InvoiceNumber == nextNumber)
|
||||
//Die per Hand vergebene Rechnungsnummer ist gleich der nächsten berechneten Rechnungsnummer, daher Rechnungsnummerzähler erhöhen
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i.InvoiceBase.InvoiceNumber = nextNumber;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(newInvoices);
|
||||
|
||||
@@ -614,23 +619,23 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
var originals = DAOFactory.GenericDAO.LoadByIDs<SettlementInvoice>(invoices.Select(i => i.SettlementIvoiceOid.Value));
|
||||
MapperFactory.SettlementDC_SettlementInvoice.MergeWithEntitys(invoices, originals);
|
||||
|
||||
//originals.ForEach(
|
||||
|
||||
//originals.ForEach(
|
||||
// i =>
|
||||
// {
|
||||
//i.InvoiceBase.Type = InvoiceType.Settlement;
|
||||
//i.InvoiceBase.Type = InvoiceType.Settlement;
|
||||
|
||||
// We´ll add an invoiceitem, so we can treat a settlement like any other invoice
|
||||
//i.InvoiceBase.InvoiceItems.Clear();
|
||||
//i.InvoiceBase.InvoiceItems.Add(
|
||||
// new InvoiceItem
|
||||
// {
|
||||
// AmountTotal = i.Claim,
|
||||
// ItemPeriodStart = i.InvoiceBase.AccountingPeriodStart,
|
||||
// ItemPeriodEnd = i.InvoiceBase.AccountingPeriodEnd,
|
||||
// ItemDescription = "Spitzabrechung"
|
||||
// });
|
||||
//});
|
||||
// We´ll add an invoiceitem, so we can treat a settlement like any other invoice
|
||||
//i.InvoiceBase.InvoiceItems.Clear();
|
||||
//i.InvoiceBase.InvoiceItems.Add(
|
||||
// new InvoiceItem
|
||||
// {
|
||||
// AmountTotal = i.Claim,
|
||||
// ItemPeriodStart = i.InvoiceBase.AccountingPeriodStart,
|
||||
// ItemPeriodEnd = i.InvoiceBase.AccountingPeriodEnd,
|
||||
// ItemDescription = "Spitzabrechung"
|
||||
// });
|
||||
//});
|
||||
DAOFactory.GenericDAO.Update(originals);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -639,15 +644,15 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<InvoiceNumberDC> LoadInvoiceNumberList()
|
||||
{
|
||||
try
|
||||
{
|
||||
var numbers = DAOFactory.GenericDAO.GetAllActive<InvoiceNumber>();
|
||||
|
||||
|
||||
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDCs(numbers);
|
||||
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -695,7 +700,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
if (gkvAbrechnungViewFilter == null || !gkvAbrechnungViewFilter.FilterTime)
|
||||
return GetAllGkvAbrechnungen();
|
||||
|
||||
var entities = DAOFactory.SearchDAO.GetGkvAbrechnungen(gkvAbrechnungViewFilter.Start, gkvAbrechnungViewFilter.End, gkvAbrechnungViewFilter.FilterForInvoiceDate);
|
||||
var start = gkvAbrechnungViewFilter.Start;
|
||||
var end = gkvAbrechnungViewFilter.End;
|
||||
var filter = gkvAbrechnungViewFilter.FilterForInvoiceDate;
|
||||
|
||||
var entities = DAOFactory.SearchDAO.GetGkvAbrechnungen(start, end, filter);
|
||||
|
||||
return MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDCs(entities);
|
||||
}
|
||||
@@ -709,9 +718,27 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
var gkvs = DAOFactory.GenericDAO.GetAllActive<GkvAbrechnung>();
|
||||
var user = LoggedInUserOperationContextExt.Current?.User ?? SessionFacade.LoggedInUser;
|
||||
|
||||
var dcs = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDCs(gkvs);
|
||||
var entries = DAOFactory.GenericDAO.GetAllActive<GkvAbrechnung>();
|
||||
|
||||
var dcs = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDCs(entries);
|
||||
|
||||
var updateables = dcs.Where(x => x.GetState() != 5 && x.GetState() != 1
|
||||
//&& x.GesendetAm.HasValue
|
||||
).ToArray();
|
||||
|
||||
if (!updateables.Any())
|
||||
return dcs;
|
||||
|
||||
var isUpToDate = SendApp8GetStatusRequest(updateables, user.LoginName, user.RC2EncryptedHash);
|
||||
|
||||
if (isUpToDate)
|
||||
return dcs;
|
||||
|
||||
entries = DAOFactory.GenericDAO.GetAllActive<GkvAbrechnung>();
|
||||
|
||||
dcs = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDCs(entries);
|
||||
|
||||
return dcs;
|
||||
}
|
||||
@@ -721,6 +748,73 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="updateables"></param>
|
||||
/// <param name="loginName"></param>
|
||||
/// <param name="hashed_password"></param>
|
||||
/// <returns>Returns true, if the states are all up to date. False otherwise.</returns>
|
||||
private bool SendApp8GetStatusRequest(GkvAbrechnungDC[] updateables, string loginName, string hashed_password)
|
||||
{
|
||||
var updateables_len = updateables.Count();
|
||||
|
||||
var url = "https://app8.bewoplaner.de/service/GkvAbrechnungView.aspx";
|
||||
|
||||
#if DEBUG
|
||||
url = "http://localhost:3777/Host/GkvAbrechnungView.aspx";
|
||||
#endif
|
||||
|
||||
var request = new GkvApp8GetStatusRequest
|
||||
{
|
||||
Username = loginName,
|
||||
Password = hashed_password,
|
||||
Tenant = MultitenancyOperationContextExt.Current.Tenant,
|
||||
Tuples = new Tuple<GkvAbrechnungDC, long>[updateables_len]
|
||||
};
|
||||
|
||||
for (int id = 0; id < updateables_len; id++)
|
||||
{
|
||||
var gkv_abrechnung = updateables[id];
|
||||
var gkv_abrechnung_oid = gkv_abrechnung.GkvAbrechnungOid.Value;
|
||||
|
||||
request.Tuples[id] = new Tuple<GkvAbrechnungDC, long>(gkv_abrechnung, gkv_abrechnung_oid);
|
||||
}
|
||||
|
||||
var response_app8_str = SendApp8Request(url, JsonConvert.SerializeObject(request));
|
||||
|
||||
var response_app8 = JsonConvert.DeserializeObject<GkvApp8GetStatusResponse>(response_app8_str);
|
||||
|
||||
if (!response_app8.Success)
|
||||
{
|
||||
return true;
|
||||
throw new NotImplementedException("App 8 Anfrage nicht erfolgreich");
|
||||
}
|
||||
|
||||
bool allAreUpToDate = true;
|
||||
for (int id = 0; id < updateables_len; id++)
|
||||
{
|
||||
var gkv_abrechnung = updateables[id];
|
||||
var app8_tuple = response_app8.Tuples[id];
|
||||
|
||||
var app8_isUpToDate = app8_tuple.Item1;
|
||||
var app8_gkv_abrechnunng = app8_tuple.Item2;
|
||||
|
||||
if (app8_isUpToDate)
|
||||
continue;
|
||||
|
||||
allAreUpToDate = false;
|
||||
|
||||
var gkv_abrechnung_entity = DAOFactory.GenericDAO.LoadByID<GkvAbrechnung>(gkv_abrechnung.GkvAbrechnungOid.Value);
|
||||
|
||||
var gkv_abrechnung_new_entity = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MergeWithEntity(gkv_abrechnung, gkv_abrechnung_entity);
|
||||
|
||||
DAOFactory.GenericDAO.Update(gkv_abrechnung_new_entity);
|
||||
}
|
||||
|
||||
return allAreUpToDate;
|
||||
}
|
||||
|
||||
public GkvAbrechnungResponseDC CreateNewGkvAbrechnung(GkvAbrechnungRequestDC request)
|
||||
{
|
||||
var response = new GkvAbrechnungResponseDC();
|
||||
@@ -729,14 +823,18 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
var gkv_abrechnung_dc = request.GkvAbrechnungDC;
|
||||
|
||||
if(gkv_abrechnung_dc.AbrechnungsZeitraumEnde.Value.Hour == 0)
|
||||
{
|
||||
gkv_abrechnung_dc.AbrechnungsZeitraumEnde = gkv_abrechnung_dc.AbrechnungsZeitraumEnde.Value.Date.AddDays(1).AddMilliseconds(-1);
|
||||
}
|
||||
|
||||
var manager = new DakotaManager();
|
||||
|
||||
var mandatordc = new OperationsServiceImp().GetMandator();
|
||||
|
||||
var loaded_invoicebases = new List<InvoiceBaseDC>();
|
||||
|
||||
DakotaValidator.ValidateFirstStep(mandatordc);
|
||||
DakotaValidator.ValidateFirstStep(mandatordc, request);
|
||||
|
||||
int? datenaustauschreferenz = null;
|
||||
foreach (var invoicebase_oid in request.SelectedInvoiceBases)
|
||||
{
|
||||
var service = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(invoicebase_oid);
|
||||
@@ -746,6 +844,9 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
var invoicebase_dc = MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDC(invoicebase);
|
||||
|
||||
if(!datenaustauschreferenz.HasValue)
|
||||
datenaustauschreferenz = DAOFactory.SearchDAO.GetLastDatenaustauschreferenz(orga.IKDatenannahmestelle) + 1;
|
||||
|
||||
loaded_invoicebases.Add(invoicebase_dc);
|
||||
|
||||
var servicedc = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(service);
|
||||
@@ -754,7 +855,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DakotaValidator.ValidateSecondStep(orgadc, customerdc);
|
||||
|
||||
manager.Add(servicedc, orgadc, customerdc, mandatordc);
|
||||
manager.Add(servicedc, orgadc, customerdc, mandatordc, datenaustauschreferenz.Value);
|
||||
}
|
||||
|
||||
manager.Apply();
|
||||
@@ -778,10 +879,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw new DakotaException($"nutzdatendatei - Länger als 65535: {nutzdatendatei.Length}");
|
||||
}
|
||||
|
||||
var datenannahmestelle = file_from_manager.GetIKDatenannahmestelle();
|
||||
var datenaustauschreferenz = DAOFactory.SearchDAO.GetLastDatenaustauschreferenz(datenannahmestelle);
|
||||
|
||||
gkv_abrechnung_dc.IKDatenannahmestelle = datenannahmestelle;
|
||||
gkv_abrechnung_dc.IKDatenannahmestelle = file_from_manager.GetIKDatenannahmestelle();
|
||||
gkv_abrechnung_dc.IKKostenträger = file_from_manager.GetIKKostenträger();
|
||||
gkv_abrechnung_dc.IKLeistungserbringer = file_from_manager.GetIKLeistungserbringer();
|
||||
gkv_abrechnung_dc.IKVersichertenKarte = file_from_manager.GetIKVersichertenKarte();
|
||||
@@ -789,7 +887,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
gkv_abrechnung_dc.Auftragsdatei = file_from_manager.GetAuftragsdatei();
|
||||
gkv_abrechnung_dc.Nutzdatendatei = file_from_manager.GetNutzdatendatei();
|
||||
gkv_abrechnung_dc.Transfername = file_from_manager.GetTransferName();
|
||||
gkv_abrechnung_dc.Datenaustauschreferenz = datenaustauschreferenz + 1;
|
||||
gkv_abrechnung_dc.Datenaustauschreferenz = file_from_manager.GetDatenaustauschreferenz();
|
||||
gkv_abrechnung_dc.Dateigröße = nutzdatendatei.Length;
|
||||
|
||||
gkv_abrechnung_dc.ErstelltAm = file_from_manager.Created;
|
||||
gkv_abrechnung_dc.Betrag = file_from_manager.GetBetrag();
|
||||
@@ -803,8 +902,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
response.Success = true;
|
||||
response.GkvAbrechnungDC = new_gkv_abrechnung_dc;
|
||||
|
||||
return response;
|
||||
}
|
||||
catch(DakotaException exc)
|
||||
catch (DakotaException exc)
|
||||
{
|
||||
response.Error = exc.Message;
|
||||
}
|
||||
@@ -816,20 +917,151 @@ namespace BeWo.Service.ServiceImplementations
|
||||
return response;
|
||||
}
|
||||
|
||||
public List<long> InsertNewGkvAbrechnungen(List<GkvAbrechnungDC> dcList)
|
||||
public GkvAbrechnungDC UpdateGkvAbrechnung(GkvAbrechnungDC abrechnung)
|
||||
{
|
||||
try
|
||||
{
|
||||
var newGkvAbrechnungen = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewEntities(dcList);
|
||||
var entity = DAOFactory.GenericDAO.GetByID<GkvAbrechnung>(abrechnung.GkvAbrechnungOid.Value);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(newGkvAbrechnungen);
|
||||
MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MergeWithEntity(abrechnung, entity);
|
||||
|
||||
return newGkvAbrechnungen.Select(i => i.Oid.Value).ToList();
|
||||
//entity.Notice = abrechnung.Notice;
|
||||
//entity.Bezahlt = abrechnung.Bezahlt;
|
||||
|
||||
DAOFactory.GenericDAO.Update(entity);
|
||||
|
||||
return MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(entity);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteGkvAbrechnung(GkvAbrechnungDC abrechnung)
|
||||
{
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<GkvAbrechnung>(abrechnung.GkvAbrechnungOid.Value, abrechnung.GkvAbrechnungVersion.Value, ActivationTypeId.Deleted);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<long> InsertNewGkvAbrechnungen(List<GkvAbrechnungDC> dcList)
|
||||
{
|
||||
//try
|
||||
//{
|
||||
// var newGkvAbrechnungen = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewEntities(dcList);
|
||||
|
||||
// DAOFactory.GenericDAO.Insert(newGkvAbrechnungen);
|
||||
|
||||
// return newGkvAbrechnungen.Select(i => i.Oid.Value).ToList();
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// throw Utils.CreateBeWoFaultException(e);
|
||||
//}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(GkvAbrechnungSendRequestDC req)
|
||||
{
|
||||
var response = new GkvAbrechnungSendResponseDC();
|
||||
|
||||
response.Successful = false;
|
||||
|
||||
var user = LoggedInUserOperationContextExt.Current?.User ?? SessionFacade.LoggedInUser;
|
||||
if (user == null)
|
||||
{
|
||||
response.Message = "User unbekannt";
|
||||
return response;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var oid = req.GkvAbrechnungDC.GkvAbrechnungOid.Value;
|
||||
|
||||
string response_app8_str = SendApp8SendNewRequest(oid, user.LoginName, user.RC2EncryptedHash);
|
||||
|
||||
if (string.IsNullOrEmpty(response_app8_str))
|
||||
{
|
||||
response.Message = "App8 leere Antwort";
|
||||
return response;
|
||||
}
|
||||
|
||||
var response_app8 = JsonConvert.DeserializeObject<GkvApp8SendNewResponse>(response_app8_str);
|
||||
|
||||
response.Successful = response_app8.Success;
|
||||
|
||||
if (response_app8.Success)
|
||||
{
|
||||
var entity = DAOFactory.GenericDAO.GetByID<GkvAbrechnung>(req.GkvAbrechnungDC.GkvAbrechnungOid.Value);
|
||||
|
||||
var child_dc = response_app8.GkvTransferProtokollDC;
|
||||
var child = MapperFactory.GkvTransferProtokollDC_GkvTransferprotokoll.MapToNewEntity(child_dc);
|
||||
|
||||
entity.GkvTransferProtokolle.Add(child);
|
||||
|
||||
DAOFactory.GenericDAO.Update(entity);
|
||||
|
||||
response.Message = "Erfolgreich gesendet";
|
||||
response.GkvAbrechnungDC = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
response.Message = response_app8.Message;
|
||||
}
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
private string SendApp8SendNewRequest(long oid, string loginName, string hashed_password)
|
||||
{
|
||||
var entity = DAOFactory.GenericDAO.LoadByID<GkvAbrechnung>(oid);
|
||||
|
||||
var gkv_abrechnung_dc = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(entity);
|
||||
|
||||
var url = "https://app8.bewoplaner.de/service/GkvAbrechnungView.aspx";
|
||||
|
||||
#if DEBUG
|
||||
url = "http://localhost:3777/Host/GkvAbrechnungView.aspx";
|
||||
#endif
|
||||
|
||||
var request_app8 = new GkvApp8SendNewRequest
|
||||
{
|
||||
GkvAbrechnung = gkv_abrechnung_dc,
|
||||
Username = loginName,
|
||||
Password = hashed_password,
|
||||
Tenant = MultitenancyOperationContextExt.Current.Tenant
|
||||
};
|
||||
|
||||
return SendApp8Request(url, request_app8);
|
||||
}
|
||||
|
||||
private string SendApp8Request(string url, object request) => SendApp8Request(url, JsonConvert.SerializeObject(request));
|
||||
private string SendApp8Request(string url, string dataString)
|
||||
{
|
||||
url += "?tenant=" + MultitenancyOperationContextExt.Current.Tenant;
|
||||
|
||||
string response_app8_str;
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
client.Headers.Add(HttpRequestHeader.ContentType, "application/json");
|
||||
|
||||
response_app8_str = client.UploadString(url, "POST", dataString);
|
||||
}
|
||||
|
||||
return response_app8_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using System.ServiceModel;
|
||||
|
||||
namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
||||
public class GkvInvoiceService : IGkvInvoiceService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -393,6 +393,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public UserValidationResult IsUserValid(string pUserName, string pPassword) => IsUserValid(pUserName, pPassword, null);
|
||||
|
||||
public UserValidationResult IsUserValidTwoFactor(string username, string password, string twoFactorPin, string supportPin)
|
||||
{
|
||||
return IsUserValid(username, password, supportPin, "BeWoClient", true, twoFactorPin);
|
||||
|
||||
@@ -170,7 +170,8 @@ namespace BS.Shared
|
||||
ValidationMessage = 163,
|
||||
AdditionalServiceNotice = 164,
|
||||
GkvAbrechnung = 165,
|
||||
Bargeldtransaktionshistory = 166
|
||||
Bargeldtransaktionshistory = 166,
|
||||
GkvTransferprotokoll = 167,
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
@@ -1222,4 +1223,12 @@ namespace BS.Shared
|
||||
ManuallyDeleted = 3,
|
||||
AutomaticallyDeleted = 4
|
||||
}
|
||||
|
||||
public enum GkvAbrechnungApp8RequestTypeDC
|
||||
{
|
||||
Default,
|
||||
SendNew,
|
||||
GetStatus,
|
||||
GetIKNumber
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,9 @@ namespace BS.Shared.Core
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
private static readonly string[] SizeSuffixes =
|
||||
{ "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
|
||||
|
||||
private static readonly Dictionary<char, string> criticals = new Dictionary<char, string>
|
||||
{
|
||||
{ '"', """ },
|
||||
@@ -1120,6 +1123,21 @@ namespace BS.Shared.Core
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static string SizeSuffix(Int64 value, int decimalPlaces = 1)
|
||||
{
|
||||
if (value < 0) { return "-" + SizeSuffix(-value, decimalPlaces); }
|
||||
|
||||
int i = 0;
|
||||
decimal dValue = (decimal)value;
|
||||
while (Math.Round(dValue, decimalPlaces) >= 1000)
|
||||
{
|
||||
dValue /= 1024;
|
||||
i++;
|
||||
}
|
||||
|
||||
return string.Format("{0:n" + decimalPlaces + "} {1}", dValue, SizeSuffixes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public struct NullCompareResult
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? GkvAbrechnungOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? GkvAbrechnungVersion { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Notice { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKLeistungserbringer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKVersichertenKarte { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKKostenträger { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKDatenannahmestelle { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? AbrechnungsZeitraumStart { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? AbrechnungsZeitraumEnde { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Nutzdatendatei { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Auftragsdatei { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Transfername { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int Datenaustauschreferenz { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? ErstelltAm { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? VerschluesseltAm { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? UebertragenAm { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? AntwortErhaltenAm { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? AntwortEntschluesseltAm { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal Betrag { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public IList<InvoiceBaseDC> InvoiceBases { get; set; }
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? GkvAbrechnungOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? GkvAbrechnungVersion { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Notice { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKLeistungserbringer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKVersichertenKarte { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKKostenträger { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKDatenannahmestelle { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? AbrechnungsZeitraumStart { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? AbrechnungsZeitraumEnde { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Nutzdatendatei { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Auftragsdatei { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Transfername { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int Dateigröße { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int Datenaustauschreferenz { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? ErstelltAm { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal Betrag { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public bool Bezahlt { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public IList<InvoiceBaseDC> InvoiceBases { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public OrganisationDC Organisation { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public IList<GkvTransferProtokollDC> TransferProtokolle { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungRequestDC : IDataContract
|
||||
@@ -5,7 +5,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungResponseDC : IDataContract
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungSendRequestDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public GkvAbrechnungDC GkvAbrechnungDC { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -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.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungSendResponseDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public bool Successful { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public GkvAbrechnungDC GkvAbrechnungDC { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvAbrechnungViewFilterDC : IDataContract
|
||||
20
Shared/DataContracts/GkvAbrechnung/GkvApp8GetIKRequest.cs
Normal file
20
Shared/DataContracts/GkvAbrechnung/GkvApp8GetIKRequest.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
public class GkvApp8GetIKRequest : GkvApp8Request
|
||||
{
|
||||
[DataMember]
|
||||
public string KrankenkassenIK { get; set; }
|
||||
|
||||
public GkvApp8GetIKRequest()
|
||||
{
|
||||
Type = GkvAbrechnungApp8RequestTypeDC.GetIKNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Shared/DataContracts/GkvAbrechnung/GkvApp8GetIKResponse.cs
Normal file
21
Shared/DataContracts/GkvAbrechnung/GkvApp8GetIKResponse.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
public class GkvApp8GetIKResponse : GkvApp8Response
|
||||
{
|
||||
[DataMember]
|
||||
public string IKVersichertenKarte { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKKostenträger { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string IKDatenannahmestelle { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
public class GkvApp8GetStatusRequest : GkvApp8Request
|
||||
{
|
||||
[DataMember]
|
||||
public Tuple<GkvAbrechnungDC, long>[] Tuples { get; set; }
|
||||
|
||||
public GkvApp8GetStatusRequest()
|
||||
{
|
||||
Type = GkvAbrechnungApp8RequestTypeDC.GetStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
public class GkvApp8GetStatusResponse : GkvApp8Response
|
||||
{
|
||||
[DataMember]
|
||||
public Tuple<bool, GkvAbrechnungDC>[] Tuples { get; set; }
|
||||
}
|
||||
}
|
||||
25
Shared/DataContracts/GkvAbrechnung/GkvApp8Request.cs
Normal file
25
Shared/DataContracts/GkvAbrechnung/GkvApp8Request.cs
Normal 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.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvApp8Request : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public string Username { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Tenant { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public GkvAbrechnungApp8RequestTypeDC Type { get; set; }
|
||||
}
|
||||
}
|
||||
19
Shared/DataContracts/GkvAbrechnung/GkvApp8Response.cs
Normal file
19
Shared/DataContracts/GkvAbrechnung/GkvApp8Response.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvApp8Response : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public bool Success { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
20
Shared/DataContracts/GkvAbrechnung/GkvApp8SendNewRequest.cs
Normal file
20
Shared/DataContracts/GkvAbrechnung/GkvApp8SendNewRequest.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
public class GkvApp8SendNewRequest : GkvApp8Request
|
||||
{
|
||||
[DataMember]
|
||||
public GkvAbrechnungDC GkvAbrechnung { get; set; }
|
||||
|
||||
public GkvApp8SendNewRequest()
|
||||
{
|
||||
Type = GkvAbrechnungApp8RequestTypeDC.SendNew;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Shared/DataContracts/GkvAbrechnung/GkvApp8SendNewResponse.cs
Normal file
20
Shared/DataContracts/GkvAbrechnung/GkvApp8SendNewResponse.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
public class GkvApp8SendNewResponse : GkvApp8Response
|
||||
{
|
||||
[DataMember]
|
||||
public GkvTransferProtokollDC GkvTransferProtokollDC { get; set; }
|
||||
|
||||
public GkvApp8SendNewResponse()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Shared/DataContracts/GkvAbrechnung/GkvTransferProtokollDC.cs
Normal file
53
Shared/DataContracts/GkvAbrechnung/GkvTransferProtokollDC.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BS.Shared.DataContracts.GkvAbrechnung
|
||||
{
|
||||
[DataContract]
|
||||
public class GkvTransferProtokollDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? GkvTransferProtokollOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? GkvTransferProtokollVersion { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Notice { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long GkvAbrechnungOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string AbsenderBezeichnung { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string EmpfangerBezeichnung { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Dateityp { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Dateiname { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? PruftDatum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string PruftFehler { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? VerschlusseltDatum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string VerschlusseltFehler { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime? UbertragDatum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string UbertragFehler { get; set; }
|
||||
}
|
||||
}
|
||||
89
Shared/Extensions/GkvAbrechnungExtensions.cs
Normal file
89
Shared/Extensions/GkvAbrechnungExtensions.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Extensions
|
||||
{
|
||||
public static class GkvAbrechnungExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 1 - Übertragung nicht begonnen
|
||||
/// 2 - Prüfung keine Antwort
|
||||
/// 3 - Verschlüsselt keine Antwort
|
||||
/// 4 - Übertragung keine Antwort
|
||||
/// 5 - Fertig (Erfolreich oder Fehler)
|
||||
/// </summary>
|
||||
/// <param name="gkvAbrechnungDC"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetState(this GkvAbrechnungDC gkvAbrechnungDC)
|
||||
{
|
||||
if (gkvAbrechnungDC.TransferProtokolle == null || !gkvAbrechnungDC.TransferProtokolle.Any())
|
||||
return 1;
|
||||
|
||||
var last_protokoll = gkvAbrechnungDC.TransferProtokolle.Last();
|
||||
|
||||
return GetState(last_protokoll);
|
||||
}
|
||||
|
||||
public static int GetState(this GkvTransferProtokollDC last_protokoll)
|
||||
{
|
||||
if (!last_protokoll.PruftDatum.HasValue)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (last_protokoll.PruftFehler != null)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
if (!last_protokoll.VerschlusseltDatum.HasValue)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (last_protokoll.VerschlusseltFehler != null)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
if (!last_protokoll.UbertragDatum.HasValue)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (last_protokoll.UbertragFehler != null)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
return 6;
|
||||
}
|
||||
|
||||
public static bool IsStatusComplete(this GkvAbrechnungDC gkvAbrechnungDC)
|
||||
{
|
||||
var state = gkvAbrechnungDC.GetState();
|
||||
|
||||
return state == 5 || state == 6;
|
||||
|
||||
//gkvAbrechnungDC.VerschluesseltAm.HasValue
|
||||
//&& gkvAbrechnungDC.UebertragenAm.HasValue
|
||||
//&& gkvAbrechnungDC.AntwortErhaltenAm.HasValue
|
||||
//&& gkvAbrechnungDC.AntwortEntschluesseltAm.HasValue;
|
||||
}
|
||||
|
||||
public static bool IsUpToDate(this GkvAbrechnungDC gkvAbrechnungDC, GkvAbrechnungDC compareTo)
|
||||
{
|
||||
return gkvAbrechnungDC.GetState() == compareTo.GetState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,11 +186,22 @@
|
||||
<Compile Include="DataContracts\DokumentvorlageDC.cs" />
|
||||
<Compile Include="DataContracts\AdditionalServiceNoticeDC.cs" />
|
||||
<Compile Include="DataContracts\GeschenkterUrlaubstagDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnungResponseDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnungViewFilterDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnungRequestDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8SendNewResponse.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvTransferProtokollDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8GetIKRequest.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8GetIKResponse.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8Request.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8GetStatusResponse.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8Response.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8GetStatusRequest.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvApp8SendNewRequest.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvAbrechnungSendResponseDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvAbrechnungSendRequestDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvAbrechnungResponseDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvAbrechnungViewFilterDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvAbrechnungRequestDC.cs" />
|
||||
<Compile Include="DataContracts\GoalRatingDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnungDC.cs" />
|
||||
<Compile Include="DataContracts\GkvAbrechnung\GkvAbrechnungDC.cs" />
|
||||
<Compile Include="DataContracts\PlatzhalterDC.cs" />
|
||||
<Compile Include="DataContracts\PreisDC.cs" />
|
||||
<Compile Include="DataContracts\QuittierungsbelegsstatusDC.cs" />
|
||||
@@ -312,6 +323,7 @@
|
||||
<Compile Include="DataContracts\ServiceRecordHistoryDC.cs" />
|
||||
<Compile Include="DataContracts\SupportPinDC.cs" />
|
||||
<Compile Include="Extensions\EnumExtensions.cs" />
|
||||
<Compile Include="Extensions\GkvAbrechnungExtensions.cs" />
|
||||
<Compile Include="Extensions\GridExtensions.cs" />
|
||||
<Compile Include="Extensions\ICollectionExtensions.cs" />
|
||||
<Compile Include="Extensions\IDictionaryTExtensions.cs" />
|
||||
|
||||
Reference in New Issue
Block a user