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

12 lines
333 B
MySQL
Raw Normal View History

2022-12-02 07:33:56 +00:00
SELECT
io2.amount,
io2.ref,
io2.issued,
2021-02-24 06:51:05 +00:00
ict.description
2022-12-02 07:33:56 +00:00
FROM invoiceOut io
JOIN invoiceCorrection ic ON ic.correctingFk = io.id
JOIN invoiceOut io2 ON io2.id = ic.correctedFk
2022-07-21 08:05:37 +00:00
LEFT JOIN ticket t ON t.refFk = io.ref
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
WHERE io.ref = ?