src/FlexiPeeHP/SkladovyPohybPolozka.php
public function addSerialNumber($number, $isMain = false)
    {
        $numberBranch['kod'] = $number;
        $crrentSerialNumbers = $this->getDataValue('vyrobniCislaPrijata');
        if ($isMain) {
            if (!empty($crrentSerialNumbers)) {
                foreach (array_keys($crrentSerialNumbers) as $serialNumberID) {
                    unset($this->data['vyrobniCislaPrijata'][$serialNumberID]['vyrobnicislohlav']);
                }
            }
            $numberBranch['vyrobnicislohlav'] = 1;
        }
        $this->setDataValue('mnozMj', count($crrentSerialNumbers) + 1);
        return $this->addArrayToBranch($numberBranch, 'vyrobniCislaPrijata');
    }
public function addSerialNumber($number, $isMain = false)
    {
        $numberBranch['kod'] = $number;
        $crrentSerialNumbers = $this->getDataValue('vyrobniCislaPrijata');
        if ($isMain) {
            if (!empty($crrentSerialNumbers)) {
                foreach (array_keys($crrentSerialNumbers) as $serialNumberID) {
                    unset($this->data['vyrobniCislaPrijata'][$serialNumberID]['vyrobnicislohlav']);
                }
            }
            $numberBranch['vyrobnicislohlav'] = 1;
        }
        $this->setDataValue('mnozMj', count($crrentSerialNumbers) + 1);
        return $this->addArrayToBranch($numberBranch, 'vyrobniCislaPrijata');
    }
public function addSerialNumber ( $ number , $ isMain = false ) { $ numberBranch [ 'kod' ] = $ number ; $ crrentSerialNumbers = $ this -> getDataValue ( 'vyrobniCislaPrijata' ) ; if ( $ isMain ) { if ( ! empty ( $ crrentSerialNumbers ) ) { foreach ( array_keys ( $ crrentSerialNumbers ) as $ serialNumberID ) { unset ( $ this -> data [ 'vyrobniCislaPrijata' ] [ $ serialNumberID ] [ 'vyrobnicislohlav' ] ) ; } } $ numberBranch [ 'vyrobnicislohlav' ] = 1 ; } $ this -> setDataValue ( 'mnozMj' , count ( $ crrentSerialNumbers ) + 1 ) ; return $ this -> addArrayToBranch ( $ numberBranch , 'vyrobniCislaPrijata' ) ; }
Add Items Serial Number

@param string  $number serial number
@param boolean $isMain main number

@return boolean Success
Add Items Serial Number