fix: refs #7829 Error al calcular problemas de componentes #2828
|
@ -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
|
||||
|
|
|
@ -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 ;
|
Loading…
Reference in New Issue
Quitar espacio