diff --git a/src/bnhtrade.Core/Logic/Export/AmazonSettlement.cs b/src/bnhtrade.Core/Logic/Export/AmazonSettlement.cs index 3fbae60..5826447 100644 --- a/src/bnhtrade.Core/Logic/Export/AmazonSettlement.cs +++ b/src/bnhtrade.Core/Logic/Export/AmazonSettlement.cs @@ -222,7 +222,10 @@ namespace bnhtrade.Core.Logic.Export if (invoiceList[i].InvoiceLineList.Count == 0) { invoiceList.RemoveAt(i); - i = i - 1; + if (i > 0) + { + i = i - 1; + } } } // get here add info to lines