public function cetak_mon_pembayaran()
 {
     if (isset($_POST['universitas']) && isset($_POST['jurusan']) && isset($_POST['tahun_masuk']) && isset($_POST['sts'])) {
         //print_r($_POST['univ']);
         $elem = new ElemenBeasiswa($this->registry);
         $univ = $_POST['universitas'];
         $jur = $_POST['jurusan'];
         $tahun = $_POST['tahun_masuk'];
         $sts = $_POST['sts'];
         $universitas = new Universitas($this->registry);
         $universitas->set_kode_in($univ);
         $data_univ = $universitas->get_univ_by_id($universitas);
         //var_dump($data_univ);
         $jurusan = new Jurusan($this->registry);
         $jurusan->set_kode_jur($jur);
         $data_jur = $jurusan->get_jur_by_id($jurusan);
         $this->view->universitas = $data_univ;
         $this->view->jurusan = $jurusan;
         $this->view->data_jurusan = $data_jur;
         $this->view->pb = new Penerima($this->registry);
         $user = Session::get('kd_user');
         if (Session::get('role') == 2) {
             $data = $elem->get_list_elem($univ, $jur, $tahun, $sts, $user);
         } else {
             $data = $elem->get_list_elem($univ, $jur, $tahun, $sts);
         }
         $this->view->data = $data;
         $this->view->univ = $univ;
         $this->view->jur = $jur;
         $this->view->tahun = $tahun;
         $this->view->sts = $sts;
         $this->view->load('bantuan/cetak_mon_pembayaran');
     }
 }
Example #2
0
 private function get_data_buku()
 {
     $d_st = $this->get_list_kode_st(true);
     $now = date('Y-m');
     $now .= "-1";
     $next_month = date('Y-m-d', strtotime('+1 MONTH', strtotime($now)));
     foreach ($d_st as $st) {
         $kd_st = $st['KD_ST'];
         //            print_r($kd_st);
         $d_bulan = $this->get_bulan_surat_tugas($kd_st, true);
         //            print_r($d_bulan);
         foreach ($d_bulan as $bulan) {
             $cek_proses = $this->cek_telah_bayar_elem(2, $bulan, $kd_st);
             //                echo $bulan; var_dump($cek_proses);
             $cek_bayar = $this->cek_telah_bayar_elem(2, $bulan, $kd_st, true);
             $tmp = explode("-", $bulan);
             $month = $tmp[1] == 1 ? 3 : 9;
             $tanggal_akhir = date('Y-m-d', strtotime($tmp[0] . "-" . $month . "-1"));
             //                var_dump(date('Y-m-d',$tanggal_akhir));
             $cek_bulan = strtotime($tanggal_akhir) == strtotime($next_month);
             if ($cek_proses) {
                 if (!$cek_bayar) {
                     $notif = $this->get_data_buku_by_st($kd_st, $bulan);
                     $notif->set_link($bulan);
                     $notif->set_status_notif('proses');
                     //                        echo $kd_st."-".$bulan."-".$notif->get_jenis_notif()."-".$notif->get_jurusan()."-".$notif->get_tahun_masuk()."-".$notif->get_univ()."-".$notif->get_status_notif()."</br>";
                     //                        print_r($notif);
                     $this->_notif_data[] = $notif;
                 }
             } else {
                 $notif = new NotifikasiDao();
                 $st = new SuratTugas($this->registry);
                 $st->set_kd_st($kd_st);
                 $d_st = $st->get_surat_tugas_by_id($st);
                 $notif->set_jatuh_tempo($bulan);
                 $notif->set_jenis_notif('buku');
                 /** jurusan **/
                 $jur = new Jurusan($this->registry);
                 $jur->set_kode_jur($d_st->get_jur());
                 $d_jur = $jur->get_jur_by_id($jur);
                 $notif->set_jurusan($d_jur->get_nama());
                 $notif->set_kode_link('');
                 $notif->set_link($bulan);
                 $notif->set_status_notif('belum');
                 $notif->set_tahun_masuk($d_st->get_th_masuk());
                 /** universitas **/
                 $fakul = new Fakultas($this->registry);
                 $fakul->set_kode_fakul($d_jur->get_kode_fakul());
                 $d_fakul = $fakul->get_fakul_by_id($fakul);
                 $univ = new Universitas($this->registry);
                 $univ->set_kode_in($d_fakul->get_kode_univ());
                 $d_univ = $univ->get_univ_by_id($univ);
                 $notif->set_univ($d_univ->get_kode());
                 /** pic **/
                 $pic = new User($this->registry);
                 $d_pic = $pic->getUser_id($d_univ->get_pic());
                 $pic_arr = array('kode' => $d_pic->get_id(), 'nama' => $d_pic->get_nmUser(), 'foto' => $d_pic->get_foto());
                 $notif->set_pic($pic_arr);
                 //
                 if ($cek_bulan) {
                     $is_notif = $this->is_write_notif('buku', $tanggal_akhir);
                     if ($is_notif) {
                         //                            echo $kd_st."-".$bulan."-".$notif->get_jenis_notif()."-".$notif->get_jurusan()."-".$notif->get_tahun_masuk()."-".$notif->get_univ()."-".$notif->get_status_notif()."</br>";
                         $this->_notif_data[] = $notif;
                     }
                 } else {
                     //                        echo $kd_st."-".$bulan."-".$notif->get_jenis_notif()."-".$notif->get_jurusan()."-".$notif->get_tahun_masuk()."-".$notif->get_univ()."-".$notif->get_status_notif()."</br>";
                     $this->_notif_data[] = $notif;
                 }
             }
         }
     }
 }
 public function cetakBiayaKontrak()
 {
     if (isset($_POST['univ']) && isset($_POST['status']) && isset($_POST['jadwal'])) {
         $univ = $_POST['univ'];
         //print_r ($univ);
         $status = $_POST['status'];
         $tahun = $_POST['jadwal'];
         //print_r ($tahun);
         $biaya = new Biaya();
         $user = Session::get('kd_user');
         $biaya = new Biaya();
         if (Session::get('role') == 2) {
             $data_biaya = $biaya->get_by_filter($univ, $status, $tahun, $user);
         } else {
             $data_biaya = $biaya->get_by_filter($univ, $status, $tahun);
         }
         $universitas = new Universitas($this->registry);
         $universitas->set_kode_in($univ);
         $data_univ = $universitas->get_univ_by_id($universitas);
         $jurusan = new Jurusan($this->registry);
         $kontrak = new Kontrak();
         $this->view->universitas = $universitas;
         $this->view->jurusan = $jurusan;
         $this->view->kontrak = $kontrak;
         $this->view->biaya = $biaya;
         $this->view->univ = $univ;
         $this->view->data_univ = $data_univ;
         $this->view->status = $status;
         $this->view->jadwal = $tahun;
         //var_dump($biaya);
         $this->view->data_biaya = $data_biaya;
         $this->view->load('kontrak/cetak_biaya_kontrak');
     }
 }
 public function cetak_daftar_penerima()
 {
     $kd_univ = $_POST['univ'];
     $thn = $_POST['thn'];
     $status = $_POST['status'];
     $this->view->univ = '';
     $this->view->thn = '';
     $this->view->status = '';
     $pb = new Penerima($this->registry);
     $role = Session::get('role');
     if ($kd_univ == 0 && $thn == 0 && $status == 0) {
         if ($role == 2) {
             $this->view->d_pb = $pb->get_penerima($this->kd_user);
         } else {
             $this->view->d_pb = $pb->get_penerima();
         }
     } else {
         if ($role == 2) {
             $this->view->d_pb = $pb->get_penerima_filter($kd_univ, $thn, $status, $this->kd_user);
         } else {
             $this->view->d_pb = $pb->get_penerima_filter($kd_univ, $thn, $status, $this->kd_user);
         }
     }
     if ($kd_univ != 0) {
         $univ = new Universitas($this->registry);
         $univ->set_kode_in($kd_univ);
         $univ = $univ->get_univ_by_id($univ);
         $this->view->univ = $univ->get_nama();
     }
     if ($thn != 0) {
         $this->view->thn = $thn;
     }
     if ($status != 0) {
         $sts = new Status();
         $status = $sts->get_by_id($status);
         $this->view->status = $status->nm_status;
     }
     $this->view->load('riwayat_tb/cetak_daftar_penerima');
 }