refs #6921 feat: addFromDelivery
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Sergio De la torre 2024-04-17 13:57:56 +02:00
parent 32e2827287
commit 3f291da02c
1 changed files with 6 additions and 13 deletions

View File

@ -1,20 +1,13 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(vTicketFk INT, vDescription TEXT, vCode VARCHAR(45)) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`addNoteFromDelivery`(idTicket INT,nota TEXT)
BEGIN BEGIN
/** DECLARE observationTypeFk INT DEFAULT 3; /*3 = REPARTIDOR*/
* Inserta observaciones para los tickets
* INSERT INTO ticketObservation(ticketFk,observationTypeFk,description)
* @param vTicketFk Identificador del ticket VALUES (idTicket,observationTypeFk,nota)
* @param vDescription Texto de la nota a insertar ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' ');
* @param vCode Identificador del tipo de nota
*/
INSERT INTO ticketObservation(ticketFk, observationTypeFk, description)
SELECT vTicketFk, id, vDescription
FROM vn.observationType
WHERE code = vCode
ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description, VALUES(description),' ');
END$$ END$$
DELIMITER ; DELIMITER ;