Bug Fix: Exception on deletion of first invoice in list

This commit is contained in:
Bobbie Hodgetts
2021-05-07 11:45:42 +01:00
parent d8ebd29c47
commit e054278cdd

View File

@@ -222,7 +222,10 @@ namespace bnhtrade.Core.Logic.Export
if (invoiceList[i].InvoiceLineList.Count == 0) if (invoiceList[i].InvoiceLineList.Count == 0)
{ {
invoiceList.RemoveAt(i); invoiceList.RemoveAt(i);
i = i - 1; if (i > 0)
{
i = i - 1;
}
} }
} }
// get here add info to lines // get here add info to lines