<?php

if(isset($_POST['codigo'])){
    include("../../classes/database.class.php");
    include("../../classes/documentoModel.class.php");
    $codigo = $_POST['codigo'];
    $modelo = new DocumentoModel();
	$rows = $modelo->readCodigoDocumento($codigo);

	echo json_encode($rows);
}