source/Application/Model/Voucher.php
protected function _getSerieDiscount()
    {
        $oSeries = $this->getSerie();
        $oDiscount = oxNew(\OxidEsales\Eshop\Application\Model\Discount::class);

        $oDiscount->setId($oSeries->getId());
        $oDiscount->oxdiscount__oxshopid = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxshopid->value);
        $oDiscount->oxdiscount__oxactive = new \OxidEsales\Eshop\Core\Field(true);
        $oDiscount->oxdiscount__oxactivefrom = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxbegindate->value);
        $oDiscount->oxdiscount__oxactiveto = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxenddate->value);
        $oDiscount->oxdiscount__oxtitle = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxserienr->value);
        $oDiscount->oxdiscount__oxamount = new \OxidEsales\Eshop\Core\Field(1);
        $oDiscount->oxdiscount__oxamountto = new \OxidEsales\Eshop\Core\Field(MAX_64BIT_INTEGER);
        $oDiscount->oxdiscount__oxprice = new \OxidEsales\Eshop\Core\Field(0);
        $oDiscount->oxdiscount__oxpriceto = new \OxidEsales\Eshop\Core\Field(MAX_64BIT_INTEGER);
        $oDiscount->oxdiscount__oxaddsumtype = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxdiscounttype->value == 'percent' ? '%' : 'abs');
        $oDiscount->oxdiscount__oxaddsum = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxdiscount->value);
        $oDiscount->oxdiscount__oxitmartid = new \OxidEsales\Eshop\Core\Field();
        $oDiscount->oxdiscount__oxitmamount = new \OxidEsales\Eshop\Core\Field();
        $oDiscount->oxdiscount__oxitmmultiple = new \OxidEsales\Eshop\Core\Field();

        return $oDiscount;
    }
protected function _getSerieDiscount()
    {
        $oSeries = $this->getSerie();
        $oDiscount = oxNew(\OxidEsales\Eshop\Application\Model\Discount::class);

        $oDiscount->setId($oSeries->getId());
        $oDiscount->oxdiscount__oxshopid = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxshopid->value);
        $oDiscount->oxdiscount__oxactive = new \OxidEsales\Eshop\Core\Field(true);
        $oDiscount->oxdiscount__oxactivefrom = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxbegindate->value);
        $oDiscount->oxdiscount__oxactiveto = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxenddate->value);
        $oDiscount->oxdiscount__oxtitle = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxserienr->value);
        $oDiscount->oxdiscount__oxamount = new \OxidEsales\Eshop\Core\Field(1);
        $oDiscount->oxdiscount__oxamountto = new \OxidEsales\Eshop\Core\Field(MAX_64BIT_INTEGER);
        $oDiscount->oxdiscount__oxprice = new \OxidEsales\Eshop\Core\Field(0);
        $oDiscount->oxdiscount__oxpriceto = new \OxidEsales\Eshop\Core\Field(MAX_64BIT_INTEGER);
        $oDiscount->oxdiscount__oxaddsumtype = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxdiscounttype->value == 'percent' ? '%' : 'abs');
        $oDiscount->oxdiscount__oxaddsum = new \OxidEsales\Eshop\Core\Field($oSeries->oxvoucherseries__oxdiscount->value);
        $oDiscount->oxdiscount__oxitmartid = new \OxidEsales\Eshop\Core\Field();
        $oDiscount->oxdiscount__oxitmamount = new \OxidEsales\Eshop\Core\Field();
        $oDiscount->oxdiscount__oxitmmultiple = new \OxidEsales\Eshop\Core\Field();

        return $oDiscount;
    }
protected function _getSerieDiscount ( ) { $ oSeries = $ this -> getSerie ( ) ; $ oDiscount = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Discount :: class ) ; $ oDiscount -> setId ( $ oSeries -> getId ( ) ) ; $ oDiscount -> oxdiscount__oxshopid = new \ OxidEsales \ Eshop \ Core \ Field ( $ oSeries -> oxvoucherseries__oxshopid -> value ) ; $ oDiscount -> oxdiscount__oxactive = new \ OxidEsales \ Eshop \ Core \ Field ( true ) ; $ oDiscount -> oxdiscount__oxactivefrom = new \ OxidEsales \ Eshop \ Core \ Field ( $ oSeries -> oxvoucherseries__oxbegindate -> value ) ; $ oDiscount -> oxdiscount__oxactiveto = new \ OxidEsales \ Eshop \ Core \ Field ( $ oSeries -> oxvoucherseries__oxenddate -> value ) ; $ oDiscount -> oxdiscount__oxtitle = new \ OxidEsales \ Eshop \ Core \ Field ( $ oSeries -> oxvoucherseries__oxserienr -> value ) ; $ oDiscount -> oxdiscount__oxamount = new \ OxidEsales \ Eshop \ Core \ Field ( 1 ) ; $ oDiscount -> oxdiscount__oxamountto = new \ OxidEsales \ Eshop \ Core \ Field ( MAX_64BIT_INTEGER ) ; $ oDiscount -> oxdiscount__oxprice = new \ OxidEsales \ Eshop \ Core \ Field ( 0 ) ; $ oDiscount -> oxdiscount__oxpriceto = new \ OxidEsales \ Eshop \ Core \ Field ( MAX_64BIT_INTEGER ) ; $ oDiscount -> oxdiscount__oxaddsumtype = new \ OxidEsales \ Eshop \ Core \ Field ( $ oSeries -> oxvoucherseries__oxdiscounttype -> value == 'percent' ? '%' : 'abs' ) ; $ oDiscount -> oxdiscount__oxaddsum = new \ OxidEsales \ Eshop \ Core \ Field ( $ oSeries -> oxvoucherseries__oxdiscount -> value ) ; $ oDiscount -> oxdiscount__oxitmartid = new \ OxidEsales \ Eshop \ Core \ Field ( ) ; $ oDiscount -> oxdiscount__oxitmamount = new \ OxidEsales \ Eshop \ Core \ Field ( ) ; $ oDiscount -> oxdiscount__oxitmmultiple = new \ OxidEsales \ Eshop \ Core \ Field ( ) ; return $ oDiscount ; }
Returns the discount object created from voucher serie data

@return object
Returns the discount object created from voucher serie data