19 lines
463 B
SQL
19 lines
463 B
SQL
SELECT
|
|
i.supplierRef,
|
|
s.id supplierId,
|
|
i.issued,
|
|
s.name,
|
|
s.street AS postalAddress,
|
|
s.city,
|
|
s.postCode,
|
|
pr.name province,
|
|
s.nif,
|
|
s.phone,
|
|
p.name payMethod
|
|
FROM invoiceIn i
|
|
JOIN supplier s ON s.id = i.supplierFk
|
|
JOIN company c ON c.id = i.companyFk
|
|
JOIN payMethod p ON p.id = s.payMethodFk
|
|
LEFT JOIN province pr ON pr.id = s.provinceFk
|
|
WHERE i.id = ?
|