Переглянути джерело

年假,工龄算法更改

laiguoran 6 роки тому
батько
коміт
0ea44f5b8d
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      protected/controller/HolidayController.php

+ 2 - 2
protected/controller/HolidayController.php

@@ -1101,14 +1101,14 @@ class HolidayController extends DooController {
 			return 0;
 		}
 		$hiredate = $staff['hiredate'];
-		$hireBiasDates = $staff['hireBiasDates'];
+		$hireBiasDate = $staff['hireBiasDate'];
 		if($hiredate == ''){
 			return 0;
 		}
 		Doo::loadModel('holidaystaff');
 		$hstaff = new HStaff();
 		$hstaffmsg = $hstaff->getOne(array('where' => 'uid='.$staff['sid'],'asArray' => TRUE));
-		$hadyear = intval((time()-strtotime($hiredate) + 86400*$hireBiasDates)/(86400*365));
+		$hadyear = intval((time()-strtotime($hiredate) + 86400*$hireBiasDate)/(86400*365));
 		if($hadyear != $hstaffmsg['hadyear']){
 			$hstaff->uid = $staff['sid'];
 			$hstaff->hadyear = $hadyear;