salix/print/templates/reports/invoice/sql/invoice.sql

16 lines
447 B
MySQL
Raw Normal View History

2021-02-17 12:00:06 +00:00
SELECT
io.issued,
io.clientFk,
io.companyFk,
io.ref,
2021-02-24 06:51:05 +00:00
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
2021-02-17 12:00:06 +00:00
JOIN company cny ON cny.id = io.companyFk
2021-02-24 06:51:05 +00:00
JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk
LEFT JOIN invoiceOutSerial ios ON ios.code = io.serial
2021-02-17 12:00:06 +00:00
WHERE io.id = ?