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

* 'feature_rene_13_dakota' of ssh://float.ownsoft.de/git/beyondSoft/BeWo:
  debug config edit
  Fixes
  Begleitzettel vom customer abhängig
  Hack: Mehrere Mandatoren möglich
  Validate vor Server Senden Prozess + MailUItils mehr eingebunden
  BUG: Fehler wird in bestimmten Fällen nicht gespeichert
  Serverseitige Prüfung
  Clientseitig wird nun auch verschiedene Sender Addressen in Gkv Erstellung ausgeschlossen
  Unnötigen Aufruf gefunden
  Erweitertes Fehlerhandling
  Hinweis: Bereits bezahlt
  BUG: Begleitzettel ohne Logo
  Einbindung an GKV Übersicht
  Mandator Erweitert + Setting Page Anbindung
  ColorPicker vollständig + Delete Button
  ColorPicker Control und mehr
  Quittierungsbelege an GkvBegleitzettel
  Druckvorschau wird bei AutoUILock geschlossen
  Eigenes Logo oben links
This commit is contained in:
2024-12-10 11:43:07 +01:00
49 changed files with 1621 additions and 990 deletions

View File

@@ -399,6 +399,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Controls\Utils\ColorPicker.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Controls\Wohnhilfe\CustomerWohnhilfeControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -1316,6 +1320,9 @@
<Compile Include="View\Controls\CustomerVermittlungArbeitControl.xaml.cs">
<DependentUpon>CustomerVermittlungArbeitControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Controls\Utils\ColorPicker.xaml.cs">
<DependentUpon>ColorPicker.xaml</DependentUpon>
</Compile>
<Compile Include="View\Controls\Wohnhilfe\CustomerWohnhilfeControl.xaml.cs">
<DependentUpon>CustomerWohnhilfeControl.xaml</DependentUpon>
</Compile>

View File

@@ -649,6 +649,11 @@ namespace BeWo
AppSettings.ShowInfoButtonInCalender = showInfoButtonInCalender;
BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths = AppSettings.HilfeplanAuslaufAuswahl;
if(MainControl is object)
{
MainControl.UpdateMandator();
}
}
}
@@ -1300,12 +1305,17 @@ namespace BeWo
foreach (var blubb in openWindowCollection)
{
var abc = (Window)blubb;
var title = abc.Title;
if (!abc.Title.Equals("BeWoPlaner") && blubb.GetType() == typeof(WindowContentHolder))
if (!title.Equals("BeWoPlaner") && blubb.GetType() == typeof(WindowContentHolder))
{
abc.Close();
}
else if (abc.Title.IndexOf("Popup") >= 0)
else if (title.IndexOf("Popup") >= 0)
{
abc.Close();
}
else if (title.IndexOf("Druckvorschau") >= 0)
{
abc.Close();
}

View File

@@ -30,6 +30,12 @@ namespace BeWo.Converter
{
if (setting == SettingsKeys.AllowGkvAbrechnung)
return BeWoApp.AppSettings.AllowGkvAbrechnung;
if (setting == SettingsKeys.ShowGkvBzEinzel)
return BeWoApp.Mandator.ShowGkvBzEinzel;
if (setting == SettingsKeys.ShowGkvBzUrbelege)
return BeWoApp.Mandator.ShowGkvBzUrbelege;
}
}
catch (Exception)

View File

@@ -122,12 +122,12 @@ namespace BeWo
new DebugConfig()
{
DebugConfigMode = DebugConfigMode.FeatureDakota,
AutoLogin = true,
SelectView = UIContext.Finance,
AutoLogin = false,
SelectView = UIContext.Administration,
SelectIndex = 8,
//Username = "m1",
//Password = "bewobewo",
//Profilename = "5000000000"
Username = "m1",
Password = "bewobewo",
Profilename = "5000000000"
});
return name2config;

View File

@@ -61,9 +61,9 @@
HorizontalAlignment="Stretch"
Grid.IsSharedSizeScope="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="150" />
<ColumnDefinition x:Name="column2" Width="150" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -71,8 +71,9 @@
</Grid.RowDefinitions>
<!--<Frame x:Name="chatFrame" Grid.Column="2" Grid.Row="0" />-->
<TextBlock
x:Name="txt_logo"
Width="Auto"
Margin="5,2,0,0"
Margin="5,2,5,2"
HorizontalAlignment="Center">
<Hyperlink
Foreground="Transparent"
@@ -99,7 +100,35 @@
</InlineUIContainer>
</Hyperlink>
</TextBlock>
<TextBlock
x:Name="txt_logo2"
Width="Auto"
Margin="5,2,5,2"
HorizontalAlignment="Center">
<Hyperlink
x:Name="hyperlink_2"
Foreground="Transparent"
RequestNavigate="Hyperlink_OnRequestNavigate"
TargetName="newWindow">
<InlineUIContainer>
<Image
x:Name="image2"
Width="130"
HorizontalAlignment="Left"
RenderTransformOrigin="0.5,0.5"
Style="{StaticResource toolbarImageStyle}">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Image.RenderTransform>
</Image>
</InlineUIContainer>
</Hyperlink>
</TextBlock>
<!--<TextBlock HorizontalAlignment="Right" Width="Auto" Margin="0,2,5,0" Grid.Column="2">
<Hyperlink NavigateUri="http://www.bewoplaner.de" TargetName="newWindow" Foreground="Transparent" RequestNavigate="Hyperlink_OnRequestNavigate">
<InlineUIContainer>

View File

@@ -27,6 +27,7 @@ using BeWo.View.Navigation;
using BeWo.ViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Translation;
@@ -168,6 +169,8 @@ namespace BeWo
#if DEBUG
//DebugHelperViewButton.Visibility = Visibility.Visible;
#endif
UpdateMandator();
}
public List<ModalViewWindow> OpenedModalViewWindows { get; set; }
@@ -787,6 +790,42 @@ namespace BeWo
}, (s, e) => e.CanExecute = _CurrentDetailView != null));
}
internal void UpdateMandator()
{
if (BeWoApp.Mandator is null)
return;
var url = BeWoApp.Mandator.Website.ToNullIfEmpty();
var haslogo = BeWoApp.Mandator.Logo?.Original is object;
if (haslogo)
{
image2.Source = Utils.CreateBitmapImageFromByteArray(BeWoApp.Mandator.Logo.Original);
Grid.SetColumn(txt_logo, 2);
txt_logo2.Visibility = Visibility.Visible;
if(Uri.TryCreate(url, UriKind.RelativeOrAbsolute, out Uri res))
{
hyperlink_2.NavigateUri = res;
}
else
{
hyperlink_2.NavigateUri = null;
}
column2.Width = new GridLength(1, GridUnitType.Auto);
}
else
{
Grid.SetColumn(txt_logo, 0);
txt_logo2.Visibility = Visibility.Collapsed;
column2.Width = new GridLength(150);
}
}
private void NavigateToParentView(BeWoView beWoView)
{
if (beWoView is CustomerNavigationView && !_Views.ContainsKey(UIContext.Customer))
@@ -1192,7 +1231,13 @@ namespace BeWo
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
// Hier Token anfordern; Hier nicht notwendig -> Link auf www.beyondsoft.de
Process.Start(new ProcessStartInfo((sender as Hyperlink).NavigateUri.ToString()));
var url = (sender as Hyperlink).NavigateUri.ToString();
if (string.IsNullOrWhiteSpace(url))
return;
Process.Start(new ProcessStartInfo(url));
}
private void button_Support_Click(object sender, RoutedEventArgs e)
@@ -1800,5 +1845,5 @@ namespace BeWo
NavigateTo(GetViewForUIContext(UIContext.Scheduling));
}
}
}
}
}

View File

@@ -1,5 +1,6 @@
using BeWo.View.Controls;
using BeWo.ViewModel;
using BS.Shared.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -55,11 +56,6 @@ namespace BeWo.View
return beWoWindow;
}
public static void ShowErrorMessageBox(string text)
{
MessageBox.Show(text, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
}
private static BeWoWindow GetGenericBeWoWindow(string title, double min_height, double height, double max_height, double min_width, double width, double max_width)
{
var beWoWindow = new BeWoWindow();
@@ -78,5 +74,18 @@ namespace BeWo.View
return beWoWindow;
}
public static void ShowErrorMessageBox(string text)
{
MessageBox.Show(text, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
}
public static void ShowTitleErrorMessageBox(string text, string title)
{
if (title.IsNullOrWhiteSpace())
ShowErrorMessageBox(text);
else
MessageBox.Show(text, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
}
}
}

View File

@@ -15,9 +15,9 @@
x:Name="popupedit"
MinHeight="23"
DeleteButtonVisibility="Visible"
DeleteClick="popupedit_DeleteClick"
IsReadOnly="True"
PopUpClick="popupedit_PopUpClick"
DeleteClick="popupedit_DeleteClick"/>
PopUpClick="popupedit_PopUpClick" />
<Popup
x:Name="popup"
Width="370"

View File

@@ -0,0 +1,79 @@
<UserControl
x:Class="BeWo.View.Controls.Utils.ColorPicker"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.Controls.Controls;assembly=BeWo.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="root"
d:DesignWidth="100"
mc:Ignorable="d">
<Grid>
<Button
x:Name="btn"
Height="24"
Padding="0"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
dx:ThemeManager.ThemeName="None"
Background="Transparent"
BorderBrush="Black"
BorderThickness="1"
Click="button_select_color_Click"
Style="{x:Null}">
<Grid Background="{Binding ElementName=root, Path=SelectedColor}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Button
x:Name="delete_btn"
Grid.Column="1"
Width="18"
Height="18"
Margin="2"
Click="delete_btn_DeleteClick">
X
</Button>
</Grid>
</Button>
<Popup
x:Name="popup_color"
Placement="MousePoint"
StaysOpen="false">
<ListBox
x:Name="listbox_colorpicker"
BorderThickness="0"
ItemsSource="{Binding ElementName=root, Path=AllBrushes}"
SelectionChanged="listbox_colorpicker_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid
Columns="12"
IsItemsHost="True"
Rows="12" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border
Height="20"
MinWidth="20"
HorizontalAlignment="Stretch"
Background="{Binding}"
BorderBrush="Black"
BorderThickness="1"
CornerRadius="1" />
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Margin" Value="2" />
<Setter Property="Padding" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Popup>
</Grid>
</UserControl>

View File

@@ -0,0 +1,88 @@
using BeWo.Core;
using BS.Shared.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
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;
using Color = System.Drawing.Color;
namespace BeWo.View.Controls.Utils
{
/// <summary>
/// Interaktionslogik für ColorPicker.xaml
/// </summary>
public partial class ColorPicker : UserControl
{
public SolidColorBrush SelectedColor
{
get { return (SolidColorBrush)GetValue(SelectedColorProperty); }
set { SetValue(SelectedColorProperty, value); }
}
// Using a DependencyProperty as the backing store for SelectedColor. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SelectedColorProperty =
DependencyProperty.Register("SelectedColor", typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(null, SelectedColor_Update));
private static void SelectedColor_Update(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
//var btn = (d as ColorPicker).btn;
//btn.Background = e.NewValue as SolidColorBrush;
//btn.DataContext = e.NewValue as SolidColorBrush;
}
public ColorPicker()
{
InitializeComponent();
}
public List<SolidColorBrush> AllBrushes
{
get
{
var lTemp = typeof(Color).GetProperties(BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Static).Select(pi => (Color)pi.GetGetMethod().Invoke(null, null)).ToList();
lTemp.Sort((x, y) => x.GetBrightness().CompareTo(y.GetBrightness()));
return lTemp.Select(c => new SolidColorBrush(System.Windows.Media.Color.FromArgb(c.A, c.R, c.G, c.B))).ToList();
}
}
private void listbox_colorpicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 1)
{
var selection = e.AddedItems[0] as SolidColorBrush;
SelectedColor = selection;
popup_color.IsOpen = false;
}
}
private void button_select_color_Click(object sender, RoutedEventArgs e)
{
popup_color.IsOpen = true;
}
private void delete_btn_DeleteClick(object sender, RoutedEventArgs e)
{
SelectedColor = null;
listbox_colorpicker.SelectedItem = null;
e.Handled = true;
}
}
}

View File

@@ -2,6 +2,7 @@
x:Class="BeWo.View.Detail.Accounting.GkvAbrechnungOverview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localView="clr-namespace:BeWo.View"
@@ -182,8 +183,8 @@
Margin="1"
VerticalAlignment="Center"
IsEnabled="{Binding Row.IsFormularEnabled}"
ToolTip="Formular anzeigen"
Visibility="Visible">
ToolTip="Begleitzettel einzeln anzeigen"
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.ShowGkvBzEinzel}}">
<TextBlock Padding="0">
<Hyperlink
NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
@@ -203,6 +204,34 @@
</Hyperlink>
</TextBlock>
</Button>
<Button
x:Name="btn_report2"
Width="18"
Height="18"
Margin="1"
VerticalAlignment="Center"
IsEnabled="{Binding Row.IsFormularEnabled}"
ToolTip="Begleitzettel mit Quittierungsbelegen anzeigen"
Visibility="{Binding Converter={StaticResource UserPermission2VisibleConverter}, ConverterParameter={x:Static core:SettingsKeys.ShowGkvBzUrbelege}}">
<TextBlock Padding="0">
<Hyperlink
NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
RequestNavigate="Hyperlink_OnRequestNavigate2"
TextDecorations="None"
TargetName="_NewWindow">
<TextBlock
Width="12"
Height="12"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="Webdings"
FontSize="12"
Foreground="#FFFFFF"
Text="¥" />
</Hyperlink>
</TextBlock>
</Button>
<Button
x:Name="btn_delete"
Width="20"

View File

@@ -120,25 +120,45 @@ namespace BeWo.View.Detail.Accounting
}
private void NewGkvAbrechnungPopUpViewCreateButtonClicked(object sender, EventArgs<GkvAbrechnungDC> e)
{
var gkv_abrechnung = e.Data;
var checked_invoice_bases = _NewGkvAbrechnungPopUpView.ViewModel.InvoiceBases.Where(x => x.IsChecked);
// MessageBox.Show("Sie haben keine Rechnung hinzugefügt.", "GKV-Abrechnung erstellen", MessageBoxButton.OK, MessageBoxImage.Warning);
if (!checked_invoice_bases.Any())
return;
var success = ValidatorExtended.TryValidateGkvAbrechnung(gkv_abrechnung, checked_invoice_bases, false);
if (!success)
{
var txt = "Sie haben Rechnungen mit verschiedenen Rechnungsadressen ausgewählt. Die Rechnungs";
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OK);
return;
}
var already_used_invoices = checked_invoice_bases.Where(x => x.IsAlreadyInActiveGkvAbrechnung.Value);
if (already_used_invoices.Any())
{
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits in einer anderen aktiven GKV-Abrechnung enthalten sind. Möchten Sie fortfahren?";
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits in einer " +
"anderen aktiven GKV-Abrechnung enthalten sind. Möchten Sie fortfahren?";
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
if (result != MessageBoxResult.OK)
return;
}
var bereits_bezahlt = checked_invoice_bases.Where(x => x.IsPaid);
if (bereits_bezahlt.Any())
{
var txt = "Sie haben eine oder mehrere Rechnungen ausgewählt, welche bereits als 'Bezahlt' " +
"markiert sind. Möchten Sie fortfahren?";
var result = MessageBox.Show(txt, "Hinweis", MessageBoxButton.OKCancel);
if (result != MessageBoxResult.OK)
return;
}
MainControl.CloseCurrentPopUp();
var gkv_abrechnung = e.Data;
var gkv_filter = new GkvAbrechnungCreateRequestDC
{
GkvAbrechnungDC = gkv_abrechnung,
@@ -155,7 +175,7 @@ namespace BeWo.View.Detail.Accounting
}
else
{
BeWoWindowBuilder.ShowErrorMessageBox(cb.Message);
BeWoWindowBuilder.ShowTitleErrorMessageBox(cb.Message, cb.TitleMessage);
}
}));
}
@@ -291,14 +311,14 @@ namespace BeWo.View.Detail.Accounting
if (gkvAbrechnungVM is null)
return;
if (gkvAbrechnungVM.GkvState == GkvState.WaitingForKrankenkasseTooLong)
if (gkvAbrechnungVM.GkvState == GkvState.WaitingForKrankenkasseTooLong && BeWoApp.Mandator.ColorWaitTooLong is string colorWaiting)
{
e.Result = Brushes.Orange;
e.Result = ColorExtensions.ParseSolidColorBrush(colorWaiting);
e.Handled = true;
}
else if (gkvAbrechnungVM.GkvState == GkvState.WaitingForUrbelege)
else if (gkvAbrechnungVM.GkvState == GkvState.WaitingForUrbelege && BeWoApp.Mandator.ColorSendUrbelege is string colorSend)
{
e.Result = Brushes.Green;
e.Result = ColorExtensions.ParseSolidColorBrush(colorSend);
e.Handled = true;
}
}
@@ -382,7 +402,22 @@ namespace BeWo.View.Detail.Accounting
BeWoApp.ShowInfoMessage($"Begleitzettel bitte inklusive der enthaltenen Urbelege ({what2send}) ausdrucken, " +
$"Anzahl der Urbelege noch eintragen und alles zusammen versenden.");
BeWoUtils.NavigateToReportUri(((Hyperlink)sender).NavigateUri.ToString(), "Druckvorschau");
BeWoUtils.NavigateToReportUri(vm.ReportLink, "Druckvorschau");
}
}
private void Hyperlink_OnRequestNavigate2(object sender, RequestNavigateEventArgs e)
{
var vm = datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
string what2send = "Leistungsnachweise";
if (vm.Verfahrensstufe != GkvVerfahrensstufe.Echt)
what2send += " und Rechnungen";
BeWoApp.ShowInfoMessage($"Begleitzettel bitte inklusive der enthaltenen Urbelege ({what2send}) ausdrucken, " +
$"Anzahl der Urbelege noch eintragen und alles zusammen versenden.");
BeWoUtils.NavigateToReportUri(vm.ReportLink2, "Druckvorschau");
}
}
}

View File

@@ -7,22 +7,26 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Detail.Administration"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:utils="clr-namespace:BeWo.View.Controls.Utils"
xmlns:view="clr-namespace:BeWo.View"
mc:Ignorable="d">
<Grid>
<Grid HorizontalAlignment="Left" IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<GroupBox
x:Name="groupBoxSozio"
Grid.Row="3"
Grid.ColumnSpan="2"
Margin="3,3,3,3"
Margin="3"
Header="Soziotherapie"
Style="{StaticResource ObjectEditGroupBox}"
Visibility="{Binding Path=Itself, Converter={StaticResource UserPermission2BoolConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
Style="{StaticResource ObjectEditGroupBox}">
<!-- Kann frei genutzt werden -->
<Grid ToolTip="Wenn kein Ansprechpartner hinterlegt ist, so wird der aktuelle Benutzer als Ansprechpartner verwendet.">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
@@ -32,7 +36,8 @@
Grid.Row="0"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
VerticalAlignment="Center"
ToolTip="Wenn kein Ansprechpartner hinterlegt ist, so wird der aktuelle Benutzer als Ansprechpartner verwendet.">
IK Nummer (Leistungserbringer)
</Label>
<TextBox
@@ -60,5 +65,72 @@
SelectedCompactEmployeeDC="{Binding SoziotherapieAnsprechpartner, Mode=TwoWay}" />
</Grid>
</GroupBox>
<GroupBox
x:Name="groupBoxGkvAnsicht"
Grid.Row="1"
Margin="3"
Header="GKV-Abrechnung Ansicht"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
WaitingForKrankenkasse
</Label>
<utils:ColorPicker
Grid.Row="0"
Grid.Column="1"
Margin="3"
SelectedColor="{Binding ColorWaitTooLong, Mode=TwoWay}" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
SendeUrbelege
</Label>
<utils:ColorPicker
Grid.Row="1"
Grid.Column="1"
Margin="3"
SelectedColor="{Binding ColorSendUrbelege, Mode=TwoWay}" />
<Label
Grid.Row="2"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Begleitzettel einzeln drucken
</Label>
<CheckBox
Grid.Row="2"
Grid.Column="1"
Margin="6,3,3,3"
IsChecked="{Binding ShowGkvBzEinzel}" />
<Label
Grid.Row="3"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Begleitzettel mit Urbelegen drucken
</Label>
<CheckBox
Grid.Row="3"
Grid.Column="1"
Margin="6,3,3,3"
IsChecked="{Binding ShowGkvBzUrbelege}" />
</Grid>
</GroupBox>
</Grid>
</view:BeWoView>

View File

@@ -342,10 +342,15 @@ namespace BeWo.ViewModel
public bool IsFormularEnabled => LastTransferProtokoll is object;
public GkvAbrechnungReportRequest ReportRequest
=> new GkvAbrechnungReportRequest(DataContract.GkvAbrechnungOid.Value);
=> new GkvAbrechnungReportRequest(DataContract.GkvAbrechnungOid.Value, false);
public string ReportLink
=> BeWoApp.SiteOfOrigin + "/ReportView.aspx" + ReportRequest.GetUrlPathString();
public GkvAbrechnungReportRequest ReportRequest2
=> new GkvAbrechnungReportRequest(DataContract.GkvAbrechnungOid.Value, true);
public string ReportLink2
=> BeWoApp.SiteOfOrigin + "/ReportView.aspx" + ReportRequest2.GetUrlPathString();
public void FirePropertyIsReady2CreateChanged()
=> FirePropertyChanged(nameof(IsReady2Create));
public bool IsReady2Create

View File

@@ -14,8 +14,6 @@ namespace BeWo.ViewModel
private byte[] _Original;
private byte[] _MediumThumbnail;
private byte[] _SmallThumbnail;
private BitmapImage _BitmapImage;
private ImageSource _ImageSource;
public ImageVM() : this(new ImageDC())
{

View File

@@ -9,11 +9,12 @@ using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Interface;
using BS.Shared.Translation;
namespace BeWo.ViewModel
{
public class InvoiceBaseVM : AbstractDCMapperVM<InvoiceBaseDC>
public class InvoiceBaseVM : AbstractDCMapperVM<InvoiceBaseDC>, IInvoiceBase
{
public static string PropertyName_AccountingPeriodEnd = "AccountingPeriodEnd";
@@ -116,85 +117,45 @@ namespace BeWo.ViewModel
};
private DateTime? _AccountingPeriodEnd;
private DateTime? _AccountingPeriodStart;
private string _CreatorFirstName = string.Empty;
private string _CreatorLastName = string.Empty;
private string _CustomerReferenceNumber = string.Empty;
private DateTime? _DueDate;
private int? _DunningLetterCount;
private DateTime? _InvoiceDate;
private InvoiceItemListVM _InvoiceItems;
private string _InvoiceNumber = string.Empty;
private string _InvoiceTitle = string.Empty;
internal bool _IsReviewed;
internal bool _IsSent;
internal bool _IsExported;
internal bool _IsPaid;
private string _PartialPayment = string.Empty;
internal bool _NeuErstellen;
internal bool _DiffErstellen;
internal bool _IsChecked;
private string _Notice = string.Empty;
private long? _RecipientCostBearerOid;
private long? _RecipientCustomerOid;
private string _RecipientDivision = string.Empty;
private string _RecipientOrganisation = string.Empty;
private long? _RecipientOrganisationOid;
private String _RecipientPostBox;
private string _RecipientPersonFirstName = string.Empty;
private string _RecipientPersonLastName = string.Empty;
private long? _RecipientPersonOid;
private string _RecipientPostCode = string.Empty;
private string _RecipientAddressLine1 = string.Empty;
private string _RecipientStreet = string.Empty;
private string _RecipientTown = string.Empty;
private string _SenderDivision = string.Empty;
private string _SenderFax = string.Empty;
private string _SenderFirstName = string.Empty;
private string _SenderLastName = string.Empty;
private string _SenderOrganisation = string.Empty;
private string _SenderPhone = string.Empty;
private long? _SupportConceptOid;
private decimal? _TotalAmount;
public InvoiceBaseVM(InvoiceBaseDC pDC) : this(pDC, false) { }
@@ -922,6 +883,8 @@ namespace BeWo.ViewModel
}
}
public string SenderAddressLine1 { get; set; }
public decimal? TotalAmount
{
get { return _TotalAmount; }
@@ -954,6 +917,10 @@ namespace BeWo.ViewModel
get; set;
}
public string SenderStreet => DataContract.SenderStreet;
public string SenderTown => DataContract.SenderTown;
public string SenderPostCode => DataContract.SenderPostCode;
protected override void InitByDataContract(InvoiceBaseDC pDataContract)
{
_SupportConceptOid = pDataContract.SupportConceptOid;

View File

@@ -7,6 +7,7 @@ using BS.Shared.Extensions;
using BeWo.Core;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using System.Windows.Media;
namespace BeWo.ViewModel
{
@@ -53,6 +54,12 @@ namespace BeWo.ViewModel
private string _IBAN;
private CompactEmployeeDC _SoziotherapieAnsprechpartner;
private ImageVM _Logo;
private string _ColorWaitTooLongStr;
private string _ColorSendUrbelegeStr;
private SolidColorBrush _ColorWaitTooLong;
private SolidColorBrush _ColorSendUrbelege;
private bool _ShowGkvBzEinzel;
private bool _ShowGkvBzUrbelege;
public MandatorVM(IList<InvoiceNumberVM> invoiceNumberList, MandatorDC pDC) : base(pDC, true)
{
@@ -586,7 +593,66 @@ namespace BeWo.ViewModel
FirePropertyChanged(nameof(Logo));
}
}
public SolidColorBrush ColorWaitTooLong
{
get { return _ColorWaitTooLong; }
set
{
if (!AreDifferent(ColorWaitTooLong, value))
return;
_ColorWaitTooLongStr = value?.ToString();
_ColorWaitTooLong = value;
StoreDirtyInformation(AreDifferent(DataContract.ColorWaitTooLong, value), nameof(ColorWaitTooLong));
FirePropertyChanged(nameof(ColorWaitTooLong));
}
}
public SolidColorBrush ColorSendUrbelege
{
get { return _ColorSendUrbelege; }
set
{
if (!AreDifferent(ColorSendUrbelege, value))
return;
_ColorSendUrbelegeStr = value?.ToString();
_ColorSendUrbelege = value;
StoreDirtyInformation(AreDifferent(DataContract.ColorSendUrbelege, value), nameof(ColorSendUrbelege));
FirePropertyChanged(nameof(ColorSendUrbelege));
}
}
public bool ShowGkvBzEinzel
{
get { return _ShowGkvBzEinzel; }
set
{
if (!AreDifferent(ShowGkvBzEinzel, value))
return;
_ShowGkvBzEinzel = value;
StoreDirtyInformation(AreDifferent(DataContract.ShowGkvBzEinzel, value), nameof(ShowGkvBzEinzel));
FirePropertyChanged(nameof(ShowGkvBzEinzel));
}
}
public bool ShowGkvBzUrbelege
{
get { return _ShowGkvBzUrbelege; }
set
{
if (!AreDifferent(ShowGkvBzUrbelege, value))
return;
_ShowGkvBzUrbelege = value;
StoreDirtyInformation(AreDifferent(DataContract.ShowGkvBzUrbelege, value), nameof(ShowGkvBzUrbelege));
FirePropertyChanged(nameof(ShowGkvBzUrbelege));
}
}
public bool CanEditIKLeistungserbringer { get; set; }
public string CanEditIKLeistungserbringerTooltip { get; set; }
@@ -612,6 +678,12 @@ namespace BeWo.ViewModel
CanEditIKLeistungserbringer = pDataContract.CanEditIKLeistungserbringer;
CanEditIKLeistungserbringerTooltip = pDataContract.CanEditIKLeistungserbringerTooltip;
_SoziotherapieAnsprechpartner = pDataContract.SoziotherapieAnsprechpartner;
_ColorWaitTooLong = ColorExtensions.ParseSolidColorBrush(pDataContract.ColorWaitTooLong);
_ColorWaitTooLongStr = pDataContract.ColorWaitTooLong;
_ColorSendUrbelege = ColorExtensions.ParseSolidColorBrush(pDataContract.ColorSendUrbelege);
_ColorSendUrbelegeStr = pDataContract.ColorSendUrbelege;
_ShowGkvBzEinzel = pDataContract.ShowGkvBzEinzel;
_ShowGkvBzUrbelege = pDataContract.ShowGkvBzUrbelege;
if(pDataContract.Logo is object)
Logo = new ImageVM(pDataContract.Logo);
@@ -677,7 +749,12 @@ namespace BeWo.ViewModel
pDataContract.BankAccount.Bic = Bic;
pDataContract.BankAccount.IBAN = IBAN;
pDataContract.SoziotherapieAnsprechpartner = SoziotherapieAnsprechpartner;
pDataContract.ColorWaitTooLong = _ColorWaitTooLongStr;
pDataContract.ColorSendUrbelege = _ColorSendUrbelegeStr;
pDataContract.ShowGkvBzEinzel = ShowGkvBzEinzel;
pDataContract.ShowGkvBzUrbelege = ShowGkvBzUrbelege;
pDataContract.Logo = Logo.CommitToDataContract();
return pDataContract;

View File

@@ -194,16 +194,16 @@ namespace Dakota.Logic
info.IKAbsender = DakotaConfig.IKAbsender;
info.IKKostentrager = infoParameter.IKKostentrager;
info.IKKrankenkasse = infoParameter.IKKrankenkasse;
info.IKLeistungserbringer = infoParameter.IKLeistungserbringer;
info.IKLeistungserbringer = infoParameter.AddressInformation.IKLeistungserbringer;
info.Rechnungsnummer = infoParameter.InvoiceBase.InvoiceNumber;
info.Rechnungsdatum = infoParameter.InvoiceBase.InvoiceDate.Value;
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungÜberAbrechnungsstelleOhneInkassovollmacht;
info.Name1 = infoParameter.Mandator.Name;
info.Name2 = "Rene Evertz";
info.Name3 = "Entwickler bei ownSoft";
info.Name4 = "dakota.exchange@ownsoft.de";
info.Name1 = infoParameter.AddressInformation.OrganisationName;
info.Name2 = infoParameter.AddressInformation.Phone;
info.Name3 = infoParameter.AddressInformation.Mail;
info.Name4 = "Entwicklung: dakota.exchange@ownsoft.de";
return info;
}
@@ -215,7 +215,7 @@ namespace Dakota.Logic
info.IKAbsender = DakotaConfig.IKAbsender;
info.IKKostentrager = infoParameter.IKKostentrager;
info.IKKrankenkasse = infoParameter.IKKrankenkasse;
info.IKLeistungserbringer = infoParameter.IKLeistungserbringer;
info.IKLeistungserbringer = infoParameter.AddressInformation.IKLeistungserbringer;
info.Rechnungsnummer = infoParameter.InvoiceBase.InvoiceNumber;
info.Rechnungsdatum = infoParameter.InvoiceBase.InvoiceDate.Value;

View File

@@ -1,4 +1,5 @@
using BS.Shared.DataContracts;
using BeWo.Data.Models;
using BS.Shared.DataContracts;
using Dakota.Models.Infos;
using System;
using System.Collections.Generic;
@@ -40,7 +41,7 @@ namespace Dakota.Logic
IsSammelrechnung = isSammelrechnung;
}
public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator, int datenaustauschreferenz, int transfernummer)
public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, AddressInformation address, int datenaustauschreferenz, int transfernummer)
{
try
{
@@ -75,7 +76,7 @@ namespace Dakota.Logic
{
foreach (var invoice in peroid.InvoiceItems)
{
var info_nutz_item = new InfoParameterInvoiceItem(serviceInvoice, invoice, organisation, customer, mandator);
var info_nutz_item = new InfoParameterInvoiceItem(serviceInvoice, invoice, organisation, customer, address);
DakotaInfoCreator.AddInfoParameter(nutzdaten, info_nutz_item, Version);
}

View File

@@ -1,4 +1,5 @@
using BS.Shared.DataContracts;
using BeWo.Data.Models;
using BS.Shared.DataContracts;
using Dakota.Models.Schlüssels;
using System;
using System.Collections.Generic;
@@ -15,22 +16,21 @@ namespace Dakota.Models.Infos
public ServiceInvoiceDC ServiceInvoice { get; set; }
public CustomerDC Customer { get; set; }
public OrganisationDC Organisation { get; set; }
public MandatorDC Mandator { get; set; }
public AddressInformation AddressInformation { get; set; }
public string Abrechnungsposition { get; set; }
public string IKKostentrager => Organisation.IKKostentrager;
public string IKKrankenkasse => Organisation.IKKrankenkasse;
public string IKLeistungserbringer => Mandator.IKLeistungserbringer;
public InfoParameterInvoiceItem(ServiceInvoiceDC serviceInvoice, InvoiceItemDC invoiceItem, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator)
public InfoParameterInvoiceItem(ServiceInvoiceDC serviceInvoice, InvoiceItemDC invoiceItem, OrganisationDC organisation, CustomerDC customer, AddressInformation addressInformation)
{
InvoiceItem = invoiceItem;
InvoiceBase = serviceInvoice.InvoiceBase;
ServiceInvoice = serviceInvoice;
Customer = customer;
Organisation = organisation;
Mandator = mandator;
AddressInformation = addressInformation;
// Todo: Valid prüfen
Abrechnungsposition = invoiceItem.UnitDescription?.Substring(6) ?? "TODO";

View File

@@ -391,6 +391,7 @@
<Compile Include="ICF\ICFDAO.cs" />
<Compile Include="LoggedInUserOperationContextExt.cs" />
<EmbeddedResource Include="Mappings\Bargeldtransaktionshistory.hbm.xml" />
<Compile Include="Models\AddressInformation.cs" />
<Compile Include="MultitenancyOperationContextExt.cs" />
<Compile Include="Security\BCrypt.cs" />
<Compile Include="Security\BeWoToolUserCollection.cs" />

View File

@@ -1,4 +1,5 @@
using BS.Shared;
using BS.Shared.Interface;
using System.Diagnostics;
namespace BeWo.Data.Entities

View File

@@ -2,10 +2,11 @@
using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Interface;
namespace BeWo.Data.Entities
{
public class InvoiceBase : BeWoEntityBase
public class InvoiceBase : BeWoEntityBase, IInvoiceBase
{
public static string PropertyName_AccountingPeriodEnd = "AccountingPeriodEnd";
@@ -825,5 +826,9 @@ namespace BeWo.Data.Entities
{
get; set;
}
public virtual string SenderStreet => SenderAddress?.Street;
public virtual string SenderTown => SenderAddress?.Town;
public virtual string SenderPostCode => SenderAddress?.PostalCode;
}
}

View File

@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using BS.Shared;
namespace BeWo.Data.Entities
@@ -41,12 +41,19 @@ namespace BeWo.Data.Entities
private string _Apikey;
private string _IKLeistungserbringer;
public Mandator()
{
this._Tid = TableID.Mandator;
}
public virtual BankAccount BankAccount { get; set; }
public virtual Employee SoziotherapieAnsprechpartner { get; set; }
public virtual Image Logo { get; set; }
public virtual string ColorWaitTooLong { get; set; }
public virtual string ColorSendUrbelege { get; set; }
public virtual bool ShowGkvBzEinzel { get; set; }
public virtual bool ShowGkvBzUrbelege { get; set; }
public virtual long BeWoClientType
{
get
@@ -365,9 +372,6 @@ namespace BeWo.Data.Entities
}
}
}
public virtual BankAccount BankAccount { get; set; }
public virtual Employee SoziotherapieAnsprechpartner { get; set; }
public virtual Image Logo { get; set; }
protected virtual string GetSettingValue(string key)
{

View File

@@ -29,6 +29,10 @@
<property name="LastModules" />
<property column="ApiKey" type="String" name="Apikey" length="256" />
<property column="IKLeistungserbringer" type="String" name="IKLeistungserbringer" length="16" />
<property name="ColorWaitTooLong"/>
<property name="ColorSendUrbelege"/>
<property name="ShowGkvBzEinzel"/>
<property name="ShowGkvBzUrbelege"/>
<many-to-one name="BankAccount" column="BankAccountOid" class="BeWo.Data.Entities.BankAccount,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>
<many-to-one name="SoziotherapieAnsprechpartner" column="SoziotherapieAnsprechpartnerOid" class="BeWo.Data.Entities.Employee,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>
<many-to-one name="Logo" column="ImageOid" class="BeWo.Data.Entities.Image,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Data.Models
{
public class AddressInformation
{
public string IKLeistungserbringer { get; set; }
public string OrganisationName { get; set; }
public string Street { get; set; }
public string PostCode { get; set; }
public string Town { get; set; }
public string Phone { get; set; }
public string Fax { get; set; }
public string Mail { get; set; }
public string Website { get; set; }
}
}

View File

@@ -0,0 +1,5 @@
ALTER TABLE `mandator`
ADD COLUMN `ColorWaitTooLong` VARCHAR(16) NULL DEFAULT NULL AFTER `ImageOid`,
ADD COLUMN `ColorSendUrbelege` VARCHAR(16) NULL DEFAULT NULL AFTER `ColorWaitTooLong`,
ADD COLUMN `ShowGkvBzEinzel` TINYINT NULL DEFAULT NULL AFTER `ColorSendUrbelege`,
ADD COLUMN `ShowGkvBzUrbelege` TINYINT NULL DEFAULT NULL AFTER `ShowGkvBzEinzel`;

View File

@@ -31,6 +31,14 @@ namespace BeWo.Report
long? serviceCategoryOid,
int startDay, int endDay, bool nurFehlende);
public XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year,
long orgaOid, long empOid,
long? serviceCategoryOid)
{
var end = DateTime.DaysInMonth(year, month);
return CreateServiceOverviewSingleCustomerReport(customerOid, month, year, orgaOid, empOid, serviceCategoryOid, 1, end);
}
public abstract XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year,
long orgaOid, long empOid,
long? serviceCategoryOid, int startDay,

View File

@@ -21,6 +21,7 @@ using BeWo.Service.Reporting;
using System.Web;
using BeWo.Data.Security;
using BS.Shared.ReportRequests;
using System.Drawing;
namespace BeWo.Report
{
@@ -1784,12 +1785,73 @@ namespace BeWo.Report
var gkvAbrechnung = DAOFactory.GenericDAO.LoadByID<GkvAbrechnung>(req.Oid);
var gkvAbrechnungDC = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(gkvAbrechnung);
var ro = GkvAbrechnungRO.Create(gkvAbrechnungDC, mandator, employee);
var invoicebase = gkvAbrechnungDC.InvoiceBases.First();
var customer_oid = invoicebase.CustomerOid;
var plugin = PluginLoader.FindClass<AccountingService>();
var address_information = plugin.GetAddressInformation(customer_oid);
var ro = GkvAbrechnungRO.Create(gkvAbrechnungDC, mandator, employee, address_information);
var report = FindReportImp<GkvAbrechnungRO>();
report.SetReportDataSource(ro);
return report as XtraReport;
var xtra = report as XtraReport;
if (req.AddUrbelege)
{
AddQuittierungsbelegToReport(xtra, gkvAbrechnung);
}
return report as XtraReport;
}
private void AddQuittierungsbelegToReport(XtraReport xtra, GkvAbrechnung gkvAbrechnung)
{
xtra.CreateDocument();
var dict = new Dictionary<long, HashSet<Point>>();
foreach (var invb in gkvAbrechnung.InvoiceBases)
{
var coid = invb.CostBearer2SupportConcept.SupportConcept.Customer.Oid.Value;
if (!dict.ContainsKey(coid))
dict.Add(coid, new HashSet<Point>());
var points = dict[coid];
var start = invb.AccountingPeriodStart.Value;
var end = invb.AccountingPeriodEnd.Value;
var start_1 = start.AddMonths(1);
var runner = new DateTime(start_1.Year, start_1.Month, 1);
points.Add(new Point(start.Year, start.Month));
while(runner <= end)
{
points.Add(new Point(runner.Year, runner.Month));
runner = runner.AddMonths(1);
}
}
foreach (var kv in dict)
{
var coid = kv.Key;
foreach (var point in kv.Value.OrderBy(x => x.X).ThenBy(x => x.Y))
{
var year = point.X;
var month = point.Y;
var quittierung = CreateServiceOverviewSingleCustomerReport(coid, month, year, 0, 0, null);
quittierung.CreateDocument();
xtra.Pages.AddRange(quittierung.Pages);
}
}
}
}
}

View File

@@ -1,4 +1,6 @@
using BeWo.Data.Entities;
using BeWo.Data.Models;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
@@ -46,7 +48,7 @@ namespace BeWo.Report.ReportObjects
public ImageSource Logo { get; set; }
public static GkvAbrechnungRO Create(GkvAbrechnungDC abrechnung, Mandator mandator, Employee employee)
public static GkvAbrechnungRO Create(GkvAbrechnungDC abrechnung, Mandator mandator, Employee employee, AddressInformation addressInformation)
{
var protokoll = (GkvTransferProtokollDC)abrechnung.LastTransferProtokoll;
var organisation = abrechnung.Organisation;
@@ -54,10 +56,10 @@ namespace BeWo.Report.ReportObjects
var result = new GkvAbrechnungRO();
result.SenderOrganisationName = mandator.Name;
result.SenderStreet = mandator.Street;
result.SenderPostCodeAndTown = $"{mandator.PostalCode} {mandator.Town}";
result.SenderWebsite = mandator.Website;
result.SenderOrganisationName = addressInformation.OrganisationName;
result.SenderStreet = addressInformation.Street;
result.SenderPostCodeAndTown = $"{addressInformation.PostCode} {addressInformation.Town}";
result.SenderWebsite = addressInformation.Website;
result.SenderBankName = mandator.BankAccount.BankName;
result.SenderBankIBAN = mandator.BankAccount.IBAN;
result.SenderBankBIC = mandator.BankAccount.Bic;
@@ -65,9 +67,9 @@ namespace BeWo.Report.ReportObjects
var person = mandator.SoziotherapieAnsprechpartner?.Person ?? employee.Person;
result.SenderContactPerson = person.FirstNameLastName;
result.SenderPhone = GetSenderInformation(person, mandator, ContactType.business_Phone);
result.SenderFax = GetSenderInformation(person, mandator, ContactType.business_Fax);
result.SenderMail = GetSenderInformation(person, mandator, ContactType.business_Mail);
result.SenderPhone = addressInformation.Phone;
result.SenderFax = addressInformation.Fax;
result.SenderMail = addressInformation.Mail;
var receiver_first = invoicebase.RecipientPersonFirstName;
var receiver_last = invoicebase.RecipientPersonLastName;
@@ -85,23 +87,18 @@ namespace BeWo.Report.ReportObjects
result.KrankenkasseIK = organisation.IKKostentrager;
result.KrankenkasseName = organisation.Name;
result.SenderIK = mandator.IKLeistungserbringer;
result.SenderIK = addressInformation.IKLeistungserbringer;
result.Rechnungsnummer = protokoll.Rechnungsnummer;
result.Rechnungsdatum = protokoll.ErstelltAm.Value.ToString("dd.MM.yyyy");
result.AnzahlDerUrbelege = string.Empty;
result.InvoiceBase = invoicebase;
result.Logo = new ImageSource(false, mandator.Logo.Original);
if(mandator.Logo?.Original is object)
result.Logo = new ImageSource(false, mandator.Logo.Original);
return result;
}
private static string GetSenderInformation(Person person, Mandator mandator, ContactType contactType)
{
var rtn = person.Contacts.FirstOrDefault(x => x.Type == contactType)?.Value.ToNullIfEmpty();
return rtn;
}
}
}

View File

@@ -22,77 +22,42 @@ namespace BeWo.Report.ReportObjects
public class ServicesOverviewRO : AbstractBeWoReportObject<ServicesOverviewRO>
{
private List<ServiceDetail> _Services = new List<ServiceDetail>();
private List<ServiceDoubleDetail> _ServicesDouble = new List<ServiceDoubleDetail>();
public long CustomerOid { get; set; }
public string AbsenceTimes { get; set; }
public List<AbsenceTime> Abwesenheiten { get; set; }
public List<EmployeeDetail> AllEmployees { get; set; } = new List<EmployeeDetail>();
public string ApprovedEndDate { get; set; }
public decimal ApprovedFLSPerMonth { get; set; }
public decimal ApprovedFLSPerMonthTotal { get; set; }
public decimal ApprovedFLSPerWeek { get; set; }
public decimal ApprovedFLSPerWeekTotal { get; set; }
public decimal ApprovedFLSTotal { get; set; }
public string ApprovedStartDate { get; set; }
public string ContactEmployee { get; set; }
public string Costbearer { get; set; }
public DateTime? CustomerBirthday { get; set; }
public string CustomerCity { get; set; }
public string CustomerFirstName { get; set; }
public string CustomerLastName { get; set; }
public string CustomerName { get; set; }
public string CustomerPostalCode { get; set; }
public string CustomerStreet { get; set; }
public string CustomerInsuranceNumer { get; set; }
public DateTime EndDate { get; set; }
public decimal? FreeMinutesThisMonth { get; set; }
public decimal MinutenGeleistetGesamt { get; set; }
public decimal MinutenSollGesamt { get; set; }
public string MainAttendant { get; set; }
public string MainAttendantCommaSeperated { get; set; }
public string Month { get; set; }
public string ReferenceNumber { get; set; }
public string RequestedEndDate { get; set; }
public string RequestedStartDate { get; set; }
public string Salutation { get; set; }
public decimal RateFactor { get; set; }
public decimal MinutenGeleistetBisVormonat { get; set; }
public decimal MinutenSollBisVormonat { get; set; }
public List<ServiceDetail> Services

View File

@@ -200,6 +200,7 @@
<Compile Include="RechnungSoziotherapie.Designer.cs">
<DependentUpon>RechnungSoziotherapie.cs</DependentUpon>
</Compile>
<Compile Include="Service\DkkkAccountingService.cs" />
<Compile Include="Service\DkkkCustomerService.cs" />
<Compile Include="RechnungMitEigenbeteiligung.cs">
<SubType>Component</SubType>

View File

@@ -0,0 +1,40 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Data.Models;
using BeWo.Service.Plugins;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DiakonieKKKleve.Service
{
public class DkkkAccountingService : AccountingService
{
public override AddressInformation GetAddressInformation(long? customer_oid = null)
{
var info = base.GetAddressInformation();
if (customer_oid is null)
return info;
var c = DAOFactory.GenericDAO.GetByID<Customer>(customer_oid.Value);
foreach (var t2c in c.Team2CustomerList)
{
if (t2c.Team.Name.Contains("Nord"))
{
info.IKLeistungserbringer = "500506341";
info.Street = "Stechbahn 33";
info.PostCode = "47533";
info.Town = "Kleve";
return info;
}
}
return info;
}
}
}

View File

@@ -145,6 +145,7 @@ namespace BeWo.Service.DCEntityMapper
if(customer is object)
{
pDataContract.CustomerOid = customer.Oid.Value;
pDataContract.CustomerFirstName = customer.Person.FirstName;
pDataContract.CustomerLastName = customer.Person.LastName;
var error = Validator.ValidateCustomer(customer.InsuranceNumber, customer.VersichertenStatus);

View File

@@ -31,6 +31,11 @@ namespace BeWo.Service.DCEntityMapper
to.AllowSbd = !string.IsNullOrEmpty(to.ClientId) && to.ClientId == "SBD";
to.ShowGkvBzEinzel = from.ShowGkvBzEinzel;
to.ShowGkvBzUrbelege = from.ShowGkvBzUrbelege;
to.ColorSendUrbelege = from.ColorSendUrbelege;
to.ColorWaitTooLong = from.ColorWaitTooLong;
#if DEBUG
//pDataContract.AllowSbd = true;
#endif
@@ -77,6 +82,11 @@ namespace BeWo.Service.DCEntityMapper
to.SoziotherapieAnsprechpartner = MapperFactory.CompactEmployeeDC_Employee.MergeWithEntity(from.SoziotherapieAnsprechpartner, to.SoziotherapieAnsprechpartner, false);
to.Logo = MapperFactory.ImageDC_Image.MergeWithEntity(from.Logo, to.Logo, false);
to.ShowGkvBzEinzel = from.ShowGkvBzEinzel;
to.ShowGkvBzUrbelege = from.ShowGkvBzUrbelege;
to.ColorSendUrbelege = from.ColorSendUrbelege;
to.ColorWaitTooLong = from.ColorWaitTooLong;
return to;
}

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@ namespace BeWo.Service.Plugins
//t = "2499262621"; // HPH Bersenbrück
//t = "4950382346"; // Holsinger
//t = "5973016645"; // Verein Lebensgestaltung Hanau
//t = "7375324044"; // Diakonie KK Kleve
t = "7375324044"; // Diakonie KK Kleve
//t = "1441747891"; // BeWo Mobil Köln
//t = "5120047701"; // Trialog
//t = "3629696651"; // Soziale Dienste Niederrhein (SDN)

View File

@@ -27,6 +27,7 @@ using BS.Shared.DataContracts.GkvAbrechnung;
using BS.Shared.Extensions;
using BS.Shared.Exceptions;
using BS.Shared.AppSender;
using BeWo.Data.Security;
namespace BeWo.Service.ServiceImplementations
{
@@ -819,6 +820,10 @@ namespace BeWo.Service.ServiceImplementations
try
{
var invoice_bases = DAOFactory.GenericDAO.LoadByIDs<InvoiceBase>(request.SelectedInvoiceBases);
ValidatorExtended.ValidateGkvAbrechnung(request.GkvAbrechnungDC, invoice_bases);
var gkv_abrechnung = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewEntity(request.GkvAbrechnungDC);
if (gkv_abrechnung.AbrechnungsZeitraumEnde.Value.Hour == 0)
@@ -834,9 +839,6 @@ namespace BeWo.Service.ServiceImplementations
foreach (var invoicebase_oid in request.SelectedInvoiceBases)
{
var service = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(invoicebase_oid);
var invoicebase = DAOFactory.GenericDAO.GetByID<InvoiceBase>(invoicebase_oid);
var invoicebase_dc = MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDC(invoicebase);
foreach (var peroid in service.ServiceInvoicePeriodList)
{
@@ -861,10 +863,16 @@ namespace BeWo.Service.ServiceImplementations
}
catch (GkvException exc)
{
MailUtils.SendGkvModuleErrorMail("CreateNewGkvAbrechnung", exc, Tenant);
if (exc.Title.IsNotNullOrWhiteSpace())
response.TitleMessage = exc.Title;
response.Message = exc.Message;
}
catch (Exception e)
{
MailUtils.SendGkvModuleErrorMail("CreateNewGkvAbrechnung", e, Tenant);
throw Utils.CreateBeWoFaultException(e);
}
@@ -926,15 +934,15 @@ namespace BeWo.Service.ServiceImplementations
GkvAbrechnungOid = entity.Oid.Value
};
if (entity.GkvTransferProtokolle is null)
entity.GkvTransferProtokolle = new List<GkvTransferProtokoll>();
entity.GkvTransferProtokolle.Add(protokoll);
try
{
CreateGkvTransferProtokoll(oid, entity, protokoll);
if (entity.GkvTransferProtokolle is null)
entity.GkvTransferProtokolle = new List<GkvTransferProtokoll>();
entity.GkvTransferProtokolle.Add(protokoll);
// Protokoll braucht Oid
DAOFactory.GenericDAO.Update(entity);
@@ -1022,6 +1030,8 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
ValidatorExtended.ValidateGkvAbrechnung(gkvAbrechnung, gkvAbrechnung.InvoiceBases);
var manager = new DakotaManager();
var mandatordc = new OperationsServiceImp().GetMandator();
@@ -1039,6 +1049,23 @@ namespace BeWo.Service.ServiceImplementations
protokoll.Datenaustauschreferenz = datenaustauschreferenz;
protokoll.Transfernummer = transfernummer;
var first_cost = gkvAbrechnung.InvoiceBases.First().CostBearer2SupportConcept.SupportConcept.Customer;
var plugin = PluginLoader.FindClass<AccountingService>();
var addressInfo = plugin.GetAddressInformation(first_cost.Oid);
foreach (var invoicebase in gkvAbrechnung.InvoiceBases)
{
var customer = invoicebase.CostBearer2SupportConcept.SupportConcept.Customer;
var addressInfo2 = plugin.GetAddressInformation(customer.Oid);
if (addressInfo.IKLeistungserbringer != addressInfo2.IKLeistungserbringer)
{
throw new GkvException($"Klient '{first_cost.Person.LastNameFirstName}' ({addressInfo.IKLeistungserbringer}) und '{customer.Person.LastNameFirstName}' ({addressInfo2.IKLeistungserbringer}) verweisen auf unterschiedliche Leistungserbringer.");
}
}
foreach (var invoicebase in gkvAbrechnung.InvoiceBases)
{
var service = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(invoicebase.Oid.Value);
@@ -1052,7 +1079,7 @@ namespace BeWo.Service.ServiceImplementations
Validator.ValidateCustomer(customerdc);
manager.Add(servicedc, orgadc, customerdc, mandatordc, dat_short, tra_short);
manager.Add(servicedc, orgadc, customerdc, addressInfo, dat_short, tra_short);
}
manager.Apply();
@@ -1061,8 +1088,6 @@ namespace BeWo.Service.ServiceImplementations
{
var msg = "Unerwartete Anzahl an Dakota Files berechnet.";
MailUtils.SendGkvModuleErrorMail("CreateGkvTransferProtokoll", msg, Tenant);
throw new GkvException(msg);
}
@@ -1087,8 +1112,6 @@ namespace BeWo.Service.ServiceImplementations
{
var msg = $"nutzdatendatei - Länger als 16777215: {nutzdatendatei.Length}";
MailUtils.SendGkvModuleErrorMail("CreateGkvTransferProtokoll", msg, Tenant);
throw new GkvException(msg);
}
@@ -1114,6 +1137,8 @@ namespace BeWo.Service.ServiceImplementations
if (string.IsNullOrEmpty(de.Title))
de.Title = "Protokoll Erstellung";
MailUtils.SendGkvModuleErrorMail("CreateGkvTransferProtokoll", de, Tenant);
throw de;
}
catch (Exception e)

View File

@@ -105,5 +105,8 @@
// Keys für das neue Kalendermodul
public static string SchedulingViewType => "SchedulingViewType";
public static string ShowGkvBzEinzel => "ShowGkvBzEinzel";
public static string ShowGkvBzUrbelege => "ShowGkvBzUrbelege";
}
}

View File

@@ -0,0 +1,46 @@
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.GkvAbrechnung;
using BS.Shared.Exceptions;
using BS.Shared.Extensions;
using BS.Shared.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Core
{
public static class ValidatorExtended
{
public static void ValidateGkvAbrechnung(IGkvAbrechnung gkvAbrechnung, IEnumerable<IInvoiceBase> invoiceBases, bool testInvoicesEmpty = true)
{
string error = null;
if (testInvoicesEmpty && !invoiceBases.Any())
error = "Keine Rechnungen gefunden";
else if (!AreAllAddressSame(invoiceBases))
error = "Unterschiedliche Rechnungspositionen";
if(error is string)
throw new GkvException(error, "Validierung");
}
public static bool TryValidateGkvAbrechnung(IGkvAbrechnung gkvAbrechnung, IEnumerable<IInvoiceBase> invoiceBases, bool testInvoicesEmpty = true)
{
try
{
ValidateGkvAbrechnung(gkvAbrechnung, invoiceBases, testInvoicesEmpty);
}
catch (Exception)
{
return false;
}
return true;
}
public static bool AreAllAddressSame(IEnumerable<IInvoiceBase> invoiceBases)
=> invoiceBases.Select(x => x.SenderAddressToString()).AreAllTheSame();
}
}

View File

@@ -12,6 +12,7 @@ namespace BS.Shared.DataContracts
{
[DataMember] public bool Success { get; set; }
[DataMember] public string Message { get; set; }
[DataMember] public string TitleMessage { get; set; }
public AppResponseDC(bool success)
{
@@ -22,5 +23,10 @@ namespace BS.Shared.DataContracts
{
Message = message;
}
public AppResponseDC(bool success, string message, string title) : this(success, message)
{
TitleMessage = title;
}
}
}

View File

@@ -13,5 +13,6 @@ namespace BS.Shared.DataContracts.GkvAbrechnung
public GkvResponseDC() : base(false) { }
public GkvResponseDC(bool success) : base(success) { }
public GkvResponseDC(bool success, string message) : base(success, message) { }
public GkvResponseDC(bool success, string message, string title) : base(success, message, title) { }
}
}

View File

@@ -3,251 +3,134 @@ using System.Collections.Generic;
using System.Runtime.Serialization;
using BS.Shared.Core;
using BS.Shared.Interface;
namespace BS.Shared.DataContracts
{
[DataContract]
public partial class InvoiceBaseDC : IDataContract
{
private List<ContactDC> _RecipientContactInformations;
[DataContract]
public partial class InvoiceBaseDC : IDataContract, IInvoiceBase
{
private List<ContactDC> _RecipientContactInformations;
private List<ContactDC> _SenderContactInformations;
private List<ContactDC> _SenderContactInformations;
[DataMember]
public DateTime? AccountingPeriodEnd { get; set; }
[DataMember] public DateTime? AccountingPeriodEnd { get; set; }
[DataMember] public DateTime? AccountingPeriodStart { get; set; }
[DataMember] public string CreatorFirstName { get; set; }
[DataMember] public string CreatorLastName { get; set; }
[DataMember] public bool? IsAlreadyInActiveGkvAbrechnung { get; set; }
[DataMember] public bool IsGkvValid { get; set; }
[DataMember] public string IsGkvValidError { get; set; }
[DataMember] public long CustomerOid { get; set; }
[DataMember] public string CustomerFirstName { get; set; }
[DataMember] public string CustomerLastName { get; set; }
[DataMember] public string CustomerReferenceNumber { get; set; }
[DataMember] public DateTime? DueDate { get; set; }
[DataMember] public int? DunningLetterCount { get; set; }
[DataMember] public long? InvoiceBaseOid { get; set; }
[DataMember] public long? InvoiceBaseVersion { get; set; }
[DataMember] public DateTime? InvoiceDate { get; set; }
[DataMember] public List<InvoiceItemDC> InvoiceItems { get; set; }
[DataMember] public string InvoiceNumber { get; set; }
[DataMember] public string InvoiceTitle { get; set; }
[DataMember] public bool IsReviewed { get; set; }
[DataMember] public bool IsSent { get; set; }
[DataMember] public bool IsExported { get; set; }
[DataMember] public bool IsPaid { get; set; }
[DataMember] public string PartialPayment { get; set; }
[DataMember] public bool NeuErstellen { get; set; }
[DataMember] public bool DiffErstellen { get; set; }
[DataMember] public string Notice { get; set; }
[DataMember] public string Details { get; set; }
[DataMember] public string Hinweise { get; set; }
[DataMember] public string InvoiceId { get; set; }
[DataMember] public string InvoiceTypeText { get; set; }
public string PeriodString
{
get
{
return this.AccountingPeriodStart.Value.ToShortDateString() + " - "
+ this.AccountingPeriodEnd.Value.ToShortDateString();
}
}
[DataMember]
public DateTime? AccountingPeriodStart { get; set; }
[DataMember]
public string CreatorFirstName { get; set; }
[DataMember]
public string CreatorLastName { get; set; }
[DataMember]
public bool? IsAlreadyInActiveGkvAbrechnung { get; set; }
[DataMember]
public bool IsGkvValid { get; set; }
[DataMember]
public string IsGkvValidError { get; set; }
[DataMember]
public string CustomerFirstName { get; set; }
[DataMember]
public string CustomerLastName { get; set; }
[DataMember]
public string CustomerReferenceNumber { get; set; }
[DataMember]
public DateTime? DueDate { get; set; }
[DataMember]
public int? DunningLetterCount { get; set; }
[DataMember]
public long? InvoiceBaseOid { get; set; }
[DataMember]
public long? InvoiceBaseVersion { get; set; }
[DataMember]
public DateTime? InvoiceDate { get; set; }
[DataMember]
public List<InvoiceItemDC> InvoiceItems { get; set; }
[DataMember]
public string InvoiceNumber { get; set; }
[DataMember]
public string InvoiceTitle { get; set; }
[DataMember]
public bool IsReviewed { get; set; }
[DataMember]
public bool IsSent { get; set; }
[DataMember]
public bool IsExported { get; set; }
[DataMember]
public bool IsPaid { get; set; }
[DataMember]
public string PartialPayment { get; set; }
[DataMember]
public bool NeuErstellen { get; set; }
[DataMember]
public bool DiffErstellen { get; set; }
[DataMember]
public string Notice { get; set; }
[DataMember]
public string Details { get; set; }
[DataMember]
public string Hinweise { get; set; }
[DataMember]
public string InvoiceId { get; set; }
[DataMember] public long? RecipientAddressOid { get; set; }
[DataMember] public long? RecipientAddressVersion { get; set; }
[DataMember] public long? RecipientCostBearerOid { get; set; }
[DataMember] public long? RecipientCustomerOid { get; set; }
[DataMember] public string RecipientDivision { get; set; }
[DataMember] public string RecipientOrganisation { get; set; }
[DataMember] public long? RecipientOrganisationOid { get; set; }
[DataMember] public string RecipientPersonFirstName { get; set; }
[DataMember] public string RecipientPersonLastName { get; set; }
[DataMember] public string RecipientSalutationAddressField { get; set; }
[DataMember] public long? RecipientPersonOid { get; set; }
[DataMember] public string RecipientPostCode { get; set; }
[DataMember] public string RecipientAddressLine1 { get; set; }
[DataMember] public string RecipientStreet { get; set; }
[DataMember] public string RecipientTown { get; set; }
[DataMember] public long? SenderAddressOid { get; set; }
[DataMember] public long? SenderAddressVersion { get; set; }
[DataMember] public string SenderDivision { get; set; }
[DataMember] public string SenderFirstName { get; set; }
[DataMember] public string SenderLastName { get; set; }
[DataMember] public string SenderOrganisation { get; set; }
[DataMember] public string SenderPostCode { get; set; }
[DataMember] public string SenderStreet { get; set; }
[DataMember] public string SenderTown { get; set; }
[DataMember] public SupportConceptCostBearerRelDC SupportConceptCostBearerRelDc { get; set; }
[DataMember] public long? SupportConceptOid { get; set; }
[DataMember] public decimal? TotalAmount { get; set; }
[DataMember] public InvoiceType Type { get; set; }
[DataMember] public long? StornoInvoiceBaseOid { get; set; }
[DataMember] public String BackgroundColor { get; set; }
[DataMember]
public string InvoiceTypeText { get; set; }
public List<ContactDC> RecipientContactInformations
{
get
{
if (this._RecipientContactInformations == null)
{
this._RecipientContactInformations = new List<ContactDC>();
}
public string PeriodString
{
get
{
return this.AccountingPeriodStart.Value.ToShortDateString() + " - "
+ this.AccountingPeriodEnd.Value.ToShortDateString();
}
}
return this._RecipientContactInformations;
}
[DataMember]
public long? RecipientAddressOid { get; set; }
set
{
this._RecipientContactInformations = value;
}
}
[DataMember]
public long? RecipientAddressVersion { get; set; }
[DataMember]
public List<ContactDC> SenderContactInformations
{
get
{
if (this._SenderContactInformations == null)
{
this._SenderContactInformations = new List<ContactDC>();
}
[DataMember]
public List<ContactDC> RecipientContactInformations
{
get
{
if (this._RecipientContactInformations == null)
{
this._RecipientContactInformations = new List<ContactDC>();
}
return this._SenderContactInformations;
}
return this._RecipientContactInformations;
}
set
{
this._SenderContactInformations = value;
}
}
set
{
this._RecipientContactInformations = value;
}
}
public bool ContainsRecipientAddressData()
{
return !Utils.AreAllNullOrEmpty(this.RecipientStreet, this.RecipientPostCode, this.RecipientTown);
}
[DataMember]
public long? RecipientCostBearerOid { get; set; }
[DataMember]
public long? RecipientCustomerOid { get; set; }
[DataMember]
public string RecipientDivision { get; set; }
[DataMember]
public string RecipientOrganisation { get; set; }
[DataMember]
public long? RecipientOrganisationOid { get; set; }
[DataMember]
public string RecipientPersonFirstName { get; set; }
[DataMember]
public string RecipientPersonLastName { get; set; }
[DataMember]
public string RecipientSalutationAddressField { get; set; }
[DataMember]
public long? RecipientPersonOid { get; set; }
[DataMember]
public string RecipientPostCode { get; set; }
[DataMember]
public string RecipientAddressLine1 { get; set; }
[DataMember]
public string RecipientStreet { get; set; }
[DataMember]
public string RecipientTown { get; set; }
[DataMember]
public long? SenderAddressOid { get; set; }
[DataMember]
public long? SenderAddressVersion { get; set; }
[DataMember]
public List<ContactDC> SenderContactInformations
{
get
{
if (this._SenderContactInformations == null)
{
this._SenderContactInformations = new List<ContactDC>();
}
return this._SenderContactInformations;
}
set
{
this._SenderContactInformations = value;
}
}
[DataMember]
public string SenderDivision { get; set; }
[DataMember]
public string SenderFirstName { get; set; }
[DataMember]
public string SenderLastName { get; set; }
[DataMember]
public string SenderOrganisation { get; set; }
[DataMember]
public string SenderPostCode { get; set; }
[DataMember]
public string SenderStreet { get; set; }
[DataMember]
public string SenderTown { get; set; }
[DataMember]
public SupportConceptCostBearerRelDC SupportConceptCostBearerRelDc { get; set; }
[DataMember]
public long? SupportConceptOid { get; set; }
[DataMember]
public decimal? TotalAmount { get; set; }
[DataMember]
public InvoiceType Type { get; set; }
[DataMember]
public long? StornoInvoiceBaseOid { get; set; }
[DataMember]
public String BackgroundColor { get; set; }
public bool ContainsRecipientAddressData()
{
return !Utils.AreAllNullOrEmpty(this.RecipientStreet, this.RecipientPostCode, this.RecipientTown);
}
public bool ContainsSenderAddressData()
{
return !Utils.AreAllNullOrEmpty(this.SenderStreet, this.SenderPostCode, this.SenderTown);
}
}
public bool ContainsSenderAddressData()
{
return !Utils.AreAllNullOrEmpty(this.SenderStreet, this.SenderPostCode, this.SenderTown);
}
}
}

View File

@@ -1,6 +1,7 @@
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Invoicing;
using System.Runtime.Serialization;
using System.Windows.Media;
namespace BS.Shared.DataContracts
{
@@ -31,5 +32,9 @@ namespace BS.Shared.DataContracts
[DataMember] public string CanEditIKLeistungserbringerTooltip { get; set; }
[DataMember] public CompactEmployeeDC SoziotherapieAnsprechpartner { get; set; }
[DataMember] public ImageDC Logo { get; set; }
[DataMember] public string ColorWaitTooLong { get; set; }
[DataMember] public string ColorSendUrbelege { get; set; }
[DataMember] public bool ShowGkvBzEinzel { get; set; }
[DataMember] public bool ShowGkvBzUrbelege { get; set; }
}
}

View File

@@ -78,5 +78,18 @@ namespace BS.Shared.Extensions
}
public static bool IsBrighter(this Color c, double threshold) => c.GetBrightness() > threshold;
public static Color Parse(string str)
{
return (Color)ColorConverter.ConvertFromString(str);
}
public static SolidColorBrush ParseSolidColorBrush(string str)
{
if (str is null)
return null;
return (SolidColorBrush)new BrushConverter().ConvertFrom(str);
}
}
}

View File

@@ -1,4 +1,5 @@
using System;
using BS.Shared.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
@@ -88,10 +89,12 @@ namespace BS.Shared.Extensions
return pString?.Replace("ẞ", "ß");
}
public static bool IsNotNullOrWhiteSpace(this string pString)
=> !pString.IsNullOrWhiteSpace();
public static bool IsNullOrWhiteSpace(this string str)
=> string.IsNullOrEmpty(str);
public static string ToNullIfEmpty(this string str)
{
return string.IsNullOrWhiteSpace(str) ? null : str;
}
=> str.IsNullOrWhiteSpace() ? null : str;
public static string ToFormatFollows(this string str1, string str2, char seperator = ' ')
{
@@ -110,5 +113,23 @@ namespace BS.Shared.Extensions
return rtn;
}
public static bool AreAllTheSame(this IEnumerable<string> list)
{
if (list is null || !list.Any())
return true;
string init = list.First();
foreach (var str in list)
{
if (str != init)
return false;
}
return true;
}
public static string SenderAddressToString(this IInvoiceBase invoiceBase)
=> $"{invoiceBase.SenderStreet}, {invoiceBase.SenderTown}, {invoiceBase.SenderPostCode}";
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Interface
{
public interface IInvoiceBase
{
string SenderStreet { get; }
string SenderTown { get; }
string SenderPostCode { get; }
}
}

View File

@@ -11,23 +11,27 @@ namespace BS.Shared.ReportRequests
public class GkvAbrechnungReportRequest : AbstractReportRequest
{
public const string PropertyStringOid = "oid";
public const string PropertyStringUrbelege = "urb";
public long Oid { get; set; }
public bool AddUrbelege { get; set; }
private GkvAbrechnungReportRequest() : base(ReportTypes.GkvAbrechnung)
{
}
public GkvAbrechnungReportRequest(long poid) : this()
public GkvAbrechnungReportRequest(long poid, bool urbelege) : this()
{
Oid = poid;
AddUrbelege = urbelege;
}
internal override NameValueCollection GetParameters() =>
new NameValueCollection()
{
{PropertyStringOid, Oid.ToString() }
{PropertyStringOid, Oid.ToString() },
{PropertyStringUrbelege, AddUrbelege.ToString() },
};
public static GkvAbrechnungReportRequest Parse(NameValueCollection collection)
@@ -43,6 +47,9 @@ namespace BS.Shared.ReportRequests
case PropertyStringOid:
rtn.Oid = long.Parse(value);
break;
case PropertyStringUrbelege:
rtn.AddUrbelege = bool.Parse(value);
break;
default:
break;
}

View File

@@ -165,6 +165,7 @@
<Compile Include="Core\Utils.cs" />
<Compile Include="Core\EventArgs.cs" />
<Compile Include="Core\ObservableSortCollection.cs" />
<Compile Include="Core\ValidatorExtended.cs" />
<Compile Include="Core\WohnheimbuchungsIntervall.cs" />
<Compile Include="DataContracts\AbsenceOverviewFilterDC.cs" />
<Compile Include="DataContracts\AiSettingsDC.cs" />
@@ -364,6 +365,7 @@
<Compile Include="Extensions\TimeIntervalExtensions.cs" />
<Compile Include="Interface\IGkvAbrechnung.cs" />
<Compile Include="Interface\IGkvTransferProtokoll.cs" />
<Compile Include="Interface\IInvoiceBase.cs" />
<Compile Include="Packet.cs" />
<Compile Include="ReportRequests\AbstractReportRequest.cs" />
<Compile Include="ReportRequests\GkvAbrechnungReportRequest.cs" />