Beispiel #1
0
            $operation['message'] = "Se encontraron " . count($operation['result']) . " registros.";
        } else {
            $operation['message'] = "No se encuentran registros con los parametros ingresados.";
        }
        echo json_encode($operation);
    }
    if ($get->instanciar) {
        $get->tipo = base64_decode($get->tipo);
        $conexion = new Conexion();
        if ($get->tipo == "NATURAL") {
            $get->numero_documento = base64_decode($get->numero_documento);
            $tercero = new Tercero();
            $tercero->instanciarSubID($get->numero_documento, $get->tipo, $conexion);
            $_SESSION['tercero'] = serialize($tercero);
            $persona = $tercero->getPersona();
            $operation['message'] = "Se cargo correctamente la información.";
        } else {
            if ($get->tipo == "JURIDICA") {
                $get->nit = base64_decode($get->nit);
                $tercero = new Tercero();
                $tercero->instanciarSubID($get->nit, $get->tipo, $conexion);
                $_SESSION['tercero'] = serialize($tercero);
                $empresa = $tercero->getEmpresa();
                $operation['message'] = "Se cargo correctamente la información.";
            }
        }
        $operation["ejecution"] = true;
        $operation['result'] = true;
        echo json_encode($operation);
    }
}