function importData() { $pps_obj = $this->getPayPeriodScheduleObject(); if (is_object($pps_obj)) { //Get all users assigned to this pp schedule $udlf = new UserDateListFactory(); $udlf->getByUserIdAndStartDateAndEndDateAndEmptyPayPeriod($pps_obj->getUser(), $this->getStartDate(), $this->getEndDate()); Debug::text(' Pay Period ID: ' . $this->getId() . ' Pay Period orphaned User Date Rows: ' . $udlf->getRecordCount() . ' Start Date: ' . TTDate::getDate('DATE+TIME', $this->getStartDate()) . ' End Date: ' . TTDate::getDate('DATE+TIME', $this->getEndDate()), __FILE__, __LINE__, __METHOD__, 10); if ($udlf->getRecordCount() > 0) { $udlf->StartTransaction(); foreach ($udlf as $ud_obj) { $ud_obj->setPayPeriod($this->getId()); if ($ud_obj->isValid()) { $ud_obj->Save(); } } $ud_obj->CommitTransaction(); } return TRUE; } return FALSE; }