Merge branch 'dev' into 6701-claimRatioRoutine
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-06-17 07:42:33 +00:00
commit 43df0ef55d
5 changed files with 33 additions and 31 deletions

View File

@ -3868,3 +3868,17 @@ INSERT INTO vn.sectorCollectionSaleGroup
SET id = 9, SET id = 9,
sectorCollectionFk = 3, sectorCollectionFk = 3,
saleGroupFk = 6; saleGroupFk = 6;
INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES
(1, '2001-05-08', 1, 1),
(1, '2001-05-09', 1, 1),
(1, '2001-05-10', 1, 1),
(1, '2001-05-11', 1, 1),
(1, '2001-05-14', 1, 5),
(1, '2001-05-15', 1, 5),
(1, '2001-05-16', 1, 5),
(1, '2001-05-17', 1, 5),
(1, '2001-05-18', 1, 5);

View File

@ -1,7 +1,14 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`(IN vShelvingFk VARCHAR(8), IN vBarcode VARCHAR(22), IN vQuantity INT, IN vPackagingFk VARCHAR(10), IN vGrouping INT, IN vPacking INT, IN vWarehouseFk INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`(
vShelvingFk VARCHAR(8),
vBarcode VARCHAR(22),
vQuantity INT,
vPackagingFk VARCHAR(10),
vGrouping INT,
vPacking INT,
vWarehouseFk INT
)
BEGIN BEGIN
/** /**
* Añade registro o lo actualiza si ya existe. * Añade registro o lo actualiza si ya existe.
* *
@ -23,12 +30,7 @@ BEGIN
SELECT barcodeToItem(vBarcode) INTO vItemFk; SELECT barcodeToItem(vBarcode) INTO vItemFk;
IF vBuyFk IS NULL THEN IF vBuyFk IS NULL THEN
CALL cache.last_buy_refresh(FALSE); CALL util.throw('The buy is required');
SELECT buy_id INTO vBuyFk
FROM cache.last_buy
WHERE item_id = vItemFk
AND warehouse_id = vWarehouseFk;
END IF; END IF;
IF vPacking IS NULL IF vPacking IS NULL

View File

@ -1,13 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`deviceProductionConfig_afterUpdate`
AFTER UPDATE ON `deviceProductionConfig`
FOR EACH ROW
BEGIN
IF NEW.isAllUsersAllowed = 1 OR NEW.isAllUsersAllowed = -1 THEN
SET @username := (SELECT account.myUser_getName());
INSERT INTO vn.mail (receiver, subject, body)
VALUES ('cau@verdnatura.es', 'Se ha activado la autenticación sin restricciones en la app',
CONCAT('El usuario ', @username,' ha habilitado la opción para que todos los usuarios puedan acceder a la app sin restricciones'));
END IF;
END$$
DELIMITER ;

View File

@ -231,6 +231,6 @@
"You can only have one PDA": "You can only have one PDA", "You can only have one PDA": "You can only have one PDA",
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member", "Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member",
"It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated", "It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated",
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated" "It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
"Cannot add holidays on this day": "Cannot add holidays on this day"
} }

View File

@ -110,8 +110,7 @@ module.exports = Self => {
workCenterFk: workCenter.workCenterFk workCenterFk: workCenter.workCenterFk
} }
}); });
if ((holiday && isFestive) && (workCenter.workcenterFk === holiday.workCenterFk))
if (holiday && isFestive)
throw new UserError(`Cannot add holidays on this day`); throw new UserError(`Cannot add holidays on this day`);
const absence = await models.Calendar.create({ const absence = await models.Calendar.create({