Export/Ebics: Warn user if no client IBAN is set
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:
@ -38,8 +38,11 @@ namespace Elwig.Helpers.Export {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task ExportAsync(IEnumerable<Transaction> transactions, IProgress<double>? progress = null) {
|
public async Task ExportAsync(IEnumerable<Transaction> transactions, IProgress<double>? 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");
|
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);
|
progress?.Report(0.0);
|
||||||
var nbOfTxs = transactions.Count();
|
var nbOfTxs = transactions.Count();
|
||||||
int count = nbOfTxs + 2, i = 0;
|
int count = nbOfTxs + 2, i = 0;
|
||||||
|
Reference in New Issue
Block a user