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

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

$sql = mysql_query("SELECT * FROM faktur_pb WHERE kode_pb= '$kodepb' AND no_urut='$nourut'");
$r	= mysql_fetch_assoc($sql);
$data['nourut']	= $r[no_urut];
$data['kodest']	= $r[kode_st];
$data['namast']	= $r[nama_st];
$data['barcode']= $r[barcode];
$data['satuan']	= $r[satuan];
$data['jmlunit']	= $r[jml_unit];
$data['hgbruto']	= $r[hg_bruto];
$data['ppn']		= $r[ppn];
$data['hgbeli']	= $r[hg_beli];
$data['hgjual']	= $r[hg_jual];
$data['jumlah']	= $r[jumlah];
echo json_encode($data);
?>