Job to Get to get the hours worked by location of an employee
static void HoursWorkedByLocation(Args _args)
{
HcmEmployment hcmEmployment;
HcmWorker hcmWorker;
HcmWorkerTitle hcmWorkerTitle;
DirPartyPostalAddressView officeLocationPostalAddressView;
CompanyInfo companyInfo;
while select count(RecId) from hcmWorker
//where hcmWorker.RecId == 22565421283
join hcmEmployment //group by LegalEntity
where hcmEmployment.Worker == hcmWorker.RecId
join hcmWorkerTitle
where hcmWorkerTitle.Worker == hcmEmployment.Worker
&& hcmWorkerTitle.Worker == hcmWorker.RecId
join officeLocationPostalAddressView //group by City
where officeLocationPostalAddressView.Party == hcmWorker.Person
join companyInfo //group by DataArea
where companyInfo.RecId == hcmEmployment.LegalEntity
//&& companyInfo.DataArea == "USMF"
{
info(strFmt("Legal entity : %1, Office Location : %2 %3 ", CompanyInfo.DataArea,officeLocationPostalAddressView.City, hcmWorker.RecId));
}
}
No comments:
Post a Comment