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

$kode	= $_POST['kode'];
$kodetk	= $_POST['kodetk'];

$exp	= explode("-",$kode);
$kodeps = $exp[0];
$nourut	= $exp[1];

$sql 	= mysql_query("SELECT * FROM jurpsb WHERE kode_tk='$kodetk' AND kode_ps='$kodeps' AND no_urut='$nourut'");

$r		= mysql_fetch_assoc($sql);
$data['nourut']	= $r[no_urut];
$data['kodest'] = $r[kode_st1];
$data['namast']	= $r[nama_st1];
$data['satuan']	= $r[satuan1];
$data['jmlunit']= $r[jml_unit1];	
$data['harga']= $r[harga1];
$data['jumlah'] = $r[jumlah];
echo json_encode($data);
?>
