From 737b392d0a19672ef193132d08fc9a2ac60dcf37 Mon Sep 17 00:00:00 2001 From: gamonoid Date: Mon, 4 Sep 2017 05:50:37 +0200 Subject: [PATCH] Fix for mysql 5.7 strict date issue --- admin/dashboard/index.php | 44 +- api/Base.js | 481 +++++++++--------- include.common.php | 14 +- src/Employees/Common/Model/Employee.php | 2 +- .../Admin/Reports/ActiveEmployeeReport.php | 16 +- 5 files changed, 277 insertions(+), 280 deletions(-) diff --git a/admin/dashboard/index.php b/admin/dashboard/index.php index 3addd491..5f520875 100644 --- a/admin/dashboard/index.php +++ b/admin/dashboard/index.php @@ -26,19 +26,24 @@ define('MODULE_PATH',dirname(__FILE__)); include APP_BASE_PATH.'header.php'; include APP_BASE_PATH.'modulejslibs.inc.php'; -$billingActionManager = new \Billing\Admin\Api\BillingActionManager(); - -$invoices = $billingActionManager->getInvoices(null)->getData(); -if(!empty($invoices)){ - $invoices = json_decode(json_encode($invoices)); -} +$invoices = []; $numOfUnpaidInvoices = 0; -foreach($invoices as $inv){ - if($inv->status == "Sent"){ - $numOfUnpaidInvoices++; +if (class_exists('\\Billing\\Admin\\Api\\BillingActionManager')) { + $billingActionManager = new \Billing\Admin\Api\BillingActionManager(); + + $invoices = $billingActionManager->getInvoices(null)->getData(); + if(!empty($invoices)){ + $invoices = json_decode(json_encode($invoices)); + } + + foreach($invoices as $inv){ + if($inv->status == "Sent"){ + $numOfUnpaidInvoices++; + } } } + ?>
@@ -116,26 +121,5 @@ modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard'); var modJs = modJsList['tabDashboard']; -/* -$("#employeeLink").attr("href",modJs.getCustomUrl('?g=admin&n=employees&m=admin_Admin')); -$("#companyLink").attr("href",modJs.getCustomUrl('?g=admin&n=company_structure&m=admin_Admin')); -$("#usersLink").attr("href",modJs.getCustomUrl('?g=admin&n=users&m=admin_System')); -$("#projectsLink").attr("href",modJs.getCustomUrl('?g=admin&n=projects&m=admin_Admin')); -$("#attendanceLink").attr("href",modJs.getCustomUrl('?g=admin&n=attendance&m=admin_Admin')); -$("#leaveLink").attr("href",modJs.getCustomUrl('?g=admin&n=leaves&m=admin_Admin')); -$("#reportsLink").attr("href",modJs.getCustomUrl('?g=admin&n=reports&m=admin_Reports')); -$("#settingsLink").attr("href",modJs.getCustomUrl('?g=admin&n=settings&m=admin_System')); -$("#jobsLink").attr("href",modJs.getCustomUrl('?g=admin&n=jobpositions&m=admin_Recruitment')); -$("#candidatesLink").attr("href",modJs.getCustomUrl('?g=admin&n=candidates&m=admin_Recruitment')); -$("#trainingLink").attr("href",modJs.getCustomUrl('?g=admin&n=training&m=admin_Admin')); -$("#travelLink").attr("href",modJs.getCustomUrl('?g=admin&n=travel&m=admin_Employees')); -$("#documentLink").attr("href",modJs.getCustomUrl('?g=admin&n=documents&m=admin_Employees')); -$("#expenseLink").attr("href",modJs.getCustomUrl('?g=admin&n=expenses&m=admin_Employees')); -$("#permissionLink").attr("href",modJs.getCustomUrl('?g=admin&n=permissions&m=admin_System')); -$("#upgradeLink").attr("href",modJs.getCustomUrl('?g=admin&n=billing&m=admin_System')); - -modJs.getInitData(); -*/ - diff --git a/api/Base.js b/api/Base.js index cb8819f3..758a32ff 100644 --- a/api/Base.js +++ b/api/Base.js @@ -16,7 +16,7 @@ along with Ice Framework. If not, see . ------------------------------------------------------------------ -Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] +Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd] Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah) */ @@ -62,7 +62,7 @@ this.permissions = {}; this.baseUrl = null; IceHRMBase.method('init' , function(appName, currentView, dataUrl, permissions) { - + }); /** @@ -196,10 +196,10 @@ IceHRMBase.method('trackEvent' , function(action, label, value) { this.ga.push(['_trackEvent', this.instanceId, action, label, value]); } }catch(e){ - + } - - + + }); @@ -244,7 +244,7 @@ IceHRMBase.method('initFieldMasterData' , function(callback, loadAllCallback, lo this.sourceMapping = {}; var fields = this.getFormFields(); var filterFields = this.getFilters(); - + if(filterFields != null){ for(var j=0;j'; } - + if(this.getFilters() != null){ if(html != ""){ html += "  "; @@ -553,21 +553,21 @@ IceHRMBase.method('getTableTopButtonHtml', function() { }else{ html+=''; } - + } - + html = html.replace(/__id__/g, this.getTableName()); - + if(this.currentFilterString != "" && this.currentFilterString != null){ html = html.replace(/__filterString__/g, this.currentFilterString); }else{ html = html.replace(/__filterString__/g, 'Reset Filters'); } - + if(html != ""){ html = '
'+html+'
'; } - + return html; }); @@ -594,13 +594,13 @@ IceHRMBase.method('createTable', function(elementId) { var that = this; - + if(this.getRemoteTable()){ this.createTableServer(elementId); return; } - - + + var headers = this.getHeaders(); //add translations @@ -609,18 +609,18 @@ IceHRMBase.method('createTable', function(elementId) { } var data = this.getTableData(); - + if(this.showActionButtons()){ headers.push(this.getActionButtonHeader()); } - - + + if(this.showActionButtons()){ for(var i=0;i
"); } - + $('#'+id+'ModelLabel').html(header); $('#'+id+'ModelBody').html(""); $('#'+id+'ModelBody').append(element); @@ -895,7 +895,7 @@ IceHRMBase.method('deleteRow', function(id) { this.deleteParams['id'] = id; this.renderModel('delete',"Confirm Deletion","Are you sure you want to delete this item ?"); $('#deleteModel').modal('show'); - + }); /** @@ -919,7 +919,7 @@ IceHRMBase.method('showMessage', function(title,message,closeCallback,closeCallb modelId = "#messageModel"; this.renderModel('message',title,message); } - + $(modelId).unbind('hide'); if(closeCallback != null && closeCallback != undefined){ $(modelId).on('hidden.bs.modal',function(){ @@ -942,7 +942,7 @@ IceHRMBase.method('showDomElement', function(title,element,closeCallback,closeCa modelId = "#messageModel"; this.renderModelFromDom('message',title,element); } - + $(modelId).unbind('hide'); if(closeCallback != null && closeCallback != undefined){ $(modelId).on('hidden.bs.modal',function(){ @@ -986,7 +986,7 @@ IceHRMBase.method('closeDataMessage', function() { /** - * Create or edit an element + * Create or edit an element * @method save * @param getFunctionCallBackData {Array} once a success is returned call get() function for this module with these parameters * @param successCallback {Function} this will get called after success response @@ -1003,15 +1003,28 @@ IceHRMBase.method('save', function(callGetFunction, successCallback) { if(id != null && id != undefined && id != ""){ $(params).attr('id',id); } + params = this.makeEmptyDateFieldsNull(params); this.add(params,[],callGetFunction, successCallback); }else{ $("#"+this.getTableName()+'Form .label').html(msg); $("#"+this.getTableName()+'Form .label').show(); } - + } }); + +IceHRMBase.method('makeEmptyDateFieldsNull', function(params) { + var fields = this.getFormFields(); + fields.forEach(function(field) { + if((field[1].type == 'date' || field[1].type == 'datetime') + && (params[field[0]] === '' || params[field[0]] === '0000-00-00' || params[field[0]] === '0000-00-00 00:00:00')){ + delete params[field[0]]; + } + }); + return params; +}); + /** * Override this method to inject attitional parameters or modify existing parameters retrived from add/edit form before sending to the server * @method forceInjectValuesBeforeSave @@ -1038,7 +1051,7 @@ IceHRMBase.method('forceInjectValuesBeforeSave', function(params) { } } }catch(e){ - + } return null; }); @@ -1048,12 +1061,12 @@ IceHRMBase.method('doCustomValidation', function(params) { }); IceHRMBase.method('filterQuery', function() { - + var validator = new FormValidation(this.getTableName()+"_filter",true,{'ShowPopup':false,"LabelErrorClass":"error"}); if(validator.checkValues()){ var params = validator.getFormParameters(); if(this.doCustomFilterValidation(params)){ - + //remove null params for (var prop in params) { if(params.hasOwnProperty(prop)){ @@ -1062,16 +1075,16 @@ IceHRMBase.method('filterQuery', function() { } } } - + this.setFilter(params); this.filtersAlreadySet = true; $("#"+this.getTableName()+"_resetFilters").show(); this.currentFilterString = this.getFilterString(params); - + this.get([]); this.closePlainMessage(); } - + } }); @@ -1080,22 +1093,22 @@ IceHRMBase.method('getFilterString', function(filters) { var str = ''; var rmf, source, values, select2MVal, value, valueOrig; - + var filterFields = this.getFilters(); - - + + if(values == null){ values = []; } - + for (var prop in filters) { if(filters.hasOwnProperty(prop)){ values = this.getMetaFieldValues(prop,filterFields); value = ""; valueOrig = null; - + if((values['type'] == 'select' || values['type'] == 'select2')){ - + if(values['remote-source']!= undefined && values['remote-source']!= null){ rmf = values['remote-source']; if(filters[prop] == "NULL"){ @@ -1108,8 +1121,8 @@ IceHRMBase.method('getFilterString', function(filters) { value = this.fieldMasterData[rmf[0]+"_"+rmf[1]+"_"+rmf[2]][filters[prop]]; valueOrig = value; } - - + + }else{ source = values['source'][0]; if(filters[prop] == "NULL"){ @@ -1127,41 +1140,41 @@ IceHRMBase.method('getFilterString', function(filters) { } } } - - + + } - + }else if (values['type'] == 'select2multi'){ select2MVal = []; try{ select2MVal = JSON.parse(filters[prop]); - + }catch(e){ - + } - + value = select2MVal.join(","); if(value != ""){ valueOrig = value; } - + }else{ value = filters[prop]; if(value != ""){ valueOrig = value; } } - + if(valueOrig != null){ if(str != ''){ str += " | "; } - + str += values['label']+" = "+value; } } } - + return str; }); @@ -1196,7 +1209,7 @@ IceHRMBase.method('showFilters', function(object) { var formHtml = this.templates['filterTemplate']; var html = ""; var fields = this.getFilters(); - + for(var i=0;i
'); $tempDomObj.attr('id',randomFormId); - + $tempDomObj.html(formHtml); - - + + $tempDomObj.find('.datefield').datepicker({'viewMode':2}); $tempDomObj.find('.timefield').datetimepicker({ language: 'en', @@ -1230,7 +1243,7 @@ IceHRMBase.method('showFilters', function(object) { $tempDomObj.find('.datetimefield').datetimepicker({ language: 'en' }); - + $tempDomObj.find('.colorpick').colorpicker(); tinymce.init({ selector: '#'+$tempDomObj.attr('id')+' .tinymce', @@ -1242,12 +1255,12 @@ IceHRMBase.method('showFilters', function(object) { $(this).data('simplemde', simplemde); //simplemde.value($(this).val()); }); - + //$tempDomObj.find('.select2Field').select2(); $tempDomObj.find('.select2Field').each(function() { $(this).select2().select2('val', $(this).find("option:eq(0)").val()); }); - + $tempDomObj.find('.select2Multi').each(function() { $(this).select2().on("change",function(e){ var parentRow = $(this).parents(".row"); @@ -1270,23 +1283,23 @@ IceHRMBase.method('showFilters', function(object) { e.stopPropagation(); try{ modJs.filterQuery(); - + }catch(e){ }; return false; }); - + if(this.filter != undefined && this.filter != null){ this.fillForm(this.filter,"#"+this.getTableName()+"_filter", this.getFilters()); } - + }); /** * Override this method in your module class to make changes to data fo the form before showing the form * @method preRenderForm - * @param object {Array} keys value list for populating form + * @param object {Array} keys value list for populating form */ IceHRMBase.method('preRenderForm', function(object) { @@ -1296,23 +1309,23 @@ IceHRMBase.method('preRenderForm', function(object) { /** * Create the form * @method renderForm - * @param object {Array} keys value list for populating form + * @param object {Array} keys value list for populating form */ IceHRMBase.method('renderForm', function(object) { - + var that = this; var signatureIds = []; if(object == null || object == undefined){ this.currentId = null; } - + this.preRenderForm(object); - + var formHtml = this.templates['formTemplate']; var html = ""; var fields = this.getFormFields(); - + for(var i=0;i'); $tempDomObj.attr('id',randomFormId); - + } - + $tempDomObj.html(formHtml); - - + + $tempDomObj.find('.datefield').datepicker({'viewMode':2}); $tempDomObj.find('.timefield').datetimepicker({ language: 'en', @@ -1352,7 +1365,7 @@ IceHRMBase.method('renderForm', function(object) { $tempDomObj.find('.datetimefield').datetimepicker({ language: 'en' }); - + $tempDomObj.find('.colorpick').colorpicker(); tinymce.init({ @@ -1365,20 +1378,20 @@ IceHRMBase.method('renderForm', function(object) { $(this).data('simplemde', simplemde); //simplemde.value($(this).val()); }); - + //$tempDomObj.find('.select2Field').select2(); $tempDomObj.find('.select2Field').each(function() { $(this).select2().select2('val', $(this).find("option:eq(0)").val()); - + }); - + $tempDomObj.find('.select2Multi').each(function() { $(this).select2().on("change",function(e){ var parentRow = $(this).parents(".row"); var height = parentRow.find(".select2-choices").height(); parentRow.height(parseInt(height)); }); - + }); @@ -1386,13 +1399,13 @@ IceHRMBase.method('renderForm', function(object) { //$(this).data('signaturePad',new SignaturePad($(this))); signatureIds.push($(this).attr('id')); }); - + for(var i=0;i').parent().html(); //this.showMessage("Edit",tHtml,null,null,true); this.showMessage("Edit","",null,null,true); - + $("#plainMessageModel .modal-body").html(""); $("#plainMessageModel .modal-body").append($tempDomObj); @@ -1457,17 +1470,17 @@ IceHRMBase.method('renderForm', function(object) { new SignaturePad(document.getElementById(signatureIds[i]))); } - + if(object != undefined && object != null){ this.fillForm(object,"#"+randomFormId); } } - + this.postRenderForm(object,$tempDomObj); - + }); @@ -1485,7 +1498,7 @@ IceHRMBase.method('retriveItemsAfterSave', function() { if(object == null || object == undefined){ $tempDomObj.find("#changePasswordBtn").remove(); } - }); + }); */ IceHRMBase.method('postRenderForm', function(object, $tempDomObj) { @@ -1496,39 +1509,39 @@ IceHRMBase.method('postRenderForm', function(object, $tempDomObj) { * Convert data group field to HTML * @method dataGroupToHtml * @param val {String} value in the field - * @param field {Array} field meta data + * @param field {Array} field meta data */ IceHRMBase.method('dataGroupToHtml', function(val, field) { var data = JSON.parse(val), deleteButton, t, sortFunction, item,key = null, i, html, template, itemHtml, itemVal; - + deleteButton = '
  • '; editButton = '
  • '; - + template = field[1]['html']; - + if(data != null && data != undefined && field[1]['sort-function'] != undefined && field[1]['sort-function'] != null){ data.sort(field[1]['sort-function']); } - - + + html = $('
    '); - - - + + + for(i=0;i'); $tempDomObj.attr('id',randomFormId); - + $tempDomObj.html(formHtml); - - + + $tempDomObj.find('.datefield').datepicker({'viewMode':2}); $tempDomObj.find('.timefield').datetimepicker({ language: 'en', @@ -1595,7 +1608,7 @@ IceHRMBase.method('showDataGroup', function(field, object) { $tempDomObj.find('.datetimefield').datetimepicker({ language: 'en' }); - + $tempDomObj.find('.colorpick').colorpicker(); tinymce.init({ @@ -1608,12 +1621,12 @@ IceHRMBase.method('showDataGroup', function(field, object) { $(this).data('simplemde', simplemde); //simplemde.value($(this).val()); }); - + $tempDomObj.find('.select2Field').each(function() { $(this).select2().select2('val', $(this).find("option:eq(0)").val()); }); - + $tempDomObj.find('.select2Multi').each(function() { $(this).select2().on("change",function(e){ var parentRow = $(this).parents(".row"); @@ -1627,15 +1640,15 @@ IceHRMBase.method('showDataGroup', function(field, object) { $(this).data('signaturePad',new SignaturePad($(this))); }); */ - + this.currentDataGroupField = field; this.showDomElement("Add "+field[1]['label'],$tempDomObj,null,null,true); - + if(object != undefined && object != null){ this.fillForm(object,"#"+this.getTableName()+"_field_"+field[0], field[1]['form']); } - - + + $(".groupAddBtn").off(); if(object != undefined && object != null && object.id != undefined){ $(".groupAddBtn").on('click',function(e) { @@ -1643,7 +1656,7 @@ IceHRMBase.method('showDataGroup', function(field, object) { e.stopPropagation(); try{ modJs.editDataGroup(); - + }catch(e){ }; return false; @@ -1654,14 +1667,14 @@ IceHRMBase.method('showDataGroup', function(field, object) { e.stopPropagation(); try{ modJs.addDataGroup(); - + }catch(e){ }; return false; }); } - - + + }); IceHRMBase.method('addDataGroup', function() { @@ -1681,25 +1694,25 @@ IceHRMBase.method('addDataGroup', function() { return false; } } - + var val = $("#"+field[0]).val(); if(val == ""){ val = "[]"; } var data = JSON.parse(val); - + params['id'] = field[0]+"_"+this.dataGroupGetNextAutoIncrementId(data); data.push(params); - + if(field[1]['sort-function'] != undefined && field[1]['sort-function'] != null){ data.sort(field[1]['sort-function']); } - + val = JSON.stringify(data); var html = this.dataGroupToHtml(val,field); - + $("#"+field[0]+"_div").html(""); $("#"+field[0]+"_div").append(html); @@ -1814,13 +1827,13 @@ IceHRMBase.method('editDataGroup', function() { if(this.doCustomFilterValidation(params)){ - + var val = $("#"+field[0]).val(); if(val == ""){ val = "[]"; } var data = JSON.parse(val); - + var editVal = {}; var editValIndex = -1; var newVals = []; @@ -1832,19 +1845,19 @@ IceHRMBase.method('editDataGroup', function() { } newVals.push(item); } - - - + + + params['id'] = editVal.id; newVals[editValIndex] = params; - + if(field[1]['sort-function'] != undefined && field[1]['sort-function'] != null){ newVals.sort(field[1]['sort-function']); } - + val = JSON.stringify(newVals); $("#"+field[0]).val(val); - + var html = this.dataGroupToHtml(val,field); this.orderDataGroup(field); @@ -1860,28 +1873,28 @@ IceHRMBase.method('editDataGroup', function() { this.showMessage("Item Edited","This change will be effective only when you save the form"); } - + } }); IceHRMBase.method('editDataGroupItem', function(id) { var fieldId = id.substring(0,id.lastIndexOf("_")); - + var val = $("#"+fieldId).val(); var data = JSON.parse(val); - + var editVal = {}; - + for(var i=0;i 0) { fileExtension = fileElement.value.substring(fileElement.value.lastIndexOf(".") + 1, fileElement.value.length); } - + fileExtension = fileExtension.toLowerCase(); - + var allowed = fileTypes.split(","); - + if (allowed.indexOf(fileExtension) < 0) { fileElement.value = ""; this.showMessage("File Type Error",'Selected file type is not supported'); this.clearFileElement(elementName); return false; } - + return true; - + }); IceHRMBase.method('clearFileElement', function (elementName) { @@ -2463,15 +2476,15 @@ IceHRMBase.method('getClientDate', function (date) { }); IceHRMBase.method('getClientGMTOffset', function () { - + var rightNow = new Date(); var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0); var temp = jan1.toGMTString(); var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1)); var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60); - + return std_time_offset; - + }); /** diff --git a/include.common.php b/include.common.php index af0a1a30..df61b791 100644 --- a/include.common.php +++ b/include.common.php @@ -3,10 +3,10 @@ ini_set('display_errors', false); error_reporting(E_ERROR); require dirname(__FILE__).'/lib/composer/vendor/autoload.php'; -$whoops = new \Whoops\Run; -$whoops->pushHandler(new \Whoops\Handler\PlainTextHandler); -$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler()); -$whoops->register(); +//$whoops = new \Whoops\Run; +//$whoops->pushHandler(new \Whoops\Handler\PlainTextHandler); +//$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler()); +//$whoops->register(); function t($text) { @@ -18,9 +18,9 @@ $jsVersion = defined('CACHE_VALUE')?CACHE_VALUE:"v".VERSION; $cssVersion = defined('CACHE_VALUE')?CACHE_VALUE:"v".VERSION; if(!isset($_REQUEST['content']) || $_REQUEST['content'] != 'HTML'){ - $_REQUEST = \Utils\InputCleaner::cleanParameters($_REQUEST); - $_GET = \Utils\InputCleaner::cleanParameters($_GET); - $_POST = \Utils\InputCleaner::cleanParameters($_POST); + $_REQUEST = \Utils\InputCleaner::cleanParameters($_REQUEST); + $_GET = \Utils\InputCleaner::cleanParameters($_GET); + $_POST = \Utils\InputCleaner::cleanParameters($_POST); } date_default_timezone_set('Asia/Colombo'); diff --git a/src/Employees/Common/Model/Employee.php b/src/Employees/Common/Model/Employee.php index 33ca915a..cc56ca02 100644 --- a/src/Employees/Common/Model/Employee.php +++ b/src/Employees/Common/Model/Employee.php @@ -98,7 +98,7 @@ class Employee extends BaseModel continue; } - if (empty($obj->$k) && ($oldObjOrig->$k = '0000-00-00' || empty($oldObjOrig->$k))) { + if (empty($obj->$k) && $oldObjOrig->$k == '0000-00-00') { continue; } diff --git a/src/Reports/Admin/Reports/ActiveEmployeeReport.php b/src/Reports/Admin/Reports/ActiveEmployeeReport.php index c96abec9..7c7456e0 100644 --- a/src/Reports/Admin/Reports/ActiveEmployeeReport.php +++ b/src/Reports/Admin/Reports/ActiveEmployeeReport.php @@ -8,7 +8,7 @@ use Utils\LogManager; class ActiveEmployeeReport extends CSVReportBuilder implements CSVReportBuilderInterface { - + public function getMainQuery() { $query = "Select id, employee_id as 'Employee ID', @@ -41,15 +41,15 @@ confirmation_date as 'Confirmation Date', (SELECT title from CompanyStructures where id = department) as 'Department', (SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`,' [Employee ID:',`employee_id`,']') from Employees e1 where e1.id = e.supervisor) as 'Supervisor', notes as 'Notes' FROM Employees e"; - + return $query; } - + public function getWhereQuery($request) { $query = ""; $params = array(); - + if (empty($request['department']) || $request['department'] == "NULL") { $params = array(); $query = "where ((termination_date is NULL or termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW())"; @@ -57,11 +57,11 @@ FROM Employees e"; $depts = $this->getChildCompanyStuctures($request['department']); $query = "where department in (".implode(",", $depts).") and (((termination_date is NULL or termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW()))"; } - - + + return array($query, $params); } - + public function getChildCompanyStuctures($companyStructId) { $childIds = array(); @@ -86,7 +86,7 @@ FROM Employees e"; $nodeIdsAtLastLevel[] = $item->id; } } while (count($list) > 0 && $count < 10); - + return $childIds; } }