Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into 6938-hotfix-rollbackHidePhone
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-05-07 11:49:31 +02:00
commit 1d9b6e489c
1 changed files with 8 additions and 5 deletions

View File

@ -28,8 +28,7 @@ BEGIN
JOIN entry e ON e.invoiceInFk = ii.id JOIN entry e ON e.invoiceInFk = ii.id
JOIN duaEntry de ON de.entryFk = e.id JOIN duaEntry de ON de.entryFk = e.id
JOIN dua d ON d.id = de.duaFk JOIN dua d ON d.id = de.duaFk
SET ii.isBooked = TRUE, SET ii.booked = IFNULL(ii.booked, d.booked),
ii.booked = IFNULL(ii.booked,d.booked),
ii.operated = IFNULL(ii.operated, d.operated), ii.operated = IFNULL(ii.operated, d.operated),
ii.issued = IFNULL(ii.issued, d.issued), ii.issued = IFNULL(ii.issued, d.issued),
ii.bookEntried = IFNULL(ii.bookEntried, d.bookEntried), ii.bookEntried = IFNULL(ii.bookEntried, d.bookEntried),
@ -71,5 +70,9 @@ BEGIN
SET ASIEN = vASIEN SET ASIEN = vASIEN
WHERE id = vDuaFk; WHERE id = vDuaFk;
UPDATE invoiceIn ii
JOIN duaInvoiceIn dii ON dii.invoiceInFk = ii.id
SET ii.isBooked = TRUE
WHERE dii.duaFk = vDuaFk;
END$$ END$$
DELIMITER ; DELIMITER ;