From da9df5cbeb85ced59ae012917d67985d18ffc7bc Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Fri, 14 Jun 2024 12:11:49 +0200 Subject: [PATCH] Export/Ebics: Warn user if no client IBAN is set --- Elwig/Helpers/Export/Ebics.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Elwig/Helpers/Export/Ebics.cs b/Elwig/Helpers/Export/Ebics.cs index 0ce57dd..0757313 100644 --- a/Elwig/Helpers/Export/Ebics.cs +++ b/Elwig/Helpers/Export/Ebics.cs @@ -38,8 +38,11 @@ namespace Elwig.Helpers.Export { } public async Task ExportAsync(IEnumerable transactions, IProgress? progress = null) { - if (transactions.Any(tx => tx.Amount < 0)) + if (transactions.Any(tx => tx.Amount < 0)) { throw new ArgumentException("Tranaction amount may not be negative"); + } else if (App.Client.Iban == null) { + throw new ArgumentException("Client IBAN has to be set"); + } progress?.Report(0.0); var nbOfTxs = transactions.Count(); int count = nbOfTxs + 2, i = 0;