<?php
include "../../inc/inc.koneksi.php";

$kode	= $_POST['kode'];
$exp	= explode(";",$kode);
$kodeju	= $exp['0'];
$nourut	= $exp['1'];

$sql= mysql_query("SELECT * FROM jurnalum WHERE kode_ju='$kodeju' AND no_urut= '$nourut'");
$r	=mysql_fetch_array($sql);
$kodedk = $r['kode_dk'];
if ($kodedk=='D') $jumlah=$r['debet'];
else $jumlah=$r['kredit'];
$data['nourut']	= $r['no_urut'];
$data['noakun']	= $r['noakun'];
$data['nobp']	= $r['nobp'];
$data['naakun']	= $r['naakun'];
$data['namabp']	= $r['namabp'];
$data['kodecab']= $r['kode_cab'];
$data['ket']	= $r['keterangan'];
$data['jumlah']	= $jumlah;
$data['posting']= $r['posting'];
echo json_encode($data);
?>