2021-03-01 10:25:37 +00:00
|
|
|
SELECT
|
|
|
|
io.id,
|
|
|
|
io.issued,
|
|
|
|
io.clientFk,
|
|
|
|
io.companyFk,
|
|
|
|
io.ref,
|
|
|
|
pm.code AS payMethodCode,
|
|
|
|
cny.code companyCode,
|
|
|
|
sa.iban,
|
|
|
|
ios.footNotes
|
|
|
|
FROM invoiceOut io
|
|
|
|
JOIN client c ON c.id = io.clientFk
|
|
|
|
JOIN payMethod pm ON pm.id = c.payMethodFk
|
|
|
|
JOIN company cny ON cny.id = io.companyFk
|
|
|
|
JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk
|
|
|
|
LEFT JOIN invoiceOutSerial ios ON ios.code = io.serial
|
2022-07-21 08:05:37 +00:00
|
|
|
LEFT JOIN ticket t ON t.refFk = io.ref
|
|
|
|
WHERE t.refFk = ?
|