[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
BACKUP C 19-12
/
XAMPP74
/
htdocs
/
simkeu
/
dummy-old
/
application
/
views
/
kasir
/
[
Home
]
File: beranda.php
<?php //echo ! empty($h2_title) ? '<h2>' . $h2_title. '</h2>': ''; echo ! empty($message) ? '<p class="lead">' . $message . '</p>': ''; $flashmessage = $this->session->flashdata('message'); echo ! empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>': ''; if ($list_spm->num_rows() > 0){ echo '<div class="well">'; echo '<table width="100%" class="table table-bordered table-striped" style="font-size:90%">'; echo '<thead>'; echo '<tr>'; echo '<th align="center"></th>'; echo '<th align="center">No</th>'; echo '<th align="center">NO. SPM</th>'; echo '<th align="center">Nama Unit Kerja</th>'; echo '<th align="center" width="20%" cellpadding>Tanggal SPM Disetujui</th>'; echo '<th align="center">Jumlah<br>Yang Dibayarkan (Rp)</th>'; echo '<th align="center">Menu</th>'; echo '</tr>'; echo '</thead>'; $no = 1; if ($list_nospm->num_rows()>0){ foreach ($list_nospm->result() as $row){ $spm_array[] = array($row->no_spm); }}else{ $spm_array[] = NULL; } foreach($list_spm->result() as $row){ //$q = $this->Mpass->cek_idlog($row->id_unit); $pisah = explode('/', $row->no_spm); $pecah = explode('.', $pisah[2]); $unit = $this->Munit->get_unit_by_kode($pecah[0])->row()->nama; $kode = str_replace('/', '-', $row->no_spm); $subunit = $this->Munit->get_idunit_by_kode($pisah[2])->row(); echo '<tbody>'; if($row->no_spm != NULL) { echo '<tr><th align="center"></th><th align="center">'.$no.'</th><th align="center">'.$row->no_spm.'</th><th align="left">'.$unit; echo '</th><th align="center">'.date('d M Y',strtotime($row->tgl_spm)).'</th>'; $minta = $this->Mkasir->jml_diminta($row->no_spm); echo '</th><th align="right" width="10%">'.number_format($minta,0,',','.').'</th>'; echo '<th align="left">'; $nospm = $this->Makun->get_kasir($pisah[0]); //Konsep sebelumnya //if ($spm_array == NULL AND in_array($pecah[0], $spm_array)){ if ($nospm == NULL){ echo anchor('kasir_beranda/tunai/'.$kode,'Tunai',array('class' => 'cetak_html')); echo ' | <font color="grey">Rekening</font>'; echo ' | <font color="grey">Lihat</font>'; }else{ echo '<font color="grey">Tunai</font> | <font color="grey">Rekening</font>'; echo ' | '; echo anchor('kasir_beranda/lihat/'.$kode,'Lihat',array('class' => 'add')); } /* * echo anchor('kasir_beranda/tunai/'.$kode,'Tunai',array('class' => 'cetak_html')); echo ' | '; echo anchor('kasir_beranda/rekening/'.$kode,'Rekening',array('class' => 'add')); echo ' | <font color="grey">Lihat</font>'; * */ echo '</th></tr>'; //panggil database spm untuk menurunkan data per No SPM $spm = $this->Mspp->kegiatan_unit_spm_ok($subunit->id_unit,$row->no_spm); echo '<tr style="display:none;">'; echo '<td align="center"></td><td align="center">NO</td><td align="center">Kode Sub Unit</td><td align="left">Nama Sub Unit</td><td align="center">M.A.K.</td><td align="left">Nama Kegiatan</td><td align="center" >Jumlah yang Diminta (Rp)</td>'; echo '</tr>'; if ($spm->num_rows()>0){ $no1=1; $angg_scair = 0; $jumlah =0; $totagg=0; $tersedia=0; $sisa=0; $totalcair=0; foreach ($spm->result() as $row) { $blj_mak1 = $this->Mrekap->jml_bljf($row->idkeg); //$angg_scair = $this->Mspp->jumlah_ajuan_before($spm->row()->no_spm,$pecah[2],$row->idkeg); echo '<tr style="display:none;">'; echo '<td align="center"></td><td style="border: 1pt ridge black; border-collapse:collapse">'.$no.'</td>'; echo '<td style="border: 1pt ridge black; border-collapse:collapse">'.$subunit->kode.'</td>'; echo '<td style="border: 1pt ridge black; border-collapse:collapse">'.$subunit->nama.'</td>'; echo '<td style="border: 1pt ridge black; border-collapse:collapse" align="left">'.$row->kodemak1.$row->kodemak2.$row->kodemak3.$row->kodemak4.'</td>'; echo '<td style="border: 1pt ridge black; border-collapse:collapse">'.$row->namamak4.'</td>'; echo '<td align="right" style="border: 1pt ridge black; border-collapse:collapse">'.number_format($row->ajuan,0,',','.').'</td>'; echo '</tr>'; } } echo '</tbody>'; $no++; } }} echo '</table></div><br>';?> <script> $(document).ready(function() { var togglePlus = '<?=base_url()?>images/2.png'; var toggleMinus = '<?=base_url()?>images/7.png'; var $subHead = $('tbody th:first-child'); $subHead.prepend('<img src="' + togglePlus + '" alt="collapse this section" />'); $('img', $subHead).addClass('clickable').click(function() { var toggleSrc = $(this).attr('src'); if ( toggleSrc == togglePlus ) { $(this).attr('src', toggleMinus).parents('tr').siblings().fadeIn('fast'); }else{ $(this).attr('src', togglePlus).parents('tr').siblings().fadeOut('fast'); }; }); }) </script>