예제 #1
0
 function getMonth1To12($language = "english")
 {
     $data = array();
     $data[0] = "--เลือก--";
     for ($i = 1; $i <= 12; $i++) {
         if ($language === "thai") {
             $data[$i] = get_month_name_thai($i);
         } else {
             $data[$i] = date('F', mktime(0, 0, 0, $i, 10));
         }
     }
     return $data;
 }
예제 #2
0
 public function printpdf($year, $month)
 {
     $this->load->helper('pdf_helper');
     $query_now_salary = $this->salarypay->get_detail_by_year_and_month($this->user_id, $year, $month);
     $data = array();
     $data["emp_detail"] = getEmployeeDetail($this->emp_id);
     $data["month"] = $month;
     $data["month_name"] = get_month_name_thai($month);
     $data["year"] = $year;
     $data["year_thai"] = year_thai($year);
     $data["query_now_salary"] = $query_now_salary->row_array();
     $this->load->view('report/Usersalaryprint', $data);
 }
예제 #3
0
 public function salary_printpdf($emp_id, $year, $month)
 {
     $this->load->model("Salary_pay_log_model");
     $this->load->helper('pdf_helper');
     $data = array();
     $data["emp_detail"] = getEmployeeDetail($emp_id);
     $data["month"] = $month;
     $data["month_name"] = get_month_name_thai($month);
     $data["year"] = $year;
     $data["year_thai"] = year_thai($year);
     $query_now_salary = $this->Salary_pay_log_model->get_detail_by_year_and_month($data['emp_detail']['UserID'], $year, $month);
     $data["query_now_salary"] = $query_now_salary->row_array();
     $this->load->view('report/Usersalaryprint', $data);
 }
예제 #4
0
 public function search($team = 0, $year = 0, $month = 0)
 {
     $team = intval($team);
     $config = array();
     $config['total_rows'] = $this->ot->count_all_headman_send_instead($this->user_id, $year, $month, $team);
     $this->load->library('pagination', $config);
     //$page = ($this->uri->segment(4)) ? $this->uri->segment(4) : 0;
     $page = 0;
     //have a problem about send all data
     $query = $this->ot->get_list_headman_send_instead($this->pagination->per_page, $page, $this->user_id, $year, $month, $team);
     $query_year = $this->ot->get_data_exists_year($this->user_id);
     $query_month = $this->ot->get_data_exists_month($this->user_id);
     $query_team = $this->headman->get_team_list_by_headman_user_id($this->user_id);
     //set options for dropdown year , month , team
     $options_year = array('0' => 'ทั้งหมด');
     $options_month = array('0' => 'ทั้งหมด');
     $options_team = array('0' => 'ทั้งหมด');
     foreach ($query_year->result_array() as $row) {
         $options_year[$row['years']] = intval($row['years']) + 543;
     }
     foreach ($query_month->result_array() as $row) {
         $options_month[$row['months']] = get_month_name_thai($row['months']);
     }
     foreach ($query_team->result_array() as $row) {
         $options_team[$row["UserID"]] = $row["EmpFullnameThai"];
     }
     $data = array();
     $data['query'] = $query->result_array();
     $data['options_year'] = $options_year;
     $data['options_month'] = $options_month;
     $data['options_team'] = $options_team;
     $data["value_team"] = $team;
     $data["value_year"] = $year;
     $data["value_month"] = $month;
     parent::setHeader('รายการส่งใบคำทำงานล่วงเวลาแทน', 'OT');
     $this->load->view("headman/Ot/send_instead_list", $data);
     parent::setFooter();
 }
예제 #5
0
<table class="bordered highlight">
	<thead>
		<tr>
			<th>เดือน</th>
			<th>เงินได้สุทธิต่อเดือน</th>
			<th>วันที่ทำรายการ</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php 
foreach ($history as $row) {
    ?>
			<tr>
				<td><?php 
    echo get_month_name_thai($row["sapay_month"]);
    ?>
</td>
				<td><?php 
    echo $row["sapay_net"];
    ?>
</td>
				<td><?php 
    echo date_time_thai_format_from_db($row["sapay_created_date"]);
    ?>
</td>
				<td><a href="<?php 
    echo site_url("hr/moneydata/salary_printpdf/" . $emp_id . "/" . $row["sapay_year"] . "/" . $row["sapay_month"]);
    ?>
" class="btn waves-effect waves-light" target="_blank">Print PDF</a></td>
			</tr>
예제 #6
0
	<thead>
		<tr>
			<th width="12%">เดือน/ปี</th>
			<th>วันที่ขอทำโอที</th>
			<th>เวลาที่ขอทำ</th>
			<th>เวลาที่มาทำจริง</th>
			<th>จำนวนเงิน</th>
		</tr>
	</thead>
	<tbody>
<?php 
foreach ($history as $row) {
    ?>
			<tr>	
				<td><?php 
    echo get_month_name_thai($row['sapay_month']);
    ?>
</td>
				<td><?php 
    echo dateThaiFormatFromDB($row['spldot_wot_date']);
    ?>
</td>
				<td><?php 
    echo $row['spldot_wot_time_from'], "-", $row['spldot_wot_time_to'];
    ?>
</td>
				<td><?php 
    echo $row['spldot_real_wot_time_from'], "-", $row['spldot_real_wot_time_to'];
    ?>
</td>
				<td><?php 
예제 #7
0
?>
</div>
    <div class="col s4 m4 l4">ตำแหน่ง<?php 
echo $emp_detail["PositionName"];
?>
</div>
	</div>
	<div style="padding: 1px;-color: cadetblue;margin-top: 1%;margin-bottom: 0;">
</div>
<div class="card-panel center-align">
	<a href="javascript:void(0);" class="waves-effect waves-teal btn-flat">ปี <?php 
echo year_thai($query_pay["otpay_year"]);
?>
</a>
	<a href="javascript:void(0);" class="waves-effect waves-teal btn-flat">เดือน <?php 
echo get_month_name_thai($query_pay["otpay_month"]);
?>
</a>
	<a href="javascript:void(0);" class="waves-effect waves-teal btn-flat">สรุปจำนวนชั่วโมง	<?php 
echo $query_pay["otpay_hour"];
?>
 ชั่วโมง</a>
	<a href="javascript:void(0);" class="waves-effect waves-teal btn-flat">สรุปรายได้ <?php 
echo $query_pay["otpay_money"];
?>
 บาท</a>			
</div>
<h4 class="header">รายละเอียด</h4>
<table class="responsive-table bordered highlight">
	<thead>
		<tr>
예제 #8
0
 public function printpdf($ot_id)
 {
     $this->load->helper('pdf_helper');
     $query = $this->ot->get_detail_by_id($ot_id);
     $query = $query->row_array();
     $query_log = $this->otlog->get_list_only_approve($ot_id);
     $query_log = $query_log->result_array();
     $date = explode("-", $query["wot_date"]);
     $month = $date[1];
     $year = $date[0];
     $day = $date[2];
     $data = array();
     $data["emp_detail"] = getEmployeeDetailByUserID($query["wot_request_by"]);
     //date
     $data["day"] = $day;
     $data["month"] = $month;
     $data["month_name"] = get_month_name_thai($month);
     $data["year"] = $year;
     $data["year_thai"] = year_thai($year);
     //created date
     $date1 = explode(" ", $query["wot_request_date"]);
     $date = explode("-", $date1[0]);
     $month = $date[1];
     $year = $date[0];
     $day = $date[2];
     $data["created_day"] = $day;
     $data["created_month"] = $month;
     $data["created_month_name"] = get_month_name_thai($month);
     $data["created_year"] = $year;
     $data["created_year_thai"] = year_thai($year);
     $data["query"] = $query;
     $data["query_log"] = $query_log;
     $this->load->view('report/Overtimedetail', $data);
 }
예제 #9
0
function date_thai_format_no_time_full_from_db($date)
{
    //date format yyyy-mm-dd hh:ss:ii
    //to dd/mm/yyyy
    $newDate = '';
    if ($date != '0000-00-00 00:00:00') {
        $date_time = explode(' ', $date);
        $date = explode('-', $date_time[0]);
        $time = $date_time[1];
        $day = $date[2];
        $month = $date[1];
        $year = $date[0];
        $year_thai = year_thai($year);
        $month_name = get_month_name_thai($month);
        $newDate = $day . " " . $month_name . " " . $year_thai;
    }
    return $newDate;
}
예제 #10
0
 public function printpdf($year, $month, $emp_id = "")
 {
     $this->load->helper('pdf_helper');
     if ($emp_id !== "") {
         //check can see this profile is_your_headman or is_hr
         $user_detail = getEmployeeDetail($emp_id);
         $checker = FALSE;
         $headman_level = 0;
         list($checker, $headman_level) = is_your_headman($user_detail["UserID"], $this->user_id);
         if ($checker == TRUE || is_hr()) {
             $this->emp_id = $emp_id;
             $this->user_id = $user_detail["UserID"];
         } else {
             $emp_id = "";
         }
     }
     $query = $this->worktime->get_list_by_year_and_month($this->user_id, $year, $month);
     $data = array();
     $data["emp_detail"] = getEmployeeDetail($this->emp_id);
     $data["month"] = $month;
     $data["month_name"] = get_month_name_thai($month);
     $data["year"] = $year;
     $data["year_thai"] = year_thai($year);
     $data["query"] = $query->result_array();
     $this->load->view('report/Worktime', $data);
 }
예제 #11
0
foreach ($history as $row) {
    ?>
					<tr>
						<td><?php 
    echo year_thai($row['bonus_year']);
    ?>
</td>
						<td><?php 
    echo $row['bonus_money'];
    ?>
</td>
						<td>งวดที่ <?php 
    echo $row['bp_period'];
    ?>
 เดือน<?php 
    echo get_month_name_thai($row['bp_month']);
    ?>
</td>
						<td><?php 
    echo $row['bp_money'];
    ?>
</td>
					</tr>
				<?php 
}
?>
			</tbody>
		</table>
	</div>
</div>
<div class="divider"></div>
예제 #12
0
				<th>ชื่อรายการ</th>
				<th>จำนวนเงิน</th>
				<th>วันที่ทำรายการ</th>
			</tr>
		</thead>
		<tbody>
			<?php 
foreach ($query_log as $row) {
    ?>
				<tr>
					<td><?php 
    echo year_thai($row["SMMYear"]);
    ?>
</td>
					<td><?php 
    echo get_month_name_thai($row["SMMMonth"]);
    ?>
</td>
					<td><?php 
    echo $row["SMMTopic"];
    ?>
</td>
					<td><?php 
    echo $row["SMMMoney"];
    ?>
</td>
					<td><?php 
    echo date_time_thai_format_from_db($row["SMMCreatedDate"]);
    ?>
</td>
				</tr>
예제 #13
0
		<h5 class="header">
			เงินเดือนปัจจุบันของคุณ : <?php 
echo number_format($emp_detail["EmpSalary"]);
?>
 บาท
		</h5>
		<?php 
if ($query_salary["sapay_salary"] == "") {
    ?>
			<br>
			<h5 class="header">คุณยังไม่มีข้อมูลรายได้ประจำเดือน</h5>
		<?php 
} else {
    ?>
			<h4 class="header">รายได้ประจำเดือน  <?php 
    echo get_month_name_thai($query_salary["sapay_month"]);
    ?>
 ปี <?php 
    echo year_thai($query_salary["sapay_year"]);
    ?>
</h4>
			<br>
			<div class="row">
				<div class="col s12 m10 offset-m1 l8 offset-l2">
					<table class="salary_present">
						<tbody>
							<tr>
								<td>เงินเดือน</td>
								<td><?php 
    echo $query_salary["sapay_salary"];
    ?>