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

6 lines
176 B
MySQL
Raw Permalink Normal View History

SELECT COUNT(*) AS hasIncoterms
FROM invoiceOut io
JOIN vn.invoiceOutSerial ios ON ios.code = io.serial
AND ios.taxAreaFk = 'WORLD'
WHERE io.ref = ?