[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simaku
/
application
/
views
/
spp
/
[
Home
]
File: proses3.php
<?php echo !empty($message) ? '<p class="text-info">' . $message . '</p>' : ''; echo !empty($h2_title) ? '<div class="well alert "><strong>Surat Permintaan Pembayaran (SPP)</strong><p class="pull-right">' . $h2_title . '</p></div>' : ''; $flashmessage = $this->session->flashdata('message'); echo !empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>' : ''; echo '<div class="well">'; $data_idkeg = array(); if ($kegiatan_spp1 != NULL) { if ($daftarkegspp->num_rows() > 0) { echo '<form name="spp_form" method="post" action="' . $form_action . '"> <p> Kegiatan yang akan di-SPP-kan</p> <table width="100%" class="table table-bordered table-striped" > <tr> <th align="center">No</th> <th align="center">Kode MAK</th> <th align="center">Nama Kegiatan</th> <th align="center">Anggaran yang diajukan</th> <th align="center">Menu</th> </tr>'; $no = 1; $jumlah = 0; foreach ($daftarkegspp->result() as $row) { echo '<tr>'; echo '<td>' . $no . '</td>'; echo '<td align="left">' . $row->kodemak1 . $row->kodemak2 . $row->kodemak3 . $row->kodemak4 . '</td>'; echo '<td>' . $row->namamak4 . '</td>'; echo '<td align="right">' . number_format($row->ajuan, 0, ',', '.') . '</td>'; $kode = explode('/', $row->no_spp); echo '<td>' . anchor('spp/rinci_perkegiatan/' . $row->idkeg, 'Rinci', array('class' => 'atur')) . ' | ' . anchor('spp/update/' . $row->idkeg . '_' . $kode[0] . '_' . $kode[2], 'Ubah', array('class' => 'update')) . ' | ' . anchor('spp/batal/' . $row->idkeg . '_' . $kode[0] . '_' . $kode[2], 'Batal', array('class' => 'delete', 'onclick' => "return confirm('Anda yakin ?')")); echo '</td></tr>'; $jumlah = $jumlah + $row->ajuan; $no++; $data_idkeg[] = $row->idkeg; } echo '<tr><td colspan="3" align="right">TOTAL</td><td align="right">' . number_format($jumlah, 0, ',', '.') . '</td><td></td></tr></table>'; echo '<input type="submit" title="Klik untuk membuat SPP" name="submit" id="submit" value="PROSES SPP" class="btn btn-primary"/> </form> '; } } ?> <?php /*if ($kegiatan_verifikasi2->num_rows()>0){ foreach($kegiatan_verifikasi2->result() as $row){ $blj_mak1 = $this->Mrekap->jml_bljf($row->idkeg); $ajuan = $this->Mspp->jumlah_ajuan($q1->kode,$row->idkeg); } if ($blj_mak1-$ajuan == 0){ echo '<form style=" margin:5px 5px 5px 5px; padding: 5px 10px; background-color: #F9B7FF; border: 1px solid #842DCE; -webkit-box-shadow: 0 0 8px #D0D0D0; ">'; echo 'Sisa Anggaran = Rp 0. Pengajuan SPP tidak bisa dilakukan.'; echo '</form><br>'; } }*/ ?> <form> <p>Daftar Mata Anggaran Kegiatan (MAK): <small><span class="label label-warning">Latar Belakang</span> · <span class="label label-success">Tujuan Kegiatan</span> · <span class="label label-info">Waktu Pelaksanaan</span></small></p> <table class="table table-bordered table-striped" style="font-size: 85%"> <tr> <th align="center" rowspan="2">No</th> <th align="center" rowspan="2">Kode MAK</th> <th align="center" rowspan="2">Nama Kegiatan</th> <th align="center" rowspan="2">Total Anggaran Belanja</th> <th align="center" rowspan="2">Anggaran Belanja yang <font color="red">sudah</font> dicairkan</th> <th align="center" colspan="2">Realisasi Anggaran</th> <th align="center" rowspan="2">Sisa Anggaran Belanja</th> <th align="center" rowspan="2">Menu</th> </tr> <tr> <th>Sudah LPJ</th> <th class="danger">Belum LPJ</th> </tr> <?php $no = 1; $B = $A = $T = $L = 0; if ($kegiatan->num_rows() > 0) { foreach ($kegiatan->result() as $row) { $blj_mak1 = $this->Mrekap->jml_bljf($row->idkeg); //X=total anggaran belanja $ajuan = $this->Mspp->jumlah_ajuan($q1->kode, $row->idkeg); //Y=Anggaran belanja sudah dicairkan $totreal = $this->Makun->total_realisasi_per_kegiatan($row->idkeg); //Z=realisasi anggaran (LPJ) /*if ($blj_mak1 !== 0 AND !(in_array($row->idkeg, $data_idkeg)) AND $blj_mak1-$ajuan !== 0) {*/ if (!(in_array($row->idkeg, $data_idkeg))) { $mak = $row->kodemak1 . ' ' . $row->kodemak2 . ' ' . $row->kodemak3 . ' ' . $row->kodemak4; ?> <tr> <td align="center"><?= $no ?></td> <td align="left" width="10%"><?= $mak ?></td> <td align="left"><?= $row->namamak4 ?> <small><span id="tooltip" class="label label-warning" data-toggle="tooltip" title="Latar Belakang : <?= $row->latblk ?>">LB</span> · <span id="tooltip1" class="label label-success" data-toggle="tooltip" title="Tujuan : <?= $row->tujuan ?>">TJ</span> · <span id="tooltip1" class="label label-info" data-toggle="tooltip" title="Waktu Pelaksanaan : <?= $row->jadwal ?>">WP</span></small></td> <td align="right"><span class="pull-right"><?= number_format($blj_mak1, 0, ",", ".") ?></span></td> <td align="right"><span class="pull-right"><?= number_format($ajuan, 0, ',', '.') ?></span></td> <td align="right"><span class="pull-right"><?= number_format($totreal, 0, ',', '.') ?></span></td> <?php if ($ajuan - $totreal > 0) { $at = $ajuan - $totreal; } else { $at = 0; } ?> <td align="right" class="danger"><span class="pull-right"><?= number_format($at, 0, ',', '.') ?></span></td> <?php if ($totreal != 0) { $total = $blj_mak1 - $totreal; } else { $total = $blj_mak1 - $ajuan; } ?> <td align="right"><span class="pull-right"><?php //echo number_format($total,0,",","."); echo number_format($blj_mak1 - $totreal - $at, 0, ",", "."); ?></span></td> <td align="center"> <?php //$this->session->set_userdata('idkeg',$row->idkeg); if ($blj_mak1 - $totreal - $at > 0) { echo anchor('spp/ajuan_popup/' . $row->idkeg, '<i class="icon-pencil icon-white"></i> SPP-kan', array('class' => 'label label-warning')); } ?> </td> </tr> <?php $no++; $B = $B + $blj_mak1; $A = $A + $ajuan; $T = $T + $totreal; $L = $L + $total; } } } ?> <tr> <th colspan="3"><span class="pull-right">JUMLAH</span></th> <th><span class="pull-right"><?= number_format($B, 0, ",", ".") ?></span></th> <th><span class="pull-right"><?= number_format($A, 0, ",", ".") ?></span></th> <th><span class="pull-right"><?= number_format($T, 0, ",", ".") ?></span></th> <?php if ($A - $T > 0) { ?> <th class="danger"><span class="pull-right"><?= number_format($A - $T, 0, ",", ".") ?></span></th> <?php } else { ?> <th><span class="pull-right"><?= number_format(0, 0, ",", ".") ?></span></th> <?php } ?> <th><span class="pull-right"><?php //echo number_format($L,0,",","."); echo number_format($B - $A, 0, ",", "."); ?></span></th> <th></th> </tr> </table> <p> </form> </div>