warmFix change if
gitea/salix/pipeline/pr-test This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-06-14 09:43:10 +02:00
parent 31c4ace76c
commit 189c67bd2d
3 changed files with 39 additions and 10 deletions

View File

@ -767,7 +767,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF
(35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL),
(36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL),
(37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL);
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
VALUES
(1, 11, 1, 'ready'),
@ -3841,7 +3841,7 @@ INSERT INTO `vn`.`ledgerConfig` SET
INSERT INTO vn.sectorCollection
SET id = 2,
userFk = 18,
sectorFk = 1;
sectorFk = 1;
INSERT INTO vn.sectorCollectionSaleGroup
SET id = 8,
@ -3855,9 +3855,39 @@ INSERT INTO vn.saleGroup (userFk, parkingFk, sectorFk, ticketFk)
INSERT INTO vn.sectorCollection
SET id = 3,
userFk = 18,
sectorFk = 1;
sectorFk = 1;
INSERT INTO vn.sectorCollectionSaleGroup
SET id = 9,
sectorCollectionFk = 3,
saleGroupFk = 6;
saleGroupFk = 6;
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(2, 1, '2001-05-08', 1, 1);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(3, 1, '2001-05-09', 1, 1);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(4, 1, '2001-05-10', 1, 1);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(5, 1, '2001-05-11', 1, 1);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(6, 1, '2001-05-14', 1, 5);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(7, 1, '2001-05-15', 1, 5);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(8, 1, '2001-05-16', 1, 5);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(9, 1, '2001-05-17', 1, 5);
INSERT INTO vn.calendarHolidays
(id, calendarHolidaysTypeFk, dated, calendarHolidaysNameFk, workCenterFk)
VALUES(10, 1, '2001-05-18', 1, 5);

View File

@ -229,8 +229,8 @@
"InvoiceIn is already booked": "InvoiceIn is already booked",
"This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency",
"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 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
}
});
if (holiday && isFestive)
if ((holiday && isFestive) && (workCenter.workcenterFk === holiday.workCenterFk))
throw new UserError(`Cannot add holidays on this day`);
const absence = await models.Calendar.create({