[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
BACKUP C 19-12
/
XAMPP74
/
htdocs
/
simaku
/
application-old
/
views
/
spp
/
[
Home
]
File: spp_unit.php
<?php echo !empty($message) ? '<p class="text-info">' . $message . '</p>' : ''; echo !empty($h2_title) ? '<div class="well alert "><p class="pull-left"><strong>Surat Permintaan Pembayaran (SPP)</strong></p><p class="pull-right">' . $h2_title . '</p></div>' : ''; $flashmessage = $this->session->flashdata('message'); echo !empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>' : ''; if ($data_spp->num_rows() == 0) { if ($kode[1] !== '00') { echo '<form name="spp_form" method="post" action="' . $form_action . '">'; echo '<input type="submit" title="Klik untuk membuat SPP baru" class="btn btn-primary" name="submit" id="submit" value=" Pembuatan SPP" /> </form>'; } } else { if ($data_spp->row()->status_spm == 'Disetujui') { echo '<form name="spp_form" method="post" action="' . $form_action . '"><p>'; echo '<input type="submit" title="Klik untuk membuat SPP baru" class="btn btn-primary" name="submit" id="submit" value=" Pembuatan SPP" /> </form>'; } } if ($data_spp->num_rows() > 0) { echo '<div class="well">'; echo '<p class="lead text-info"><b>Daftar SPP</b></p>'; echo '<table width="100%" class="table table-bordered table-striped">'; echo '<tr>'; echo '<th align="center">No</th>'; echo '<th align="center">No. SPP</th>'; echo '<th align="center">Tgl. Penyajian</th>'; echo '<th align="center">Otorisasi Pimpinan</th>'; echo '<th align="center">Status SPP</th>'; echo '<th align="center">Menu</th>'; echo '</tr>'; $no = 1; foreach ($data_spp->result() as $row) { $alasan = $this->Mspp->cari_alasan($row->id_spp); $kode_unit = explode('/', $row->no_spp); ?> <tr> <td align="center"><?= $no ?></td> <td align="center"><?= $row->no_spp ?></td> <td align="center"><?= date('d-m-Y', strtotime($row->tgl_saji)) ?></td> <?php if ($row->otorisasi == 'Batal') { ?> <td align="center"><?= $row->otorisasi ?> di-otorisasi <a href="#myModal" role="button" class="btn btn-mini" data-toggle="modal" title="Klik untuk melihat Alasan Pembatalan"><i class="icon-info-sign"></i></a> <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Alasan Pembatalan</h3> </div> <div class="modal-body"> <p><?= $alasan ?></p> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">OK</button> </div> </div> </td> <?php } else { ?> <td align="center"><?= $row->otorisasi ?> di-otorisasi</td> <?php } ?> <?php if ($row->status_spp == 'Ditolak') { ?> <td align="center"><?= $row->status_spp ?> <a href="#myModal1" role="button" class="btn btn-mini btn-warning" data-toggle="modal" title="Klik untuk melihat Alasan Penolakan"><i class="icon-info-sign"></i></a> <div id="myModal1" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Alasan Penolakan</h3> </div> <div class="modal-body"> <p><?= $alasan ?></p> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">OK</button> </div> </div> </td> <?php } else { ?> <td align="center"><?= $row->status_spp ?></td> <?php } ?> <?php switch ($row->otorisasi) { case 'Belum': if ($kode[1] == '00') { // echo '<td align="left">' . anchor('spp/lihat_rinci/' . $kode_unit[0] . '-' . $kode_unit[2], 'Lihat rinci') . ' | ' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Otorisasi') . '<a/></td>'; echo '<td align="left">' . anchor('spp/lihat_rinci/' . $kode_unit[0] . '-' . $kode_unit[2], 'Lihat rinci') . ' | ' . anchor('spp/otorisasi/' . $kode_unit[2], 'Otorisasi') . '<a/></td>'; } else { echo '<td align="left">' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Tampilkan') . ' | ' . anchor('spp/hapus', 'Hapus', array('onclick' => "return confirm('Anda yakin akan menghapus data ini?')")) . '<a/></td>'; $this->session->set_userdata('no_spp', $row->no_spp); } break; case 'Sudah': if ($kode[1] == '00') { if ($row->status_spp == 'Ditolak') { echo '<td align="left">' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Tampilkan') . ' | ' . anchor('spp/lihat_rinci/' . $kode_unit[0] . '-' . $kode_unit[2], 'Lihat rinci') . ' | ' . anchor('spp/batal_otorisasi/' . $kode_unit[2], 'Batal otorisasi', array('onclick' => "return confirm('Anda yakin akan membatal OTORISASI SPP?')")) . '<a/></td>'; } else { echo '<td align="left">' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Tampilkan') . ' | ' . anchor('spp/lihat_rinci/' . $kode_unit[0] . '-' . $kode_unit[2], 'Lihat rinci') . '<a/></td>'; } } else { echo '<td align="center">' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Tampilkan') . '<a/></td>'; } break; case 'Batal': if ($kode[1] == '00') { echo '<td align="left">' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Tampilkan') . ' | ' . anchor('spp/lihat_rinci/' . $kode_unit[0] . '-' . $kode_unit[2], 'Lihat rinci') . '<a/></td>'; } else { echo '<td align="left">' . anchor('spp/tampilkanspp/' . $kode_unit[2], 'Tampilkan') . ' | ' . anchor('spp/hapus', 'hapus', array('onclick' => "return confirm('Anda yakin akan menghapus data ini?')")) . '<a/></td>'; $this->session->set_userdata('no_spp', $row->no_spp); } break; } echo '</tr>'; $no++; } ?> </table> </div> <?php } ?> <?php if ($kode[1] == '00') { if ($data_spp1->num_rows() > 0) { echo '<div class="well">'; echo '<p class="lead text-info"><b>Daftar SPM</b></p>'; echo '<table width="100%" class="table table-bordered table-striped">'; echo '<tr>'; echo '<th>No</th>'; echo '<th>No. SPM</th>'; echo '<th>No. SPP</th>'; echo '<th>Tgl. Penyajian</th>'; echo '<th>Otorisasi Pimpinan</th>'; echo '<th>Status SPM</th>'; echo '<th>Menu</th>'; echo '</tr>'; $no = 1; foreach ($data_spp1->result() as $row) { echo '<tr>'; echo '<td align="center">' . $no . '</td>'; echo '<td align="center">' . $row->no_spm . '</td>'; echo '<td align="center">' . $row->no_spp . '</td>'; echo '<td align="center">' . date('d-m-Y', strtotime($row->tgl_saji)) . '</td>'; echo '<td align="center">' . $row->otorisasi . ' di-otorisasi</td>'; echo '<td align="center">' . $row->status_spm . '</td>'; $kode = explode('/', $row->no_spm); switch ($row->otorisasi) { case 'Belum': if ($kode[1] == '00') { echo '<td align="center">' . anchor('spp/tampilkanspp', 'Tampilkan') . ' | ' . anchor('spp/otorisasi_spp_unit', 'Lihat rinci') . ' | ' . anchor('spp/otorisasi', 'Otorisasi') . '<a/></td>'; } else { echo '<td align="center">' . anchor('spp/tampilkanspp', 'Tampilkan') . ' | ' . anchor('spp/proses', 'Ubah') . ' | ' . anchor('spp/hapus', 'hapus', array('onclick' => "return confirm('Anda yakin akan menghapus data ini?')")) . '<a/></td>'; $this->session->set_userdata('no_spp', $row->no_spp); } break; case 'Sudah': if ($kode[1] == '00') { if ($row->verifikasi2 == 'Disetujui') { echo '<td align="center">' . anchor('spp/cetak/' . $kode[0] . 'spm' . $kode[2], 'Cetak SPM') . '<a/></td>'; } else { echo '<td align="center">' . anchor('spp/tampilkanspp', 'Tampilkan') . ' | ' . anchor('spp/batal_otorisasi_spp_unit', 'Lihat rinci') . ' | ' . anchor('spp/batal_otorisasi', 'Batal Otorisasi', array('onclick' => "return confirm('SPP dibatalkan. Anda yakin?')")) . '<a/></td>'; } } else { if ($row->verifikasi2 == 'Disetujui') { echo '<td align="center">' . anchor('spp/cetak/' . $kode[0] . 'spm' . $kode[2], 'Cetak SPM') . '<a/></td>'; } else { echo '<td align="center">' . anchor('spp/tampilkanspp', 'Tampilkan') . '<a/></td>'; } } break; } echo '</tr>'; $no++; } ?> </table> </div> <?php } } ?>