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

$kode= $_POST['kode'];

$sql = mysql_query("SELECT sum(jumlah) as tjumlah,sum(hpp) as thpp FROM faktur_pj WHERE kode_pj= '$kode' ");
$row = mysql_num_rows($sql);

if ($row>0){
	$r=mysql_fetch_assoc($sql);
	$data['total']	= $r['tjumlah'];
	$data['tothpp']	= $r['thpp'];	
	echo json_encode($data);
}else{
	$data['total']	= 0;
	$data['tothpp']	= 0;
	echo json_encode($data);
}
?>
