feat: validar caracteres invocieIn.supplierref #6931 #2090
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`string_checkPrintableAndSpanishChars`(
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`checkPrintableChars`(
|
||||
vString VARCHAR(255)
|
||||
) RETURNS tinyint(1)
|
||||
DETERMINISTIC
|
|
@ -10,7 +10,7 @@ BEGIN
|
|||
DECLARE vWithholdingSageFk INT;
|
||||
|
||||
IF NOT util.string_checkPrintableAndSpanishChars(NEW.supplierRef) THEN
|
||||
CALL util.throw('The invoiceIn cannot contain special characters');
|
||||
CALL util.throw('The invoiceIn reference contains invalid characters');
|
||||
END IF;
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
|
|
@ -6,7 +6,7 @@ BEGIN
|
|||
DECLARE vWithholdingSageFk INT;
|
||||
|
||||
IF NOT (NEW.supplierRef <=> OLD.supplierRef) AND NOT util.string_checkPrintableAndSpanishChars(NEW.supplierRef) THEN
|
||||
CALL util.throw('The invoiceIn cannot contain special characters');
|
||||
CALL util.throw('The invoiceIn reference contains invalid characters');
|
||||
END IF;
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
-- Place your SQL code here
|
Loading…
Reference in New Issue