itemsTotalPrice property

num get itemsTotalPrice

Implementation

num get itemsTotalPrice => fold(0, (value, item) {
      if (item.isBasket) {
        return (value +
                (item.proxiesWorth as Iterable<ProxyArticleWorth>)
                    .basketTotalPrice(
                        (item.article as ArticleBasketOnTicket)
                            .discountAmountSalesOnly,
                        (item.article as ArticleBasketOnTicket)
                            .markupAmountSalesOnly)) *
            item.quantity;
      } else if (item.isUncountable) {
        // item.quantity == 1 for uncountable
        return (value + (item.article as ArticleUncountableOnTicket).price);
      } else {
        return (value +
            ((item.article as ArticleRetailOnTicket).price * item.quantity));
      }
    });