feat: comprobaciones facturas contabilizadas refs #6932
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-02-23 18:15:07 +01:00
parent 55bc6418f5
commit 4cc950011e
1 changed files with 1 additions and 2 deletions

View File

@ -21,10 +21,9 @@ BEGIN
END IF;
IF NOT (NEW.awbFk <=> OLD.awbFk) THEN
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
FROM travel t
JOIN entry e ON e.travelFk =t.id
JOIN entry e ON e.travelFk = t.id
JOIN invoiceIn ii ON ii.id = e.invoiceInFk
WHERE t.id = NEW.id
AND ii.isBooked;