code: private function buildSaleDiscountsLinesViews(Model\SaleInterface $sale)
      {
          if (!$sale->hasAdjustments(Model\AdjustmentTypes::TYPE_DISCOUNT)) {
              return;
          }
  
          foreach ($sale->getAdjustments(Model\AdjustmentTypes::TYPE_DISCOUNT) as $adjustment) {
              $this->view->addDiscount($this->buildDiscountLine($adjustment));
          }
      }
docs: Builds the sale discounts lines views.
  
  @param Model\SaleInterface $sale