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 agencyMode am ON am.id = t.agencyModeFk
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
LEFT JOIN saleComponent sc ON sc.saleFk = s.id 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') WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP')
AND s.quantity > 0 AND s.quantity > 0
GROUP BY s.id GROUP BY s.id

View File

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

Quitar espacio

Quitar espacio
CLOSE vTickets; CLOSE vTickets;
END$$ END$$
DELIMITER ; DELIMITER ;