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

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

$tgl			= $r[tanggal];
$nomorsa	= $r[nomor_sa];
$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);
?>