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

$kode	= $_POST[kode];
$sql 		= mysql_query("SELECT tanggal,kode_sp,nama_sp,nama_dv,nopol,sum(jml_unit) as tunit,sum(jumlah) as tjumlah FROM faktur_sj WHERE kode_pj= '$kode' GROUP BY kode_pj");
$r			= mysql_fetch_assoc($sql);

$tgl			= $r[tanggal];
$kodesp 	= $r[kode_sp];
$namasp 	= $r[nama_sp];
$namadv 	= $r[nama_sv];
$nopol  	= $r[nopol];
$tunit  		= $r[tunit];
$total  		= $r[tjumlah];
echo json_encode($data);
?>