var collection = Identity.NullReference();
foreach(var line in doc.Lines)
if (line.ProductId.ToString() == uniqueId)
collection = (line as ProductLine)?.Collection;
if (!ConfiguredSystemUnitProduct.IsInSystemUnit(doc, collection))
uniqueId = line.UniqueId;
var collection = Identity.NullReference();
var item = new DLineInfo();
foreach (var line in doc.Lines)
if (line.ProductId.ToString() == uniqueId)
collection = (line as ProductLine)?.Collection;
if (!ConfiguredSystemUnitProduct.IsInSystemUnit(doc, collection))
foreach (var product in products)
if (product.NomenclatureId == line.ProductId && product.Line == line.LineNumber)