Export/Ebics: Implement version customization
Some checks failed
Test / Run tests (push) Failing after 2m22s
Some checks failed
Test / Run tests (push) Failing after 2m22s
This commit is contained in:
@ -526,8 +526,8 @@
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Parameter">
|
||||
<Grid>
|
||||
<GroupBox x:Name="ParameterAreaComGroup" Header="Berechnung Flächenbindungen (aktuelle Saison)" Margin="10,10,10,10" VerticalAlignment="Top">
|
||||
<StackPanel>
|
||||
<GroupBox x:Name="ParameterAreaComGroup" Header="Berechnung Flächenbindungen (aktuelle Saison)" Margin="10,10,10,0" VerticalAlignment="Top">
|
||||
<Grid>
|
||||
<CheckBox x:Name="ParameterAllowAttrIntoLowerInput" Content="Erlauben Lieferungen auch auf (konfigurierte) "schlechtere" Flächenbindungen aufzuteilen"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,10,10,10"
|
||||
@ -541,7 +541,33 @@
|
||||
</CheckBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
<GroupBox Header="Daten-Export" Margin="10,10,10,10">
|
||||
<Grid>
|
||||
<Label Content="Version EBICS-Überweisung:" Margin="10,10,10,10"/>
|
||||
<ComboBox x:Name="ParameterExportEbicsVersion" Margin="180,10,10,10" Width="50"
|
||||
HorizontalAlignment="Left">
|
||||
<ComboBoxItem>3</ComboBoxItem>
|
||||
<ComboBoxItem>4</ComboBoxItem>
|
||||
<ComboBoxItem>5</ComboBoxItem>
|
||||
<ComboBoxItem>6</ComboBoxItem>
|
||||
<ComboBoxItem>7</ComboBoxItem>
|
||||
<ComboBoxItem>8</ComboBoxItem>
|
||||
<ComboBoxItem IsSelected="True">9</ComboBoxItem>
|
||||
<ComboBoxItem>10</ComboBoxItem>
|
||||
<ComboBoxItem>11</ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="Adressen EBICS-Überweisung:" Margin="10,40,10,10"/>
|
||||
<ComboBox x:Name="ParameterExportEbicsAddress" Margin="180,40,10,10" Width="150"
|
||||
HorizontalAlignment="Left">
|
||||
<ComboBoxItem>Nicht anführen</ComboBoxItem>
|
||||
<ComboBoxItem>Adresszeilen</ComboBoxItem>
|
||||
<ComboBoxItem IsSelected="True">Vollwertig</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Textelemente">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible">
|
||||
|
@ -94,6 +94,8 @@ namespace Elwig.Windows {
|
||||
ParameterAllowAttrIntoLowerInput.IsEnabled = false;
|
||||
ParameterAvoidUnderDeliveriesInput.IsEnabled = false;
|
||||
ParameterHonorGebundenInput.IsEnabled = false;
|
||||
ParameterExportEbicsVersion.IsEnabled = false;
|
||||
ParameterExportEbicsAddress.IsEnabled = false;
|
||||
}
|
||||
|
||||
new protected void UnlockInputs() {
|
||||
@ -146,6 +148,8 @@ namespace Elwig.Windows {
|
||||
ParameterAllowAttrIntoLowerInput.IsEnabled = true;
|
||||
ParameterAvoidUnderDeliveriesInput.IsEnabled = true;
|
||||
ParameterHonorGebundenInput.IsEnabled = true;
|
||||
ParameterExportEbicsVersion.IsEnabled = true;
|
||||
ParameterExportEbicsAddress.IsEnabled = true;
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||
@ -373,6 +377,8 @@ namespace Elwig.Windows {
|
||||
ParameterAllowAttrIntoLowerInput.IsChecked = s?.Billing_AllowAttrsIntoLower ?? false;
|
||||
ParameterAvoidUnderDeliveriesInput.IsChecked = s?.Billing_AvoidUnderDeliveries ?? false;
|
||||
ParameterHonorGebundenInput.IsChecked = s?.Billing_HonorGebunden ?? false;
|
||||
ParameterExportEbicsVersion.SelectedIndex = p.ExportEbicsVersion - 3;
|
||||
ParameterExportEbicsAddress.SelectedIndex = p.ExportEbicsAddress;
|
||||
|
||||
FinishInputFilling();
|
||||
}
|
||||
@ -400,6 +406,9 @@ namespace Elwig.Windows {
|
||||
p.TextDeliveryConfirmation = TextElementDeliveryConfirmation.Text.Length > 0 ? TextElementDeliveryConfirmation.Text : null;
|
||||
p.TextCreditNote = TextElementCreditNote.Text.Length > 0 ? TextElementCreditNote.Text : null;
|
||||
|
||||
p.ExportEbicsVersion = ParameterExportEbicsVersion.SelectedIndex + 3;
|
||||
p.ExportEbicsAddress = ParameterExportEbicsAddress.SelectedIndex;
|
||||
|
||||
await p.UpdateValues();
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,7 @@ namespace Elwig.Windows {
|
||||
Menu_EbicsSave.IsEnabled = false;
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
using var e = new Ebics(v, d.FileName, 9);
|
||||
using var e = new Ebics(v, d.FileName, App.Client.ExportEbicsVersion, (Ebics.AddressMode)App.Client.ExportEbicsAddress);
|
||||
await e.ExportAsync(Transaction.FromPaymentVariant(v));
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
Reference in New Issue
Block a user