public function addEmployeePhoto($employeeId, $index, $base64Data)
    {
        $result = false;

        $indexes   = [1, 2];
        $freeIndex = 0;

        if ($index === null) {
            foreach ($indexes as $index) {
                if (($photoInfo = $this->getEmployeePhoto($employeeId, $index)) !== false
                    && (!isset($photoInfo->GetAcsEmployeePhotoResult) || $photoInfo->GetAcsEmployeePhotoResult
                        == null)
                ) {
                    $freeIndex = $index;
                    break;
                }
            }
        } else {
            $freeIndex = $index;
        }
        if ($freeIndex > 0) {
            $this->addHeader();
            try {
                $result = $this->getSoap()->SetAcsEmployeePhoto([
                    'employeeId' => $employeeId,
                    'photoNumber' => $freeIndex,
                    'data' => $base64Data
                ]);
            } catch (\SoapFault $ex) {
                $result = false;
                $this->logError();
            }
        }
        return $result;
    }