Document/Builder/DocumentBuilder.php
protected function buildDiscountsLines(Document\DocumentInterface $document)
    {
        $sale = $document->getSale();

        if (!$sale->hasAdjustments(Common\AdjustmentTypes::TYPE_DISCOUNT)) {
            return;
        }

        $adjustments = $sale->getAdjustments();
        foreach ($adjustments as $adjustment) {
            if ($adjustment->getType() === Common\AdjustmentTypes::TYPE_DISCOUNT) {
                $this->buildDiscountLine($adjustment, $document);
            }
        }
    }
protected function buildDiscountsLines(Document\DocumentInterface $document)
    {
        $sale = $document->getSale();

        if (!$sale->hasAdjustments(Common\AdjustmentTypes::TYPE_DISCOUNT)) {
            return;
        }

        $adjustments = $sale->getAdjustments();
        foreach ($adjustments as $adjustment) {
            if ($adjustment->getType() === Common\AdjustmentTypes::TYPE_DISCOUNT) {
                $this->buildDiscountLine($adjustment, $document);
            }
        }
    }
protected function buildDiscountsLines ( Document \ DocumentInterface $ document ) { $ sale = $ document -> getSale ( ) ; if ( ! $ sale -> hasAdjustments ( Common \ AdjustmentTypes :: TYPE_DISCOUNT ) ) { return ; } $ adjustments = $ sale -> getAdjustments ( ) ; foreach ( $ adjustments as $ adjustment ) { if ( $ adjustment -> getType ( ) === Common \ AdjustmentTypes :: TYPE_DISCOUNT ) { $ this -> buildDiscountLine ( $ adjustment , $ document ) ; } } }
Builds the document's discounts lines.

@param Document\DocumentInterface $document
Builds the document s discounts lines .