18 lines
451 B
SQL
18 lines
451 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|
PROCEDURE `vn`.`ticket_getTaxDataCheckedProblem`()
|
|
BEGIN
|
|
/**
|
|
* Update the problem of tickets, depending on whether
|
|
* the client taxDataCheched is verified or not
|
|
*
|
|
*/
|
|
UPDATE tmp.ticket t
|
|
JOIN ticket ti ON ti.id = t.ticketFk
|
|
JOIN client c ON c.id = ti.clientFk
|
|
SET t.hasproblem = TRUE
|
|
WHERE c.isTaxDataChecked;
|
|
|
|
CALL ticket_setProblem('isTaxDataChecked');
|
|
END$$
|
|
DELIMITER ; |