SELECT
c.name,
c.socialName,
c.street,
c.fi,
c.city,
r.invoiceFk,
r.amountPaid,
r.payed
FROM client c
JOIN receipt r ON r.clientFk = c.id
WHERE r.id = ?