fix: refs #7829 Error al calcular problemas de componentes #2828

Merged
carlosap merged 2 commits from 7829-Error-calcular-problemas-componentes into master 2024-08-02 09:45:08 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 29a50caaca - Show all commits

View File

@ -103,7 +103,8 @@ BEGIN
JOIN agencyMode am ON am.id = t.agencyModeFk
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
LEFT JOIN component c ON c.id = sc.componentFk AND c.isRequired
LEFT JOIN component c ON c.id = sc.componentFk
AND c.isRequired
WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP')
AND s.quantity > 0
GROUP BY s.id

View File

@ -4,7 +4,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRi
)
BEGIN
/**
* Updates future ticket risk for a client
* Updates future ticket risk for a client.
*
* @param vClientFk Id client
*/
@ -14,7 +14,8 @@ BEGIN
SELECT id
FROM ticket
WHERE clientFk = vClientFk
AND shipped >= util.VN_CURDATE();
AND shipped >= util.VN_CURDATE()
AND refFk IS NULL;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
@ -29,7 +30,6 @@ BEGIN
CALL vn.ticket_setProblemRisk(vTicketFk);
END LOOP;
Review

Quitar espacio

Quitar espacio
CLOSE vTickets;
END$$
DELIMITER ;