<?php  
	include "conexion.php";
	include "insertar_log.php";
	$id_aplicacion = "0";

	$datos = " Ingresa a obtener_empresas_reembolso_no_facturables ";	
		insertarLog($datos,$id_aplicacion);
	
	$sentencia = $conexion->prepare("select id_empresa_reembolso,nombre from empresas_reembolso where facturable=0 and estado=1 ");
	
	
	$sentencia->execute();

	$resultado = $sentencia->get_result();
	$cont=0;

	$array = array();

	while($fila = $resultado->fetch_assoc())
	{
		$empresas_reembolso['id_empresa_reembolso']=$fila['id_empresa_reembolso'];
		$empresas_reembolso['nombre']=$fila['nombre'];
		$array[$cont] = $empresas_reembolso;
		$cont++;
	}

	$datos = " Regresa informacion de empresas_reembolso_no_facturables ";	
		insertarLog($datos,$id_aplicacion);
	echo response(0,"OK",$array);
	$sentencia->close();
	$conexion->close();


	function response($estatus,$estatus_mensaje,$respuesta){
		header("HTTP/1.1".$estatus);

		$response["estatus"]=$estatus;
		$response["estatus_mensaje"]=$estatus_mensaje;
		$response["respuesta"]=$respuesta;
		
		$json_response = json_encode($response, JSON_UNESCAPED_UNICODE);

		echo $json_response;

	}

?>