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 select periodNumber from levpaypayrollperiod
where levpayPayrollPeriod.PeriodStartDate >= periodStartdate
&& levpayPayrollPeriod.PeriodStartDate <= periodEnddate
{
//info(strFmt("Till here3"));
payComponentId = LevpayPayComponents::findByShortName("BS",true).PayComponentId;
//
//select levpayLeaveSettlementCalculationDetails
//where levpayLeaveSettlementCalculationDetails.paycomponentId == payComponentId
//&& levpayLeaveSettlementCalculationDetails.PersonnelNumber == employeeId
//&& levpayLeaveSettlementCalculationDetails.PayPeriodID == levpaypayrollperiod.periodNumber;
levpayLeaveSettlementCalculationDetails = levpayLeaveSettlementCalculationDetails::findByPayCompandPersonnelandPeriodId(payComponentId,employeeID,levpaypayrollperiod.periodNumber,true);
info(strFmt("%1****",levpayLeaveSettlementCalculationDetails.paycomponentamount));
}
}
}
{
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 select periodNumber from levpaypayrollperiod
where levpayPayrollPeriod.PeriodStartDate >= periodStartdate
&& levpayPayrollPeriod.PeriodStartDate <= periodEnddate
{
//info(strFmt("Till here3"));
payComponentId = LevpayPayComponents::findByShortName("BS",true).PayComponentId;
//
//select levpayLeaveSettlementCalculationDetails
//where levpayLeaveSettlementCalculationDetails.paycomponentId == payComponentId
//&& levpayLeaveSettlementCalculationDetails.PersonnelNumber == employeeId
//&& levpayLeaveSettlementCalculationDetails.PayPeriodID == levpaypayrollperiod.periodNumber;
levpayLeaveSettlementCalculationDetails = levpayLeaveSettlementCalculationDetails::findByPayCompandPersonnelandPeriodId(payComponentId,employeeID,levpaypayrollperiod.periodNumber,true);
info(strFmt("%1****",levpayLeaveSettlementCalculationDetails.paycomponentamount));
}
}
}
Comments
Post a Comment