1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51:
<?php
namespace FlexiPeeHP;
class SkladovyPohybPolozka extends FlexiBeeRW
{
use Stitky;
public $evidence = 'skladovy-pohyb-polozka';
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');
}
}