567 lines
26 KiB
XML
567 lines
26 KiB
XML
<localView:BeWoView
|
|
x:Class="BeWo.View.Detail.InvoiceView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
|
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
|
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"
|
|
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail"
|
|
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
|
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
|
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
|
|
xmlns:r="clr-namespace:BeWo.Security"
|
|
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
|
xmlns:val="clr-namespace:BeWo.Validation"
|
|
Width="Auto"
|
|
Height="Auto"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Focusable="True">
|
|
|
|
<Grid Name="root">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
|
<Grid MinWidth="300">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<GroupBox Header="Hilfeplan">
|
|
<Grid>
|
|
<ComboBox
|
|
x:Name="combo_customer"
|
|
Height="62"
|
|
HorizontalContentAlignment="Stretch"
|
|
Background="{DynamicResource SupportConceptListBrush}"
|
|
IsTextSearchEnabled="True"
|
|
ItemTemplate="{StaticResource SupportConceptComboBoxItemTemplate}"
|
|
ItemsPanel="{DynamicResource CustomerComboBoxItemsPanelTemplate}"
|
|
ItemsSource="{Binding PossibleSupportConcepts}"
|
|
SelectedValuePath="SupportConceptOid"
|
|
Style="{DynamicResource ObjectComboBoxStyle}"
|
|
TextSearch.TextPath="CustomerName">
|
|
<ComboBox.SelectedValue>
|
|
<MultiBinding Converter="{StaticResource OneWayToSourceSwitch}" Mode="OneWayToSource">
|
|
<Binding Path="NewVM.SupportConceptOid" />
|
|
<Binding Path="SupportConceptFilter" />
|
|
</MultiBinding>
|
|
</ComboBox.SelectedValue>
|
|
</ComboBox>
|
|
<TextBlock
|
|
Margin="0,0,5,0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Foreground="LightGray"
|
|
Text="< Kein Hilfeplan ausgewählt >"
|
|
Visibility="{Binding SelectedItem, ElementName=combo_customer, Converter={StaticResource ObjectVisibilityConverter}, ConverterParameter='true'}" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox
|
|
x:Name="gb_new"
|
|
Grid.Row="1"
|
|
Margin="5,5,5,0"
|
|
Padding="0,0,0,0"
|
|
Header="Neue Rechnung anlegen"
|
|
Style="{DynamicResource ObjectEditGroupBox}"
|
|
Visibility="{Binding SelectedItem, ElementName=combo_customer, Converter={StaticResource ObjectVisibilityConverter}}" />
|
|
|
|
<GroupBox
|
|
Grid.Row="2"
|
|
Header="{markup:Translate Empfänger}"
|
|
Visibility="{Binding Visibility, ElementName=gb_new}">
|
|
|
|
<ListView
|
|
Name="lb_recipients"
|
|
HorizontalAlignment="Stretch"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
ItemsSource="{Binding SelectedItem.InvoiceRecipients, ElementName=combo_customer}"
|
|
SelectedItem="{Binding NewVM.Recipient}">
|
|
<ListView.Resources>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
|
|
</ListView.Resources>
|
|
<ListView.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel />
|
|
</ItemsPanelTemplate>
|
|
</ListView.ItemsPanel>
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<RadioButton
|
|
Margin="3"
|
|
Content="{Binding Name}"
|
|
GroupName="rb_recipient"
|
|
IsChecked="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"
|
|
IsHitTestVisible="False" />
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
|
|
</GroupBox>
|
|
|
|
<GroupBox
|
|
x:Name="gb_details"
|
|
Grid.Row="3"
|
|
DataContext="{Binding NewVM}"
|
|
Header="Details"
|
|
Visibility="{Binding SelectedItem, ElementName=lb_recipients, Converter={StaticResource ObjectVisibilityConverter}}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</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" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label
|
|
Grid.Row="2"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Betrag" />
|
|
<dxe:TextEdit
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="3"
|
|
EditValue="{Binding Amount}"
|
|
Mask="c"
|
|
MaskType="Numeric"
|
|
MaskUseAsDisplayFormat="True" />
|
|
<Label
|
|
Grid.Row="3"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Rechnungsnummer" />
|
|
<TextBox
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="3"
|
|
Text="{Binding InvoiceNumber}" />
|
|
<Label
|
|
Grid.Row="4"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Rechnungsdatum" />
|
|
<dxe:DateEdit
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="3"
|
|
EditValue="{Binding InvoiceDate}"
|
|
MaskType="DateTimeAdvancingCaret" />
|
|
<Label
|
|
Grid.Row="5"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Abrechnungszeitraum von" />
|
|
<dxe:DateEdit
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="3"
|
|
EditValue="{Binding InvoicingPeriodStart}"
|
|
MaskType="DateTimeAdvancingCaret" />
|
|
<Label
|
|
Grid.Row="6"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Abrechnungszeitraum bis" />
|
|
<dxe:DateEdit
|
|
Grid.Row="6"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="3"
|
|
EditValue="{Binding InvoicingPeriodEnd}"
|
|
MaskType="DateTimeAdvancingCaret" />
|
|
<Label
|
|
Grid.Row="7"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="{markup:Translate Empfänger}" />
|
|
<TextBox
|
|
Grid.Row="7"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="3"
|
|
Text="{Binding RecipientName}" />
|
|
<Label
|
|
Grid.Row="8"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Adresse" />
|
|
<TextBox
|
|
Grid.Row="8"
|
|
Grid.Column="1"
|
|
Height="40"
|
|
Margin="3"
|
|
Text="{Binding RecipientAddress}" />
|
|
<Label
|
|
Grid.Row="9"
|
|
Height="23"
|
|
Margin="3"
|
|
Content="Fußnote" />
|
|
<TextBox
|
|
Grid.Row="9"
|
|
Grid.Column="1"
|
|
Height="40"
|
|
Margin="3"
|
|
Text="{Binding Notice}" />
|
|
|
|
</Grid>
|
|
|
|
</GroupBox>
|
|
|
|
<Button
|
|
x:Name="button_add"
|
|
Grid.Row="4"
|
|
Height="23"
|
|
Margin="5"
|
|
HorizontalAlignment="Right"
|
|
BorderThickness="3"
|
|
Click="button_add_Click"
|
|
Content="Rechnung erstellen"
|
|
FontWeight="Normal"
|
|
Visibility="{Binding Visibility, ElementName=gb_details}" />
|
|
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
<ListView
|
|
Name="lb_invoivces"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="1"
|
|
HorizontalContentAlignment="Stretch"
|
|
Background="{x:Null}"
|
|
BorderBrush="{x:Null}"
|
|
ItemsSource="{Binding FilteredInvoices, Mode=OneWay}">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListBoxItem}">
|
|
<Setter Property="Focusable" Value="false" />
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
<ListView.Resources>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
|
|
</ListView.Resources>
|
|
<ListView.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel />
|
|
</ItemsPanelTemplate>
|
|
</ListView.ItemsPanel>
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
Height="85"
|
|
Margin="3"
|
|
Background="White"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="5">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Margin="5,5,5,3" FontWeight="Bold">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="{}{0} vom {1:dd.MM.yyyy} an {2}">
|
|
<MultiBinding.Bindings>
|
|
<Binding Path="InvoiceNumber" />
|
|
<Binding Path="InvoiceDate" />
|
|
<Binding Path="RecipientName" />
|
|
</MultiBinding.Bindings>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.ColumnSpan="2"
|
|
Margin="5,0,0,0">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="Abrechnungszeitraum: {0:dd.MM.yyyy} - {1:dd.MM.yyyy}">
|
|
<MultiBinding.Bindings>
|
|
<Binding Path="InvoicingPeriodStart" />
|
|
<Binding Path="InvoicingPeriodEnd" />
|
|
</MultiBinding.Bindings>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
|
|
<TextBlock
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Height="50"
|
|
Margin="0,5,5,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Text="{Binding Amount, StringFormat=\{0:0.00\} €}" />
|
|
<Button
|
|
x:Name="btnEdit"
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Width="32"
|
|
Height="22"
|
|
Margin="0,0,40,5"
|
|
Padding="1,1,1,1"
|
|
HorizontalAlignment="Right"
|
|
BorderThickness="1,1,1,1"
|
|
Click="btnEdit_Click"
|
|
Style="{DynamicResource GlassButton}"
|
|
Tag="{Binding}"
|
|
Visibility="{Binding Path=EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
|
|
<Image
|
|
Margin="1,1,1,1"
|
|
Source="..\..\Ressources\Icons\Symbol Edit.png"
|
|
Stretch="Uniform" />
|
|
</Button>
|
|
<Button
|
|
x:Name="btnDelete"
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Width="32"
|
|
Height="22"
|
|
Margin="0,0,5,5"
|
|
Padding="1,1,1,1"
|
|
HorizontalAlignment="Right"
|
|
BorderThickness="1,1,1,1"
|
|
Click="btnDelete_Click"
|
|
Style="{DynamicResource GlassButton}"
|
|
Tag="{Binding}"
|
|
Visibility="{Binding Path=EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
|
|
<Image
|
|
Margin="1,1,1,1"
|
|
Source="..\..\Ressources\Icons\Symbol Delete.png"
|
|
Stretch="Uniform" />
|
|
</Button>
|
|
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
|
|
<Popup
|
|
x:Name="pu_edit"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
AllowsTransparency="True"
|
|
DataContext="{Binding EditVM}"
|
|
Placement="Center"
|
|
PlacementTarget="{Binding ElementName=root}">
|
|
<Popup.BindingGroup>
|
|
<BindingGroup />
|
|
</Popup.BindingGroup>
|
|
<GroupBox Width="500" Style="{StaticResource PopUpWindowStyle}">
|
|
<GroupBox.Header>
|
|
<StackPanel
|
|
Margin="0,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Image Height="28" Source="..\..\Ressources\Icons\CoinsDisabled.png" />
|
|
<TextBox
|
|
Margin="10,4,0,0"
|
|
Padding="0,0,0,0"
|
|
VerticalAlignment="Stretch"
|
|
Background="{x:Null}"
|
|
BorderBrush="{x:Null}"
|
|
BorderThickness="0,0,0,0"
|
|
FontSize="20"
|
|
Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
|
|
Text="Rechnung bearbeiten" />
|
|
</StackPanel>
|
|
</GroupBox.Header>
|
|
|
|
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Rectangle Height="6" Fill="{DynamicResource AccountingContentBrush}" />
|
|
|
|
<Grid Grid.Row="1" Margin="0,3,0,0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</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" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label
|
|
Grid.Row="2"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Betrag" />
|
|
<dxe:TextEdit
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="5"
|
|
EditValue="{Binding Amount}"
|
|
Mask="c"
|
|
MaskType="Numeric"
|
|
MaskUseAsDisplayFormat="True" />
|
|
<Label
|
|
Grid.Row="3"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Rechnungsnummer" />
|
|
<TextBox
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="5"
|
|
Text="{Binding InvoiceNumber}" />
|
|
<Label
|
|
Grid.Row="4"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Rechnungsdatum" />
|
|
<dxe:DateEdit
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="5"
|
|
EditValue="{Binding InvoiceDate}"
|
|
MaskType="DateTimeAdvancingCaret" />
|
|
<Label
|
|
Grid.Row="5"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Abrechnungszeitraum von" />
|
|
<dxe:DateEdit
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="5"
|
|
EditValue="{Binding InvoicingPeriodStart}"
|
|
MaskType="DateTimeAdvancingCaret" />
|
|
<Label
|
|
Grid.Row="6"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Abrechnungszeitraum bis" />
|
|
<dxe:DateEdit
|
|
Grid.Row="6"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="5"
|
|
EditValue="{Binding InvoicingPeriodEnd}"
|
|
MaskType="DateTimeAdvancingCaret" />
|
|
<Label
|
|
Grid.Row="7"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="{markup:Translate Empfänger}" />
|
|
<TextBox
|
|
Grid.Row="7"
|
|
Grid.Column="1"
|
|
Height="23"
|
|
Margin="5"
|
|
Text="{Binding RecipientName}" />
|
|
<Label
|
|
Grid.Row="8"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Adresse" />
|
|
<TextBox
|
|
Grid.Row="8"
|
|
Grid.Column="1"
|
|
Height="40"
|
|
Margin="5"
|
|
Text="{Binding RecipientAddress}" />
|
|
<Label
|
|
Grid.Row="9"
|
|
Height="23"
|
|
Margin="5"
|
|
Content="Fußnote" />
|
|
<TextBox
|
|
Grid.Row="9"
|
|
Grid.Column="1"
|
|
Height="40"
|
|
Margin="5"
|
|
Text="{Binding Notice}" />
|
|
|
|
</Grid>
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.ColumnSpan="2"
|
|
Height="Auto"
|
|
Margin="10"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
x:Name="btnSave"
|
|
Height="25"
|
|
Margin="5"
|
|
Command="ApplicationCommands.Save"
|
|
Content="Speichern und schließen" />
|
|
<Button
|
|
x:Name="btnClose"
|
|
Height="25"
|
|
Margin="5"
|
|
Command="ApplicationCommands.Close"
|
|
Content="Abbrechen" />
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</GroupBox>
|
|
</Popup>
|
|
|
|
</Grid>
|
|
</localView:BeWoView> |