kr.nama kategorirekening, r.kode, r.nama, kr.jenis, IFNULL(sr.nominal,0)nominal FROM keu_detilrekening r LEFT JOIN keu_saldorekening sr ON sr.rekening = r.replid LEFT JOIN keu_kategorirekening kr ON kr.replid = r.kategorirekening LEFT JOIN keu_tahunbuku tb ON tb.replid =sr.tahunbuku WHERE sr.replid =' . $_POST['replid']; // print_r($s);exit(); $e = mysql_query($s); $r = mysql_fetch_assoc($e); $out = json_encode(array('tahunbuku' => $r['tahunbuku'], 'kategorirekening' => $r['kategorirekening'], 'kode' => $r['kode'], 'nama' => $r['nama'], 'jenis' => jenisRek($r['jenis']), 'nominal' => $r['nominal'])); break; // ambiledit ----------------------------------------------------------------- // cmbkategorirek ----------------------------------------------------------------- // ambiledit ----------------------------------------------------------------- // cmbkategorirek ----------------------------------------------------------------- case 'cmbkategorirek': $w = ''; if (isset($_POST['replid'])) { $w = 'where replid =' . $_POST['replid']; } else { if (isset($_POST[$mnu])) { $w = 'where ' . $mnu . '=' . $_POST[$mnu]; } } $s = ' SELECT *
function jenisRek2($rek) { $ret = '<b class="fg-' . ($rek == 'd' ? 'green' : 'red') . '">' . jenisRek($rek) . '</b>'; return $ret; }