SELECT  
    io.issued, 
    io.clientFk,
    io.companyFk,
    io.ref,
    cny.code companyCode
FROM vn.invoiceOut io
    JOIN vn.client c ON c.id = io.clientFk
    JOIN company cny ON cny.id = io.companyFk
WHERE io.id =  ?