<?php
include "../../inc/inc.koneksi.php";
$kode	= $_POST['kode'];

$sql= mysql_query("SELECT * FROM stock WHERE kode_st= '$kode' AND kode_cab='01' ORDER BY kode_st");
$r	= mysql_fetch_assoc($sql);
$data['kodest']	= $r['kode_st'];
$data['namast']	= $r['nama_st'];
$data['barcode']= $r['barcode'];
$data['satuan']	= $r['satuan'];
$data['hgbeli']	= $r['hb_akhir'];
$data['hgjual']	= $r['hg_jual'];
$data['jmlstok']= $r['jml_stokb'];
echo json_encode($data);
?>