function getArrayByUserIdAndStartDateAndEndDate($user_id, $start_date = FALSE, $end_date = FALSE)
 {
     $uwlf = new UserWageListFactory();
     $uwlf->getByUserIdAndStartDateAndEndDate($user_id, $start_date, $end_date);
     foreach ($uwlf as $uw_obj) {
         $list[$uw_obj->getEffectiveDate()] = array('wage' => $uw_obj->getWage(), 'type_id' => $uw_obj->getType(), 'hourly_rate' => $uw_obj->getHourlyRate(), 'effective_date' => $uw_obj->getEffectiveDate());
     }
     if (isset($list)) {
         return $list;
     }
     return FALSE;
 }
예제 #2
0
 if ($user_id === FALSE) {
     echo " \t\t\tFailed!\n";
     $commit_trans = FALSE;
     $e++;
 } else {
     echo " \t\t\tSuccess!\n";
     if (isset($mapped_row['wage_type_id']) and $mapped_row['wage_type_id'] != '' and isset($mapped_row['wage']) and $mapped_row['wage'] != '') {
         echo "    Importing User Wage Information...";
         //Import Salary information
         if (isset($mapped_row['wage_effective_date'])) {
             $wage_effective_date = Misc::importCallInputParseFunction('wage_effective_date', $mapped_row['wage_effective_date'], $filtered_import_map['wage_effective_date']['default_value'], $filtered_import_map['wage_effective_date']['parse_hint']);
         } else {
             $wage_effective_date = $uf->getHireDate();
         }
         $uwlf = new UserWageListFactory();
         $uwlf->getByUserIdAndStartDateAndEndDate($user_id, $wage_effective_date, $wage_effective_date);
         if ($uwlf->getRecordCount() == 1) {
             $uwf = $uwlf->getCurrent();
             echo "(U) ";
         } else {
             $uwf = new UserWageFactory();
         }
         $uwf->setUser($user_id);
         if (isset($mapped_row['wage_type_id']) and $mapped_row['wage_type_id'] != '') {
             $uwf->setType(Misc::importCallInputParseFunction('wage_type_id', $mapped_row['wage_type_id'], $filtered_import_map['wage_type_id']['default_value'], $filtered_import_map['wage_type_id']['parse_hint']));
         }
         if (isset($mapped_row['wage']) and $mapped_row['wage'] != '') {
             $uwf->setWage(Misc::importCallInputParseFunction('wage', $mapped_row['wage'], $filtered_import_map['wage']['default_value'], $mapped_row['wage_type_id']));
         }
         if ($uwf->getType() == 20) {
             if (isset($mapped_row['wage_weekly_time']) and $mapped_row['wage_weekly_time'] != '') {