refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
3 changed files with 6 additions and 19 deletions
Showing only changes of commit f0d4ae604b - Show all commits

View File

@ -23,9 +23,6 @@ BEGIN
DECLARE vOldPrice DECIMAL(10,2);
DECLARE vOption INT DEFAULT NULL;
DECLARE vNewSaleFk INT;
DECLARE vChangePrice INT DEFAULT 1;
DECLARE vBuyerDiscount INT DEFAULT 4;
DECLARE vManaDiscount INT DEFAULT 3;
DECLARE vForceToGrouping INT DEFAULT 1;
DECLARE vForceToPacking INT DEFAULT 2;
DECLARE vFinalPrice DECIMAL(10,2);
@ -85,16 +82,13 @@ BEGIN
IF vNewPrice IS NULL THEN
CALL util.throw('price retrieval failed');
END IF;
IF vNewPrice > vOldPrice THEN
SET vFinalPrice = vOldPrice;
IF worker_isInDepartment('vt') THEN
SET vOption = vManaDiscount;
ELSE
SET vOption = vBuyerDiscount;
END IF;
SET vOption = 'substitution';
ELSE
SET vFinalPrice = vNewPrice;
SET vOption = vChangePrice;
SET vOption = 'renewPrices';
END IF;
START TRANSACTION;

View File

@ -1,14 +1,5 @@
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_replaceItem`() BEGIN END;
GRANT EXECUTE ON PROCEDURE `vn`.`sale_replaceItem` TO `employee`;
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`worker_isInDepartment`()
RETURNS int(11)
DETERMINISTIC
BEGIN
RETURN 1;
END$$
DELIMITER ;
GRANT EXECUTE ON PROCEDURE `vn`.`sale_replaceItem` TO `employee`;
GRANT EXECUTE ON FUNCTION `vn`.`worker_isInDepartment` TO `employee`;
FLUSH PRIVILEGES;

View File

@ -0,0 +1,2 @@
INSERT IGNORE INTO vn.component (id, name, typeFk, classRate, tax, isRenewable, code, isRequired)
VALUES(49, 'sustitución', 4, NULL, NULL, 1, 'substitution', FALSE);