Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function addSerialNumber($number, $isMain = false) |
||
36 | { |
||
37 | $numberBranch['kod'] = $number; |
||
|
|||
38 | $crrentSerialNumbers = $this->getDataValue('vyrobniCislaPrijata'); |
||
39 | if ($isMain) { |
||
40 | if (!empty($crrentSerialNumbers)) { |
||
41 | foreach (array_keys($crrentSerialNumbers) as $serialNumberID) { |
||
42 | unset($this->data['vyrobniCislaPrijata'][$serialNumberID]['vyrobnicislohlav']); |
||
43 | } |
||
44 | } |
||
45 | $numberBranch['vyrobnicislohlav'] = 1; |
||
46 | } |
||
47 | $this->setDataValue('mnozMj', count($crrentSerialNumbers) + 1); |
||
48 | return $this->addArrayToBranch($numberBranch, 'vyrobniCislaPrijata'); |
||
49 | } |
||
51 |