Skip to main content

Posts

Showing posts from August, 2019

Department Wise

static void DeptWiseEmployeeList() {     HcmWorker               hcmWorker;     Name                    deptName;     while select * from hcmWorker     {         deptName="CIVIL";        // info(strFmt("%1",hcmWorker.primaryDepartmentName()));         if(dEPTnaME==hcmWorker.primaryDepartmentName())         {             info(strFmt("%1",hcmWorker.PersonnelNumber));         }     } }

County Full Name

static void CountryFullName(Args _args) {  name  country,fullname;     HcmWorker hcmworker;     HcmPersonPrivateDetails         hcmPersonPrivateDetails;     Logisticsaddresscountryregiontranslation  logisticsaddresscountryregiontranslation;     Logisticsaddresscountryregion               logisticsaddresscountryregion;    country=hcmPersonPrivateDetails::findDetailsByPersonnelNumber("000002").CitizenshipCountryRegion;     select logisticsaddresscountryregion where  logisticsaddresscountryregion.CountryRegionId==country;     fullname=logisticsaddresscountryregion.displayName();     info(fullname); }

Check the Employee having Leave or Not..

static void checkIfEmployeeHasLeave(Args _args) {     Date periodStartDate;     Date PeriodEndDate;     PersonnelNumber employeeId;     str60 payComponentId;     LevpayLeaveSettlementTable levpayLeaveSettlementTable;     LevpayLeaveSettlementCalculationDetails levpayLeaveSettlementCalculationDetails;     Levpaypayrollperiod levpaypayrollperiod;     periodStartDate = 24\11\2014;     periodEndDate = 15\3\2017;     employeeId = "LBR-0045";     select levpayLeaveSettlementTable         where levpayLeaveSettlementTable.EmployeeId == employeeId             && levpayLeaveSettlementTable.WorkFlowStatus == LevpayWorkFlowStatus::Approved;     if (levpayLeaveSettlementTable)      //info(strFmt("Till here"));     {   //info(strFmt("Till here2"));     while s...