function get_record() { $valid_fields = array('id', 'code', 'name', 'tanggal'); $this->flexigrid->validate_post('id', 'DESC', $valid_fields); $records = $this->get_flexigrid(); $this->output->set_header($this->config->item('json_header')); $record_items = array(); foreach ($records['records']->result() as $row) { /* if($row->status=='y'){$status='Aktif';} elseif($row->status=='n'){$status='Tidak Aktif';} elseif($row->status=='s'){$status='Suspended';}*/ $record_items[] = array($row->id, $row->id, $row->id, $row->number, GetValue('name', 'sv_setup_coa', array('id' => 'where/' . $row->dari)), GetValue('name', 'sv_setup_coa', array('id' => 'where/' . $row->ke)), $row->tanggal, uang($row->amount)); } return $this->output->set_output($this->flexigrid->json_build($records['record_count'], $record_items)); }
function get_record() { $valid_fields = array('id', 'number', 'amount', 'from', 'memo', 'save_type', 'dates'); $this->flexigrid->validate_post('id', 'DESC', $valid_fields); $records = $this->get_flexigrid(); $this->output->set_header($this->config->item('json_header')); $record_items = array(); foreach ($records['records']->result() as $row) { /* if($row->status=='y'){$status='Aktif';} elseif($row->status=='n'){$status='Tidak Aktif';} elseif($row->status=='s'){$status='Suspended';}*/ $record_items[] = array($row->id, $row->id, $row->id, $row->number, $row->dates, uang($row->amount), $row->from, $row->memo, $row->save_type); } return $this->output->set_output($this->flexigrid->json_build($records['record_count'], $record_items)); }
<td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong><?php echo uang(round($dpptot)); ?> </strong></td> <td><strong><?php echo $distot; ?> </strong></td> <td><strong><?php echo $ppntot; ?> </strong></td> <td><strong><?php echo uang($tot); ?> </strong></td> </tr> </tbody> </table> <?php } } ?> </body> </html>
// jika tidak - bikin 1 recordnya } else { $sql = "INSERT INTO barang (idBarang, namaBarang, idKategoriBarang, idSatuanBarang, jumBarang, hargaJual,\n\t\t\t\t\t\t\t\t\t last_update, idSupplier, barcode, username, idRak)\n\t\t\t\t\t\tVALUES ({$idBarang}, '" . $_POST["namabarang{$ctr}"] . "', {$idKategoriBarang}, {$idSatuanBarang},\n\t\t\t\t\t\t\t" . $_POST["jumlah{$ctr}"] . ", " . $_POST["rrp{$ctr}"] . ", '{$tgl}',\n\t\t\t\t\t\t\t{$idSupplier}, '" . $_POST["barcode{$ctr}"] . "', '{$_SESSION['uname']}', '999')"; $hasil = mysql_query($sql); echo "<br />### Menambahkan data barang: {$sql} <br />"; } // hitung total $totalInvoice = $totalInvoice + $_POST["jumlah{$ctr}"] * $_POST["harga{$ctr}"]; // tambahkan counter $ctr++; } // while ($ctr <= $_POST[count]) { // update nilai invoice di table transaksibeli $hasil = mysql_query("UPDATE transaksibeli SET nominal={$totalInvoice} WHERE idTransaksiBeli={$idTransaksiBeli}"); // laporkan jumlah record yang kita proses echo "<br /><h2>Jumlah item di invoice ini: " . ($ctr - 1) . " <br />\n\t\tTotal Pembelian : Rp " . uang($totalInvoice) . "</h2><br />Selesai."; break; case "buatrpo1": // =============================================================================================================== echo "<h2>Buat RPO (Rencana Purchase Order) :: Step 1</h2>\n <form method=POST action='?module=pembelian_barang&act=buatrpo2'>\n\n Supplier :\n <select name=supplierid>"; $supplier = getSupplier(); while ($dataSupplier = mysql_fetch_array($supplier)) { echo "<option value={$dataSupplier['idSupplier']}>{$dataSupplier['namaSupplier']}::{$dataSupplier['idSupplier']}::{$dataSupplier['alamatSupplier']}</option>"; } echo " </select>\n\n\n <input type=submit value='Pilih Supplier'>\n </form>\n "; break; case "buatrpo2": // =============================================================================================================== findSupplier($_POST['supplierid']); echo "<h2>Buat RPO (Rencana Purchase Order) :: Step 2</h2>\n <form method=POST action='modul/js_buat_rpo.php?act=mulairpo' onSubmit=\"popupform(this, 'Buat_RPO')\">\n\n\t\t<input type=hidden name=supplierid value='" . $_POST['supplierid'] . "'>"; // cari periode delivery supplier ybs
} $transaksiBeli = detailTransaksiBeli($_GET[id]); $dataTrans = mysql_fetch_array($transaksiBeli); echo "<h2>Edit Transaksi Beli</h2>\n <table>\n <tr><td>Nomor Invoice</td><td> : </td><td>{$dataTrans['NomorInvoice']}</td><td width=10> </td>\n <td>Tgl Transaksi</td><td> : </td><td>{$dataTrans['tglTransaksiBeli']}</td></tr>\n <tr><td>No Transaksi Beli</td><td> : </td><td>{$dataTrans['idTransaksiBeli']}</td><td width=10> </td>\n <td>Nama Supplier</td><td> : </td><td>{$dataTrans['namaSupplier']}</td></tr>\n </table><br/>\n "; echo "<table>\n <tr><th>barcode</th><th>Nama Barang</th><th>Tgl Expire</th><th>Jumlah</th><th>Harga Beli</th><th>Total</th><th>AKSI</th></tr>\n "; $barangTransaksiBeli = detailBarangTransaksiBeli($dataTrans[idTransaksiBeli]); $no = 1; while ($dataBarangTrans = mysql_fetch_array($barangTransaksiBeli)) { $total = $dataBarangTrans[jumBarang] * $dataBarangTrans[hargaBeli]; //untuk mewarnai tabel menjadi selang-seling if ($no % 2 == 0) { $warna = "#EAF0F7"; } else { $warna = "#FFFFFF"; } echo "<tr bgcolor={$warna}>"; //end warna echo "<form method=POST action='?module=hutang&act=edittrans&action=update'>\n <input type=hidden name=idBarang value={$dataBarangTrans['idBarang']}>\n <input type=hidden name=idTransaksiBeli value={$_GET['id']}>\n <input type=hidden name=jumBarangLama value={$dataBarangTrans['jumBarang']}>\n <td class=td>{$dataBarangTrans['barcode']}</td>\n <td class=td>{$dataBarangTrans['namaBarang']}</td>\n <td class=td>" . tgl_indo($dataBarangTrans[tglExpire]) . "</td>\n <td class=td align=right><input type=text name=jumBarang size=10 value={$dataBarangTrans['jumBarang']}></td>\n <td class=td align=right><input type=text name=hargaBeli value={$dataBarangTrans['hargaBeli']}></td>\n <td class=td align=right>" . uang($total) . "</td>\n <td class=td align=center><input type=submit value=Update></td>\n </form>\n "; echo "</tr>"; } $nominal = nominalBeli($_GET[id]); echo "<tr><td class=td colspan=4 align=right>Total</td><td class=td colspan=2 align=right>" . uang($nominal) . "</td></tr>\n </table>"; echo "<br/><a href=?module=hutang>Kembali</a>"; break; } /* CHANGELOG ----------------------------------------------------------- 1.0.1 / 2010-06-03 : Harry Sufehmi : various enhancements, bugfixes 0.9.1 : Gregorius Arief : initial release ------------------------------------------------------------------------ */
<td valign="top"> </td> <td nowrap="" valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"><?php echo uang($sem); ?> </td> <td valign="top"><?php echo uang($hasil->total_ppn); ?> </td> <td valign="top"><?php echo uang($hasil->total_ppn + $sem); ?> </td> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> </tr> <?php $no++; } } ?> </tbody> </table> </body>
<td align="right" class="borderkirikanan"><?php echo uang($totrp); ?> </td> <td align="right" class="borderkirikanan"><?php echo uang($all); ?> (Exlude Tax)</td> </tr> <tr class="border_top_bold border_bottom"> <td width="13%">TAX 10%</td> <td colspan="4"> </td> <td align="right" class="borderkirikanan"></td> <td align="right" class="borderkirikanan"></td> <td align="right" class="borderkirikanan"><?php echo uang($all * (10 / 100)); ?> </td> </tr> </table></td> </tr> </table> <p>*Exchange rate subject to-date of payment</p> <p>*Our invoice are payable cash in full amount to PT ECSI INDONESIA by the indicated due date</p> <p>*If any discrepency kindly contact us within 7 days in writing from the days of invoices</p> <p>Account No. </p> <table width="40%" border="0" cellspacing="0" class="noatm"> <tr> <td>PT. ECSI INDONESIA</td> <td> </td> </tr>
?> </td> </tr> <tr class="border_bottom"> <td width="13%">TAX 10%</td> <td colspan="8"> </td> <td align="right" class="borderkirikanan"><?php echo uang($pajek = $alls * (10 / 100)); ?> </td> </tr> <tr class="border_bottom"> <td width="13%">TOTAL AMOUNT </td> <td colspan="8"> </td> <td align="right" class="borderkirikanan"><?php echo uang($alls + $pajek); ?> </td> </tr> </table></td> </tr> </table> <p>*Exchange rate subject to-date of payment</p> <p>*Our invoice are payable cash in full amount to PT ECSI INDONESIA by the indicated due date</p> <p>*If any discrepency kindly contact us within 7 days in writing from the days of invoices</p> <p>Account No. </p> <table width="40%" border="0" cellspacing="0" class="noatm"> <tr> <td>PT. ECSI INDONESIA</td> <td> </td> </tr>
$totall += $isi['total']; } ?> <tr class="border_top_bold border_bottom"> <td>TOTAL AMOUNT </td> <td> </td> <td align="right" class="borderkirikanan"><?php echo uang($totusd); ?> </td> <td align="right" class="borderkirikanan"><?php echo uang($totrp); ?> </td> <td align="right" class="borderkirikanan"><?php echo uang($totall); ?> </td> </tr> </table></td> </tr> </table> <p>*Exchange rate subject to-date of payment</br> *Our invoice are payable cash in full amount to PT ECSI INDONESIA by the indicated due date</br> *If any discrepency kindly contact us within 7 days in writing from the days of invoices</p> <p>Account No. </p> <table width="70%" border="0" cellspacing="0" class="noatm"> <tr> <td><p>BANK BCA MATRAMAN</p> </td> <td> </td>
$totin += $in; $totout += $out; } ?> <tr> <td colspan="6"><strong>Total</strong></td> <td><strong><?php echo uang($totin); ?> </strong></td> <td><strong><?php echo uang($totout); ?> </strong></td> <td><strong><?php echo uang($idr_skrg); ?> </strong></td> </tr> </table> <p> </p> <table width="100%" border="1" cellspacing="0"> <tr class="theader"> <!--td>Code </td--> <td rowspan='2'>Akun</td> <td rowspan='2'>Date</td> <td rowspan='2'>No. Voucher</td> <td rowspan='2'>Person</td> <td rowspan='2'>Remark</td> <td rowspan='2'>Job Number</td>
?> </td> <td><?php echo $rin['remark']; ?> </td> </tr><?php $totdeb += $rin['debit']; $totkred += $rin['kredit']; // $totrv+=$rin['rv']; } ?> <tr> <td colspan='7'><strong>TOTAL</strong></td> <td><strong><?php echo uang($totdeb); ?> </strong></td> <td><strong><?php echo uang($totkred); ?> </strong></td> <!--td><?php echo uang($totrv); ?> </td--> <td colspan='3'></td> </tr> </table> <p> </p>
$all += $isi['total']; } ?> <tr class="border_top_bold border_bottom"> <td colspan="3">TOTAL AMOUNT </td> <td colspan="4"> </td> <td align="right" class="borderkirikanan"></td> <td align="right" class="borderkirikanan"></td> <td align="right" class="borderkirikanan"><?php echo uang($totrp); ?> </td> <td align="right" class="borderkirikanan">0</td> <td align="right" class="borderkirikanan">0</td> <td align="right" class="borderkirikanan"><?php echo uang($all); ?> </td> <td align="right" class="borderkirikanan"> </td> </tr> </table></td> </tr> </table> <p> </p> <table width="20%" border="0" cellspacing="0" style="float:right;"> <tr class="border_top"> <td align="center"> </td> </tr> </table> <p> </p>
<td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="4">TOTAL</td> <td align="right"><?php echo uang($perolehan + $kperolehan + $gperolehan); ?> </td> <td> </td> <td align="right"><?php echo uang($beban + $kbeban + $gbeban); ?> </td> <td align="right"><?php echo uang($akumulasi + $kakumulasi + $gakumulasi); ?> </td> <td align="right"><?php echo uang($nilai_buku + $knilai_buku + $gnilai_buku); ?> </td> </tr> </table> </body> </html>
<td><?php echo uang($tot); ?> </td> <td><?php echo uang($fee); ?> </td> </tr><?php $a++; $allpro += $cp['profit']; $alllos += $cp['loss']; $alltot += $tot; $allfee += $fee; } ?> <tr><td colspan='5'><strong>Total</strong></td><td><strong><?php echo uang($allpro); ?> </strong></td><td><strong><?php echo uang($alllos); ?> </strong></td><td><strong><?php echo uang($alltot); ?> </strong></td><td><strong><?php echo uang($allfee); ?> </strong></td></tr> </table>
<td> <?php echo $o['b_tax_amount']; ?> </td> </tr> <?php } ?> <tr class="border_top"> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong><?php echo uang($in_idr); ?> </strong></td> <td> </td> </tr> </table></td> </tr> <tr> <td colspan="5"><table width="100%" border="0"> <tr> <td colspan="6">COST - IDR </td> </tr> <tr class="border_bottom"> <td>Description</td> <td>Item</td> <td>Metric</td>
//$profit=$totun-$totrug; ?> <tr> <td> </td> <td> </td> <td>Total</td> <td>Rp <?php echo uang($totob2); ?> </td> </tr> <tr> <td> </td> <td> </td> <td>Total Asset </td> <td>Rp <?php echo uang($totaktiva1 + $totaktiva2); ?> </td> </tr> <tr> <td> </td> <td> </td> <td>Total Obligation and Equity</td> <td><?php echo uang($totob1 + $totob2); ?> </td> </tr> </table>
$percentage = round($profit / $totun * 100); ?> <tr> <td> </td> <td> </td> <td>Total</td> <td>Rp <?php echo uang($totrug); ?> </td> </tr> <tr> <td> </td> <td> </td> <td>Total Profit </td> <td>Rp <?php echo uang($profit); ?> </td> </tr> <tr> <td> </td> <td> </td> <td>Total Profit Percent </td> <td><?php echo $percentage; ?> %</td> </tr> </table>
while ($x = mysql_fetch_array($hasil)) { if ($ctr % 2 == 0) { $warna = "#EAF0F7"; } else { $warna = "#FFFFFF"; } echo "<tr bgcolor={$warna}>"; //end warna echo "<td class=td>{$ctr}</td>\n <td class=td>\t\t{$x['idBarang']}</td>\n <td class=td>\t\t{$x['barcode']}</td>\n <td class=td>\t\t{$x['namaBarang']}</td>\n <td class=td align=center>\t{$x['jumRetur']}</td>\n <td class=td align=right>" . uang($x[hargaBeli]) . "</td>"; echo "</tr>"; $ctr++; $nominal = $x[nominal]; $username = $x[username]; } // while ($x = mysql_fetch_array($hasil)) echo "</table><br />\n\t\tTOTAL : " . uang($nominal) . " <br />(username: {$username})\n\t"; } elseif (isset($_POST['download'])) { // echo 'Download CSV'; // format isi file CSV : // $data[0] = barcode // $data[1] = idBarang - ignored // $data[2] = namaBarang - JOIN ke tabel barang // $data[3] = jumlah Barang / jumBarang - jumRetur // $data[4] = hargaBeli // $data[5] = hargaJual (di Gudang) - ignored // $data[6] = RRP (Recommended Retail Price) - ignored // $data[7] = namaSatuanBarang - ignored // $data[8] = namaKategoriBarang - ignored // $data[9] = Supplier - ignored // $data[10] = username - ignored // persiapan membuat output file CSV
<?php } ?> <tr> <td colspan="7"><strong>TOTAL</strong></td> <!--td> </td> <td> </td--> <td><strong><?php echo uang($allsal); ?> </strong></td> <td><strong><?php echo uang($allcost); ?> </strong></td> <td><strong><?php echo uang($allrent); ?> </strong></td> <!--td> </td--> <td><strong><?php echo uang($alltotcost); ?> </strong></td> <td><strong><?php echo uang($allprofit); ?> </strong></td> </tr> </table>