public function convertItems($keepId = false, $addExtId = true,
                                 $keepCode = false, $handleAccounting = false)
    {
        if ($keepCode === false) {
            unset($this->rules['kod']);
        }
        if ($keepId === false) {
            unset($this->rules['id']);
        }
        foreach (self::removeRoColumns($this->rules, $this->output) as $columnToTake => $subitemColumns) {
            if (is_array($subitemColumns)) {
                if (!empty($this->input->getSubItems())) {
                    $this->convertSubitems($columnToTake, $keepId, $keepCode,$handleAccounting);
                }
            } else {
                $this->output->setDataValue($columnToTake,
                    $this->input->getDataValue($columnToTake));
            }
        }
        if ($addExtId) {
            $this->output->setDataValue('id',
                'ext:src:'.$this->input->getEvidence().':'.$this->input->getMyKey());
        }
    }
public function convertItems($keepId = false, $addExtId = true,
                                 $keepCode = false, $handleAccounting = false)
    {
        if ($keepCode === false) {
            unset($this->rules['kod']);
        }
        if ($keepId === false) {
            unset($this->rules['id']);
        }
        foreach (self::removeRoColumns($this->rules, $this->output) as $columnToTake => $subitemColumns) {
            if (is_array($subitemColumns)) {
                if (!empty($this->input->getSubItems())) {
                    $this->convertSubitems($columnToTake, $keepId, $keepCode,$handleAccounting);
                }
            } else {
                $this->output->setDataValue($columnToTake,
                    $this->input->getDataValue($columnToTake));
            }
        }
        if ($addExtId) {
            $this->output->setDataValue('id',
                'ext:src:'.$this->input->getEvidence().':'.$this->input->getMyKey());
        }
    }
public function convertItems ( $ keepId = false , $ addExtId = true , $ keepCode = false , $ handleAccounting = false ) { if ( $ keepCode === false ) { unset ( $ this -> rules [ 'kod' ] ) ; } if ( $ keepId === false ) { unset ( $ this -> rules [ 'id' ] ) ; } foreach ( self :: removeRoColumns ( $ this -> rules , $ this -> output ) as $ columnToTake => $ subitemColumns ) { if ( is_array ( $ subitemColumns ) ) { if ( ! empty ( $ this -> input -> getSubItems ( ) ) ) { $ this -> convertSubitems ( $ columnToTake , $ keepId , $ keepCode , $ handleAccounting ) ; } } else { $ this -> output -> setDataValue ( $ columnToTake , $ this -> input -> getDataValue ( $ columnToTake ) ) ; } } if ( $ addExtId ) { $ this -> output -> setDataValue ( 'id' , 'ext:src:' . $ this -> input -> getEvidence ( ) . ':' . $ this -> input -> getMyKey ( ) ) ; } }
Convert document items

@param boolean $keepId           Keep original document ID
@param boolean $addExtId         Add ExtID pointer to original document
@param boolean $keepCode         Keep original document Code
@param boolean $handleAccounting set item's "ucetni" like target
Convert document items