Writes voucher number information to export file and returns number of written records info

@param int $iStart start exporting from

@return int
353751
public function exportVouchers($iStart)
    {
        $iExported = false;

        if ($oSerie = $this->_getVoucherSerie()) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);

            $sSelect = "select oxvouchernr from oxvouchers where oxvoucherserieid = " . $oDb->quote($oSerie->getId());
            $rs = $oDb->selectLimit($sSelect, $this->iExportPerTick, $iStart);

            if (!$rs->EOF) {
                $iExported = 0;

                // writing header text
                if ($iStart == 0) {
                    $this->write(\OxidEsales\Eshop\Core\Registry::getLang()->translateString("VOUCHERSERIE_MAIN_VOUCHERSTATISTICS", \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage(), true));
                }
            }

            // writing vouchers..
            while (!$rs->EOF) {
                $this->write(current($rs->fields));
                $iExported++;
                $rs->fetchRow();
            }
        }

        return $iExported;
    }
1235954
public function getTaxTotal(): int
    {
        $taxTotal = 0;

        foreach ($this->getAdjustments(AdjustmentInterface::TAX_ADJUSTMENT) as $taxAdjustment) {
            $taxTotal += $taxAdjustment->getAmount();
        }

        foreach ($this->units as $unit) {
            $taxTotal += $unit->getTaxTotal();
        }

        return $taxTotal;
    }
1191778
public function write(string $data): int
    {
        $dataLength    = strlen($data);
        $this->doWrite($data, $this->offset, $dataLength);
        $this->offset += $dataLength;
        return $dataLength;
    }
518437
public function getItemCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Count')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Count');
        }

        return 0;
    }
416300
public function count()
    {
        if(is_null($this->int_count)){
            $this->int_count = mb_strlen($this->value, C::ENCODING);
        }

        return $this->int_count;
    }
118345
private function getStaffId($st)
    {
        $staff_id = $st->find('a', 0)->href;
        $staff_id = explode('/', $staff_id);

        return $staff_id[4];
    }
819604
public function getTaxTotal(): int
    {
        $taxTotal = 0;

        foreach ($this->getAdjustments(AdjustmentInterface::TAX_ADJUSTMENT) as $taxAdjustment) {
            $taxTotal += $taxAdjustment->getAmount();
        }
        foreach ($this->items as $item) {
            $taxTotal += $item->getTaxTotal();
        }

        return $taxTotal;
    }
559745
function objectInitialCount()
    {
        $db = eZDB::instance();

        $languageID = $this->ID;
        $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentobject WHERE initial_language_id = '$languageID'" );
        $count = $count[0]['count'];

        return $count;
    }
483487
public function write(string $data): int
    {
        $length = strlen($data);

        if (0 === $length) {
            return 0;
        }

        $written = @fwrite($this->handle, $data, $length);

        if (false === $written || $written !== $length) {
            $message = 'Could not write to the file.';
            if ($error = error_get_last()) {
                $message .= sprintf(' Errno: %d; %s', $error['type'], $error['message']);
            }
            throw new FileException($message);
        }

        return $written;
    }
274841
public function stream_write(string $data): int
    {
        if (self::READONLY === $this->mode) {
            return 0;
        }

        if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
            return 0;
        }

        if (self::$quota->isLimited()) {
            $data = substr($data, 0, self::$quota->spaceLeft(self::$root->sizeSummarized()));
        }

        return $this->content->write($data);
    }
442998
public static function debug($iVar, $iStr = "", $iFormat = "") {
        
        $preText = $dTrace = "";
        if (!empty($iStr) and strtolower($iStr) == "dtrace") {
            $dTrace = "dtrace";
        }
        if (!empty($iStr) and strtolower($iStr) <> "dtrace") {
            $preText = "[-" . strtoupper($iStr) . "-] ";
        }
        $fstr = "$preText%s";
        if (!empty($iVar)) {
            if (is_array($iVar) or ( is_object($iVar))) {
                $iVar = print_r($iVar, true);
            }
        } else {
            $iVar = ' Var is empty!';
        }
        switch (strtolower($iFormat)) {
            case "pre":
                $fstr = "<pre>$preText%s</pre>";
                break;
            case "p":
            case "br":
                $fstr = "<$iFormat />$preText%s";
                break;
            default:
                $fstr = " $fstr";
        }
        if (!empty($dTrace)) {
            $dTrace = self::backTrace();
        }
        $ret = sprintf($fstr, $iVar) . $dTrace;
        return $ret;
    }
1116010
public function countIssues(): int
    {
        $count = 0;
        foreach ($this->files as $file) {
            $count += count($file->getIssues());
        }
        return $count;
    }
383792
public function tabVals ($strA, $strB, $intTabs = FALSE, $strSeparator = '= ')
	{
		
		// If no tabs
		
		if (!$intTabs)
		{
			
			// Default to class gap
			
			$intTabs	= $this->classGap;
			
		}
		
		// Set char length from tabs
		
		$intGapLength		= $intTabs * 4;
		
		// Work out additional space required
		
		$intGapAdditional	= $intGapLength - strlen ($strA);
		
		// Work out gap in tabs
		
		$intGapTabs			= ceil ($intGapAdditional / 4);
		
		// If the gaps are less than 1
		
		if ($intGapTabs < 1)
		{
			
			// Set to 1
			
			$intGapTabs	= 1;
			
		}
		
		// Return string
		
		return $strA . str_repeat ("\t", $intGapTabs) . $strSeparator . $strB;
		
	}
499257
public function getBasketDiscounts($oBasket, $oUser = null)
    {
        $aList = [];
        $aDiscList = $this->_getList($oUser)->getArray();
        /** @var \OxidEsales\Eshop\Application\Model\Discount $oDiscount */
        foreach ($aDiscList as $oDiscount) {
            if ($oDiscount->isForBasket($oBasket)) {
                $aList[$oDiscount->getId()] = $oDiscount;
            }
        }

        return $aList;
    }
912582
public function setOptInEmailStatus($iStatus)
    {
        $this->oxnewssubscribed__oxemailfailed = new \OxidEsales\Eshop\Core\Field($iStatus, \OxidEsales\Eshop\Core\Field::T_RAW);
        $this->save();
    }
80196
public function getArtCount()
    {
        $iCnt = 0;
        $sSelect = $this->_getArticleSelect();
        if ($sSelect) {
            $iCnt = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($sSelect);
        }

        return $iCnt;
    }
526022
public function getRatingCount($sObjectId, $sType, $aIncludedObjectsIds = null)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $sQuerySnipet = " AND `oxobjectid` = " . $oDb->quote($sObjectId);
        if (is_array($aIncludedObjectsIds) && count($aIncludedObjectsIds) > 0) {
            $sQuerySnipet = " AND ( `oxobjectid` = " . $oDb->quote($sObjectId) . " OR `oxobjectid` in ('" . implode("', '", $aIncludedObjectsIds) . "') )";
        }

        $sSelect = "
            SELECT
                COUNT(*)
            FROM `oxreviews`
            WHERE `oxrating` > 0
                AND `oxtype` = " . $oDb->quote($sType)
                   . $sQuerySnipet . "
            LIMIT 1";

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        $masterDb = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
        $iCount = $masterDb->getOne($sSelect);

        return $iCount;
    }