fix: refs #7829 Error al calcular problemas de componentes
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-08-02 11:43:30 +02:00
parent ddd5e4ffa4
commit 29a50caaca
2 changed files with 5 additions and 4 deletions

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;
CLOSE vTickets;
END$$
DELIMITER ;