fix: no mostraba la factura rectificada correcta
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-03-03 12:31:20 +01:00
parent 73c988b18e
commit 8ac575419a
2 changed files with 15 additions and 11 deletions

View File

@ -54,3 +54,6 @@
<vn-popup vn-id="summary">
<vn-invoice-out-summary invoice-out="$ctrl.invoiceOut"></vn-invoice-out-summary>
</vn-popup>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>

View File

@ -1,10 +1,11 @@
SELECT
io.amount,
io.ref,
io.issued,
io2.amount,
io2.ref,
io2.issued,
ict.description
FROM invoiceOut io
JOIN invoiceCorrection ic ON ic.correctingFk = io.id
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
JOIN invoiceOut io2 ON io2.id = ic.correctedFk
LEFT JOIN ticket t ON t.refFk = io.ref
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
WHERE io.ref = ?