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

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

$sql 	= mysql_query("SELECT * FROM jurppi WHERE kode_ppi='$kodeppi' AND no_urut= '$nourut'");
$r		= mysql_fetch_assoc($sql);
$data['nourut']	= $r['no_urut'];
$data['nofak']	= $r['nofak'];
$data['tglfak']	= $r['tgl_fak'];
$data['jmlpiut']= $r['jml_piut'];
$data['tunai']	= $r['tunai'];
$data['potongan']= $r['potongan'];
$data['sisa']	= $r['sisa'];	
echo json_encode($data);
?>