application/modules/payroll/models/Payroll_model.php
// query delete data yang sudah terinput dan is_update_massal = 0 dan tidak SIA OFF LIBUR sebelum insert pada tanggal yang sama
query delete data yang sudah terinput dan is_update_massal = 0 dan tidak SIA OFF LIBUR sebelum insert pada tanggal yang sama
query delete data yang sudah terinput dan is_update_massal = 0 dan tidak SIA OFF LIBUR sebelum insert pada tanggal yang sama
function delete_not_update_massal_by_date($id_gang, $date)
   {
	 $query = $this->db->query("delete from gang_activity WHERE attd_date = '".$date."' AND is_mass_update = 0 AND attd_code NOT IN (SELECT attd_code FROM master_attd_code WHERE paid = 1) and empcode IN (SELECT empcode FROM gang_master WHERE id_gang = '".$id_gang."' AND active = 1 AND empcode NOT IN (SELECT empcode FROM hr_termination WHERE dateterminate < CURRENT_DATE() - INTERVAL 26 DAY)) ");
		 return $this->db->affected_rows();
   }
function delete_not_update_massal_by_date ( $ id_gang , $ date ) { $ query = $ this -> db -> query ( " delete from gang_activity WHERE attd_date = ' " . $ date . " ' AND is_mass_update = 0 AND attd_code NOT IN (SELECT attd_code FROM master_attd_code WHERE paid = 1) and empcode IN (SELECT empcode FROM gang_master WHERE id_gang = ' " . $ id_gang . " ' AND active = 1 AND empcode NOT IN (SELECT empcode FROM hr_termination WHERE dateterminate < CURRENT_DATE() - INTERVAL 26 DAY))  " ) ; return $ this -> db -> affected_rows ( ) ; }
query delete data yang sudah terinput dan is_update_massal = 0 dan tidak SIA OFF LIBUR sebelum insert pada tanggal yang sama
query delete data yang sudah terinput dan is_update_massal = 0 dan tidak SIA OFF LIBUR sebelum insert pada tanggal yang sama