예제 #1
0
파일: edit.php 프로젝트: te-koyama/sheep
         throw new Exception("システムエラー:部署CDが不正です");
     }
 }
 //     if(isset($_SESSION[SESSION_USER_DIVISION_CD]) && !emp($_SESSION[SESSION_USER_DIVISION_CD])) {
 //         $division_cd = $_SESSION[SESSION_USER_DIVISION_CD];
 //     } else {
 //         $division_cd = null;
 //     }
 //     $department_cd = $_SESSION[SESSION_USER_DEPARTMENT_CD];
 //     if(isset($_SESSION[SESSION_USER_DIVISION_CD]) && !emp($_SESSION[SESSION_USER_DIVISION_CD])) {
 //         $division_cd = $_SESSION[SESSION_USER_DIVISION_CD];
 //     } else {
 //         $division_cd = null;
 //     }
 //目標取得
 $reportTarget = $target->getReportTarget($year, $department_cd, $division_cd, $id);
 //パラメータ設定
 if ($reportTarget) {
     $param['sql_flg'] = 'update';
 } else {
     $param['sql_flg'] = 'insert';
 }
 if (isset($request['edit'])) {
     if (isset($request['lastUpdatedParsonId'])) {
         $param['lastUpdatedParsonId'] = $request['lastUpdatedParsonId'];
     }
     if ($reportTarget) {
         $name = isset($param['lastUpdatedParsonId']) ? getStaffName($param['lastUpdatedParsonId']) : null;
     } else {
         $name = null;
     }
예제 #2
0
     exit;
 }
 //取得した日付から対象の週を取得
 $date = $report->getWeeklyDays($date);
 //日報取得
 $total_daily_report = $report->getTotalDailyReport($employee['id'], $year, $month);
 //週初めの曜日と週終わりの曜日取得
 $w = $report->getDay($date);
 //週報の上部の日時表示用に変換
 $days = $report->weeklyDaysConvirsion($date, $w);
 //週初めから週終わりまでの日付(7日間を取得設定)
 $weekDays = $report->setWeeklyDays($date);
 //
 $monthly_days = $report->getMonthlyDays($year, $month);
 $monthly_report = $report->getMonthlyReport($employee['id'], $year, $month);
 $reportTarget = $target->getReportTarget($year, $employee['department_cd'], $employee['division_cd'], $request['id']);
 if (isset($monthly_report['employee']['id'])) {
     $monthly_report_id = $monthly_report['employee']['id'];
 } else {
     $monthly_report_id = null;
 }
 $reportTargetUnit = $report->getReportTargetUnit($year, $month, $monthly_report_id);
 //パラメータ設定
 $param['year'] = $year;
 $param['month'] = $month;
 $param['employee'] = $employee;
 $param['title_day'] = $days;
 $param['monthly_days'] = $monthly_days;
 $param['weekDays'] = $weekDays;
 $param['total_daily_report'] = $total_daily_report;
 $param['group_cd'] = $_SESSION[SESSION_GROUP_CD];
예제 #3
0
 $monthly_days = $report->getMonthlyDays($year, $month);
 //月報取得
 $monthly_report = $report->getMonthlyReport($employee['id'], $year, $month);
 if (in_array(ACCOUNT_NEW_EMP, $_SESSION[SESSION_GROUP_CD])) {
     $department_cd = $_SESSION[SESSION_USER_DEPARTMENT_CD];
     if (isset($_SESSION[SESSION_USER_DIVISION_CD]) && !emp($_SESSION[SESSION_USER_DIVISION_CD])) {
         $division_cd = $_SESSION[SESSION_USER_DIVISION_CD];
     } else {
         $division_cd = null;
     }
 } else {
     $department_cd = $employee['department_cd'];
     $division_cd = $employee['division_cd'];
 }
 //目標取得
 $reportTarget = $target->getReportTarget($year, $department_cd, $division_cd, $employee['id']);
 if (isset($monthly_report['employee']['id'])) {
     $monthly_report_id = $monthly_report['employee']['id'];
 } else {
     $monthly_report_id = null;
 }
 $reportTargetUnit = $report->getReportTargetUnit($year, $month, $monthly_report_id);
 //パラメータ設定
 $param['year'] = $year;
 $param['month'] = $month;
 $param['employee'] = $employee;
 $param['title_day'] = $days;
 $param['monthly_days'] = $monthly_days;
 $param['weekDays'] = $weekDays;
 $param['total_daily_report'] = $total_daily_report;
 $param['group_cd'] = $authority;