function forNewLeaveDaysRemain($livUserCode, $livUserLeaveType)
 {
     $objDbOperation = new DbOperation();
     $this->check = 0;
     $columnsName = "lTotalLeaveDaysRemain";
     //database column name
     $tablesName = "employeeleaveapplicationdetails";
     //database table name
     $conditions = "WHERE lEmployeeCodeNumberWhoApply = '" . $livUserCode . "' AND lLeaveId = " . $livUserLeaveType . " AND lIsApproved = 1 ORDER BY lId DESC LIMIT 1";
     // conditions, what we want to apply
     $result = $objDbOperation->dbJoinSingleSelect($columnsName, $tablesName, $conditions);
     //var_dump($result);
     return $result;
 }
 function getAllleaveHistory()
 {
     $objDbOperation = new DbOperation();
     $this->check = 0;
     $columnsName = "lLeaveFromDate,lLeaveToDate,lTotalLeaveDays";
     //database column name
     $tablesName = "employeeleaveapplicationdetails";
     //database table name
     $conditions = "WHERE lEmployeeCodeNumberWhoApply = '" . $_SESSION['officeUserName'] . "' AND lIsApproved = 1";
     $result = $objDbOperation->dbJoinSingleSelect($columnsName, $tablesName, $conditions);
     return $result;
 }
 function empLastApplicationInfo($empId)
 {
     $objDbOperation = new DbOperation();
     $this->check = 0;
     $columnsName = "emp.eFirstName,emp.eLastName,dpt.dptName,desi.desiDesignationName,ld.lType,eld.lEmployeeCodeNumberWhoApply,eld.lApplyDate,eld.lLeaveId,eld.lEmployeeImargencyAddress,eld.lAlternativeEmployeeCardNumber,eld.lTotalLeaveDays,eld.lLeaveFromDate,eld.lLeaveToDate,\teld.lLeaveReason, emp.ePhoneNumberPersonal, emp.ePhoneNumberOffice";
     //database column name
     $tablesName = "employeeleaveapplicationdetails eld INNER JOIN employeeinfo emp ON eld.lEmployeeCodeNumberWhoApply = emp.eEmployeeCodeNumber INNER JOIN employeedepartment dpt ON dpt.dptId = emp.eDptId INNER JOIN employeedesignation desi ON desi.desiId = emp.eDesignationId INNER JOIN leavedetails ld ON ld.lId = eld.lLeaveId ";
     //database table name
     $conditions = " WHERE eld.lId = " . $empId;
     // conditions, what we want to apply
     $result = $objDbOperation->dbJoinSingleSelect($columnsName, $tablesName, $conditions);
     return $result;
 }