getPrice method

num getPrice(
  1. Iterable<Calibre<ArticleRawAbstract>> linesInStore
)

Implementation

num getPrice(Iterable<Calibre> linesInStore) {
  if (linesInStore.isNotEmpty) {
    for (final line in linesInStore) {
      if (line.isBasket == false && line.id == proxyCalibreId) {
        for (final article in line.articles) {
          if (article.calibreId == proxyCalibreId &&
              article.id == proxyArticleId) {
            return (article as ArticleRetail).price;
          }
        }
      }
    }
  }
  return 0;
}