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

19 lines
463 B
MySQL
Raw Permalink Normal View History

2022-10-18 12:58:38 +00:00
SELECT
2022-12-16 09:36:18 +00:00
i.supplierRef,
2022-10-18 12:58:38 +00:00
s.id supplierId,
i.issued,
2022-10-18 12:58:38 +00:00
s.name,
s.street AS postalAddress,
2023-08-18 09:52:04 +00:00
s.city,
s.postCode,
pr.name province,
2022-10-18 12:58:38 +00:00
s.nif,
2022-10-19 13:15:54 +00:00
s.phone,
2022-10-25 06:19:56 +00:00
p.name payMethod
2022-10-17 13:13:27 +00:00
FROM invoiceIn i
JOIN supplier s ON s.id = i.supplierFk
JOIN company c ON c.id = i.companyFk
2022-10-19 13:15:54 +00:00
JOIN payMethod p ON p.id = s.payMethodFk
2023-08-18 09:52:04 +00:00
LEFT JOIN province pr ON pr.id = s.provinceFk
2022-10-17 13:13:27 +00:00
WHERE i.id = ?