7691-testToMaster #2703

Merged
alexm merged 268 commits from 7691-testToMaster into master 2024-07-09 05:38:28 +00:00
1 changed files with 3 additions and 13 deletions
Showing only changes of commit 9b21cd5eb1 - Show all commits

View File

@ -1,5 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaInvoiceInBooking`(vDuaFk INT)
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaInvoiceInBooking`(
vDuaFk INT
)
BEGIN
/**
* Genera el asiento de un DUA y marca las entradas como confirmadas
@ -22,18 +24,6 @@ BEGIN
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
UPDATE invoiceIn ii
JOIN entry e ON e.invoiceInFk = ii.id
JOIN duaEntry de ON de.entryFk = e.id
JOIN dua d ON d.id = de.duaFk
SET ii.booked = IFNULL(ii.booked, d.booked),
ii.operated = IFNULL(ii.operated, d.operated),
ii.issued = IFNULL(ii.issued, d.issued),
ii.bookEntried = IFNULL(ii.bookEntried, d.bookEntried),
e.isBooked = TRUE,
e.isConfirmed = TRUE
WHERE d.id = vDuaFk;
SELECT ASIEN INTO vBookEntry FROM dua WHERE id = vDuaFk;
IF vBookEntry IS NULL THEN