#6321 - Negative tickets #1945

Open
jsegarra wants to merge 94 commits from 6321_negative_tickets into dev
4 changed files with 12 additions and 4 deletions
Showing only changes of commit 99efdffe58 - Show all commits

View File

@ -1059,7 +1059,6 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric
(19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)), (19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
(20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)), (20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
(21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), (21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
(22, 1, 7, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
(23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()), (23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
(24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()), (24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
(25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()), (25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
@ -3123,11 +3122,12 @@ INSERT INTO `vn`.`clientSms` (`id`, `clientFk`, `smsFk`, `ticketFk`)
(4, 1103, 4, 32), (4, 1103, 4, 32),
(13, 1101, 1, NULL), (13, 1101, 1, NULL),
(14, 1101, 4, 27); (14, 1101, 4, 27);
INSERT INTO cache.stock (warehouse_id,item_id,amount) VALUES INSERT INTO cache.stock (warehouse_id,item_id,amount) VALUES
(60,1,25), (60,1,25),
(13,1,-20), (13,1,-20),
(4,1,-1000); (4,1,-1000);
-- Auto-generated SQL script #202401220930
UPDATE vn.warehouse UPDATE vn.warehouse
SET isForTicket=1 SET isForTicket=1
WHERE id=2; WHERE id=2;

View File

@ -1,4 +1,4 @@
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) INSERT IGNORE INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES VALUES
('Ticket','itemLack','READ','ALLOW','ROLE','employee'), ('Ticket','itemLack','READ','ALLOW','ROLE','employee'),
('Ticket','itemLackDetail','READ','ALLOW','ROLE','employee'), ('Ticket','itemLackDetail','READ','ALLOW','ROLE','employee'),

View File

@ -2,3 +2,5 @@ INSERT IGNORE INTO vn.observationType (`description`,code,hasNewBornMessage)
VALUES ('Sustitución','substitution',0); VALUES ('Sustitución','substitution',0);
ALTER TABLE vn.client ADD substitutionAllowed BOOL DEFAULT false NULL; ALTER TABLE vn.client ADD substitutionAllowed BOOL DEFAULT false NULL;
ALTER TABLE vn.negativeOrigin MODIFY COLUMN `type` enum('FALTAS','CONTENEDOR','ENTRADAS','OVERBOOKING', 'SUSTITUCION') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL;

View File

@ -53,7 +53,11 @@ module.exports = Self => {
cn.isRookie, cn.isRookie,
IF(sc.saleClonedFk, 1, 0 ) as turno, IF(sc.saleClonedFk, 1, 0 ) as turno,
IF(tr.saleFk , 1, 0 ) as peticionCompra, IF(tr.saleFk , 1, 0 ) as peticionCompra,
t.hour minTimed t.hour minTimed,
c.id customerId,
c.name customerName,
c.substitutionAllowed,
ot.code observationTypeCode
FROM FROM
vn.sale s vn.sale s
JOIN vn.ticket t ON t.id=s.ticketFk JOIN vn.ticket t ON t.id=s.ticketFk
@ -68,6 +72,8 @@ module.exports = Self => {
LEFT JOIN vn.alertLevel al ON al.id = st.alertLevel LEFT JOIN vn.alertLevel al ON al.id = st.alertLevel
LEFT JOIN vn.saleCloned sc ON sc.saleClonedFk = s.id LEFT JOIN vn.saleCloned sc ON sc.saleClonedFk = s.id
LEFT JOIN vn.ticketRequest tr ON tr.saleFk = s.id LEFT JOIN vn.ticketRequest tr ON tr.saleFk = s.id
LEFT JOIN vn.ticketObservation tob ON tob.ticketFk = t.id
LEFT JOIN vn.observationType ot ON ot.id = tob.observationTypeFk
WHERE WHERE
s.itemFk = ? s.itemFk = ?
AND t.landed >= util.VN_CURDATE() AND t.landed >= util.VN_CURDATE()