diff --git a/application/controllers/Attendancmonthly.php b/application/controllers/Attendancmonthly.php new file mode 100644 index 0000000..b6b4345 --- /dev/null +++ b/application/controllers/Attendancmonthly.php @@ -0,0 +1,65 @@ +load->database(); + } + + public function index() + { + $data = [ + "active_menu" => "attendance_monthly" + ]; + + $this->load->view('partials/header', $data); + $this->load->view('employees/attendance_monthly'); + $this->load->view('partials/footer'); + } + + public function get_data() + { + $date = $this->input->get('date'); + + if(!$date){ + $date = date('Y-m-d'); + } + + $data = $this->db->query(" + SELECT + a.*, + e.employee_code, + e.full_name, + s.shift_name + FROM k_attendances a + LEFT JOIN k_employees e ON e.id = a.employee_id + LEFT JOIN k_shifts s ON s.id = a.shift_id + WHERE a.attendance_date = '$date' + ORDER BY a.checkin_time DESC + ")->result(); + + $rows = []; + $no = 1; + + foreach($data as $d){ + + $rows[] = [ + $no++, + $d->employee_code, + $d->full_name, + $d->shift_name, + $d->checkin_time, + $d->checkout_time, + $d->attendance_status + ]; + } + + echo json_encode([ + 'data' => $rows + ]); + } +} \ No newline at end of file diff --git a/application/views/jurnal/layout.php b/application/views/jurnal/layout.php index aaf5e68..9b4ec10 100644 --- a/application/views/jurnal/layout.php +++ b/application/views/jurnal/layout.php @@ -86,7 +86,7 @@ - +
| Akun | Debit | Kredit | -@@ -289,6 +288,8 @@ $('#modeAuto').click(function(){ // ✅ RESET TOTAL FORM $('#tableDetail tbody').html(''); + $('#keterangan').val(''); // ✅ FIX + $('#tanggal').val(''); // ✅ FIX $('#base_jurnal_id').val(''); // reset total juga |
|---|