14 lines
424 B
MySQL
14 lines
424 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(idTicket INT,nota TEXT)
|
||
|
BEGIN
|
||
|
|
||
|
DECLARE observationTypeFk INT DEFAULT 3; /*3 = REPARTIDOR*/
|
||
|
|
||
|
INSERT INTO ticketObservation(ticketFk,observationTypeFk,description)
|
||
|
VALUES (idTicket,observationTypeFk,nota)
|
||
|
ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' ');
|
||
|
|
||
|
|
||
|
END$$
|
||
|
DELIMITER ;
|