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

$kode 	= $_POST['kode'];
$sql	= mysql_query("SELECT sum(jumlah1) as tjumlah1,sum(jumlah2) as tjumlah2 FROM jurpsb WHERE kode_psb='$kode' AND !(concat(substr(kode_st1,1,3))='040') GROUP BY kode_psb");
$r	   	= mysql_fetch_assoc($sql);
$selisih= $r['tjumlah1']-$r['tjumlah2'];
$data['tjumlah2']	= $r['tjumlah2'];
$data['tselisih']	= $selisih;
echo json_encode($data);
?>