[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simaku
/
application-old
/
views
/
akuntansi
/
[
Home
]
File: setor2.php
<?php echo !empty($message) ? '<p class="text-info">' . $message . '</p>' : ''; echo !empty($h2_title) ? '<div class="well alert alert-info"><strong>' . $h2_title . '</strong></div>' : ''; $flashmessage = $this->session->flashdata('message'); echo !empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>' : ''; if ($query1->num_rows() > 0) { ?> <p>Daftar SALDO masing-masing Unit Kerja</p> <table class="table table-bordered table-striped" style="font-size:90%"> <tr> <th align="center" width="5%">No</th> <th align="center">Unit Kerja</th> <th align="center" width="15%">Saldo</th> </tr> <?php $no = 1; $total = 0; foreach ($query1->result() as $row) { $subunit = $this->Munit->cari_unit($row->id_uk)->row()->kode; $kode = explode('.', $subunit); $namaunit = $this->Munit->get_unit_by_kode($kode[0])->row(); $jmlkas = $this->Makun->jml_kas_unit($kode[0]); ?> <tr> <td align="center" rowspan="2"><?= $no ?></td> <td align="left"><a class="btn btn-link btn-sm" data-toggle="collapse" data-target="#spmu<?= $row->id_uk ?>"><?= $namaunit->nama ?></a></td> <td align="right" width="15%"><?= number_format($jmlkas, 0, ',', '.') ?></td> </tr> <tr> <td colspan="2"> <div class="collapse" id="spmu<?= $row->id_uk ?>"> <table class="table table-bordered" style="font-size: 80%"> <tr> <td>NO</td> <td>NO. SPMU</td> </tr> <?php $q = $this->Mspp->get_spm_per_unitbesar($kode[0]); $t = 0; $r = 0; $ts = 0; if ($q->num_rows() > 0) $nomor = 1; { foreach ($q->result() as $key) { $ajuan = $this->Mspp->get_jumlah_ajuan_per_spm_per_unitbesar($key->no_spm, $kode[0]); $realisasi = $this->Makun->get_realisasi_per_spm($key->no_spm); if ($ajuan - $realisasi < 0) { $sisa = '(' . number_format(abs($ajuan - $realisasi), 0, ',', '.') . ')'; } else { $sisa = number_format($ajuan - $realisasi, 0, ',', '.'); } $pecah = explode('/', $key->no_spm); $adarealspm = $this->Makun->total_realisasi_by_nospm($pecah[0]); if ($adarealspm != 0) { $class = 'class="success"'; } else { $class = ''; } ?> <tr <?= $class ?>> <td rowspan="2"><?= $nomor ?></td> <td><a data-toggle="collapse" data-target="#ls<?= $no ?>_<?= $nomor ?>" class="btn btn-link btn-xs"><?= $key->no_spm ?></a></td> </tr> <tr> <td> <div class="collapse" id="ls<?= $no ?>_<?= $nomor ?>"> <table class="table table-bordered"> <tr> <td>NO</td> <td>MAK</td> <td>Nama Kegiatan</td> <td>Ajuan</td> <td>Sisa</td> <td>Menu</td> </tr> <?php $ls = $this->Mspp->get_nospm($key->no_spm); if ($ls->num_rows() > 0) { $nom = 1; foreach ($ls->result() as $k) { $nospm = explode('/', $k->no_spm); $totalrealisasi = $this->Makun->total_realisasi_by_idkeg_nospm($k->idkeg, $nospm[0]); if ($totalrealisasi != 0) { $success = 'success'; } else { $success = ''; } ?> <tr> <td><?= $nom ?></td> <td><?= $this->Mkeg->get_kegiatan_dan_mak($k->idkeg)->kodemak1 ?> <?= $this->Mkeg->get_kegiatan_dan_mak($k->idkeg)->kodemak2 ?> <?= $this->Mkeg->get_kegiatan_dan_mak($k->idkeg)->kodemak3 ?> <?= $this->Mkeg->get_kegiatan_dan_mak($k->idkeg)->kodemak4 ?></td> <td><?= $this->Mkeg->get_kegiatan_dan_mak($k->idkeg)->namamak4 ?></td> <td class="text-right"><?= number_format($k->ajuan, 0, ',', '.') ?></td> <td class="text-right <?= $success ?>"><?= number_format($k->ajuan - $totalrealisasi, 0, ',', '.') ?></td> <td> <a class="btn btn-link btn-xs" data-toggle="modal" data-target="#lk<?= $no ?>_<?= $nomor ?>_<?= $nom ?>">Setorkan</a> <div class="modal fade" tabindex="-1" role="dialog" id="lk<?= $no ?>_<?= $nomor ?>_<?= $nom ?>"> <div class="modal-dialog" role="document"> <div class="modal-content"> <form method="post" action="<?= base_url('akuntansi/jurnalsetor2') ?>" class="form-horizontal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Setor Kas Unit ke Kas Universitas</h4> <p class="text-info">Kegiatan: <?= $this->Mkeg->get_kegiatan_dan_mak($k->idkeg)->namamak4 ?></p> <p class="text-info">Sisa Anggaran Kegiatan: Rp. <?= number_format($k->ajuan - $totalrealisasi, 0, ',', '.') ?></p> </div> <div class="modal-body"> <div class="form-group"> <label class="col-sm-2 control-label">Bukti</label> <div class="col-sm-10"> <input type="text" class="form-control" placeholder="Bukti" name="bukti"> </div> </div> <input type="hidden" name="no_spm" value="<?= $nospm[0] ?>"> <input type="hidden" name="idkeg" value="<?= $k->idkeg ?>"> <input type="hidden" name="id_uk" value="<?= $namaunit->id_unit ?>"> <input type="hidden" name="besaran" value="<?= $k->ajuan - $totalrealisasi ?>"> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary" onclick="return confirm('Anda yakin akan menyetorkan sisa anggaran ini ke KAS UNIVERSITAS?')">Setorkan</button> </div> </form> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> </td> </tr> <?php $nom++; } } ?> </table> </div> </td> </tr> <?php $nomor++; $t = $t + $ajuan; $r = $r + $realisasi; $ts = $ts + ($ajuan - $realisasi); if ($ts < 0) { $tsisa = '(' . number_format(abs($ts), 0, ',', '.') . ')'; } else { $tsisa = number_format($ts, 0, ',', '.'); } } } ?> </table> </div> </td> </tr> <?php $no++; $total = $total + $jmlkas; } ?> <tr> <th colspan="2"><span class="pull-right">JUMLAH</span></th> <th><span class="pull-right"><?= number_format($total, 0, ',', '.') ?></span></th> <th></th> </tr> </table> <?php } ?>