<?php
include('../../../php/sessionStart.php');
include('../../../php/db/dbExec.php');
include('../../../php/functions.php');

echo buscar();

function buscar() {
    $empCod=$_SESSION['empCod'];

	# QUERYS
	$sDocProrrat = "SELECT * FROM doctose LEFT JOIN tipodoci ON doctose.de_tipo=tipodoci.td_cod 
				   WHERE de_emp='$empCod' AND de_prorsn='S' AND de_proya!='S'";

	# EJECUCION DE QUERYS
	$db = new dbExec();
	$resp["doctose"] = $db->sFetchAll($sDocProrrat);
	$db->close();

	$func = new functions();
	return $func->jsonEncodeArray($resp, "doctose");
}
?>