2022-12-02 07:33:56 +00:00
|
|
|
SELECT
|
2023-03-03 11:31:20 +00:00
|
|
|
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
|
2023-03-03 11:31:20 +00:00
|
|
|
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
|
2023-03-03 11:31:20 +00:00
|
|
|
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
|
|
|
|
WHERE io.ref = ?
|