<UserControl x:Class="Gremlin.MVVM.QuoteView"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:cal="http://www.caliburnproject.org"
            xmlns:local="clr-namespace:Gremlin.MVVM">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="2*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="2*"/>
			<ColumnDefinition Width="4*"/>
			<ColumnDefinition Width="2*"/>
			<ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
		
		<!--Recepient-->
		<Grid Grid.Row="0" Grid.Column="0" Height="Auto">
			<DataGrid x:Name="Recipient" Margin="10,5,10,5" />
		</Grid>

		<!--QuoteDetails-->
		<Grid Grid.Row="1" Grid.Column="0" Height="Auto">
			<StackPanel>
				<TextBlock x:Name="lblAngebotsname" Text="Angebotsname" Margin="10,5,10,5"/>
				<TextBlock x:Name="lblAngebotsnummer" Text="Angebotsnummer" Margin="10,5,10,5"/>
				<TextBlock x:Name="lblQuotingPath" Text="Angebotspfad" Margin="10,5,10,5"/>
				<TextBlock x:Name="lblGewaehrleistung" Text="Gewährleistung (Monate)" Margin="10,5,10,5"/>
				<TextBlock x:Name="lblAngebotsgueltigkeit" Text="Angebotsgültigkeit (Tage)" Margin="10,5,10,5"/>
				<!--<TextBlock x:Name="lblOppID" Text="SAP Opp ID" Margin="10,5,10,5"/>-->
                <TextBlock x:Name="lblVAT" Text="MwSt. (%)" Margin="10,5,10,5"/>
                <TextBlock x:Name="lblFreight" Text="Versand und Bereitstellungskosten (%)" Margin="10,5,10,5"/>
            </StackPanel>
		</Grid>
		<Grid Grid.Row="1" Grid.Column="1" Height="Auto">
			<StackPanel>
				<TextBox x:Name="QuoteType" Margin="10,5,10,5"/>
				<TextBox x:Name="QuoteNumber" Margin="10,5,10,5"/>
				<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch">
					<TextBox x:Name="QuotePath" Margin="10,5,10,5"/>
					<Button x:Name="ChooseQuotePath" Content="..." Margin="10,5,10,5"/>
				</StackPanel>
				<TextBox x:Name="Warranty" Margin="10,5,10,5"/>
				<TextBox x:Name="Validity" Margin="10,5,10,5"/>
				<!--<TextBox x:Name="OppID" Margin="10,5,10,5"/>-->
                <TextBox x:Name="VAT" Margin="10,5,10,5"/>
                <TextBox x:Name="Freight" Margin="10,5,10,5"/>
            </StackPanel>
		</Grid>
		<Grid Grid.Row="1" Grid.Column="2" Height="Auto">
			<StackPanel>
                <CheckBox x:Name="Preisinformation" Content="Preisinformation" Margin="10,5,10,5"/>
                <CheckBox x:Name="ShowBrutto" Content="Bruttopreise anzeigen" Margin="10,5,10,5"/>
				<CheckBox x:Name="SinglePrices" Content="Einzelpreise ausweisen" Margin="10,5,10,5"/>
				<CheckBox x:Name="ShowDiscounts" Content="Discounts ausweisen" Margin="10,5,10,5"/>
				<CheckBox x:Name="Brochures" Content="Broschüren anhängen" Margin="10,5,10,5"/>
				<CheckBox x:Name="DataSheets" Content="Datenblätter anhängen" Margin="10,5,10,5"/>
				<CheckBox x:Name="MailTemplate" Content="Mail aus Template erstellen" Margin="10,5,10,5"/>
			</StackPanel>
		</Grid>

        <!--TotalTaxFreight-->
        <Grid Grid.Row="1" Grid.Column="3" Height="Auto" Width="Auto">
            <StackPanel>
                <TextBlock x:Name="lblTotalListprice" Text="Listpreis netto" Margin="10,5,10,5"/>
                <TextBlock x:Name="lblTotalNet" Text="Summe netto" Margin="10,5,10,5"/>
                <TextBlock x:Name="lblTotalFreightOnly" Text="Versand und Bereitstellungskosten" Margin="10,5,10,5"/>
                <TextBlock x:Name="lblTotalFreight" Text="Gesamtsumme netto" Margin="10,5,10,5"/>
                <TextBlock x:Name="lblTotalVAT" Text="Mehrwertsteuer" Margin="10,5,10,5"/>
                <TextBlock x:Name="lblTotalGross" Text="Gesamtsumme brutto" Margin="10,5,10,5"/>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="4" Height="Auto" Width="Auto">
            <StackPanel>
                <TextBlock x:Name="TotalListprice" Margin="10,5,10,5" HorizontalAlignment="Right"/>
                <TextBlock x:Name="TotalNet" Margin="10,5,10,5" HorizontalAlignment="Right"/>
                <TextBlock x:Name="TotalFreightOnly" Margin="10,5,10,5" HorizontalAlignment="Right"/>
                <TextBlock x:Name="TotalFreight" Margin="10,5,10,5" HorizontalAlignment="Right"/>
                <TextBlock x:Name="TotalVAT" Margin="10,5,10,5" HorizontalAlignment="Right"/>
                <TextBlock x:Name="TotalGross" Margin="10,5,10,5" HorizontalAlignment="Right"/>
            </StackPanel>
        </Grid>
		
		<!--LineItems-->
		<Grid Grid.Row="2" Grid.ColumnSpan="5" Height="Auto">
			<DataGrid
				x:Name="LineItemsVM"
				AutoGenerateColumns="True"
                MaxColumnWidth="500"
				CanUserAddRows="False"
				MinHeight="100"
                MaxHeight="400"
				Margin="10,5,10,5"
				AlternatingRowBackground="LightGray"
                SelectedItem="SelectedLineItem"
                SelectionMode="Single"
			/>
		</Grid>

        <!--SelectedLineItem-->
        <Grid Grid.Row="3" Grid.ColumnSpan="5" Height="Auto">
            <TextBox Name="SelectedLineItem" Text="{Binding Path=SelectedLineItem.CustomDescriptionVM.DescriptionText}" Margin="10,5,10,5"/>
        </Grid>
    </Grid>
</UserControl>