diff --git a/services/db/install/changes/1.2-CHECK/01-ticketCalculateClon.sql b/services/db/install/changes/1.2-CHECK/01-ticketCalculateClon.sql index 163aef03d..e6a8cead9 100644 --- a/services/db/install/changes/1.2-CHECK/01-ticketCalculateClon.sql +++ b/services/db/install/changes/1.2-CHECK/01-ticketCalculateClon.sql @@ -38,7 +38,7 @@ BEGIN DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot; CREATE TEMPORARY TABLE tmp.ticketLot - SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFka + SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFk FROM sale s LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk WHERE s.ticketFk = vTicketOld GROUP BY s.itemFk; diff --git a/services/db/install/changes/1.2-CHECK/10-ACL.sql b/services/db/install/changes/1.2-CHECK/10-ACL.sql index 3566827b0..d06afe80f 100644 --- a/services/db/install/changes/1.2-CHECK/10-ACL.sql +++ b/services/db/install/changes/1.2-CHECK/10-ACL.sql @@ -11,9 +11,9 @@ INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`pri INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (107,'ItemNiche','*','WRITE','ALLOW','ROLE','marketingBoss'); INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss'); +INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (19,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss'); -INSERT INTO `ACLCopia` (`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (59,'CreditInsurance','*','READ','ALLOW','ROLE','employee'); +INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (59,'CreditInsurance','*','READ','ALLOW','ROLE','employee'); DELETE FROM `salix`.`ACL` WHERE `id`='67'; DELETE FROM `salix`.`ACL` WHERE `id`='74'; DELETE FROM `salix`.`ACL` WHERE `id`='92'; diff --git a/services/db/tests/vn/ticketCalculateClon.spec.js b/services/db/tests/vn/ticketCalculateClon.spec.js index 2467ea42a..3c7bd0c2e 100644 --- a/services/db/tests/vn/ticketCalculateClon.spec.js +++ b/services/db/tests/vn/ticketCalculateClon.spec.js @@ -39,7 +39,6 @@ describe('ticket ticketCalculateClon()', () => { stmts.push(stmt); let orderIndex = stmts.push(`SELECT * FROM vn.orderTicket WHERE ticketFk = @result`) - 1; - let angencyHourIndex = stmts.push(`SELECT * FROM tmp.agencyHourGetShipped`) - 1; stmts.push('ROLLBACK'); @@ -51,9 +50,6 @@ describe('ticket ticketCalculateClon()', () => { expect(result[orderIndex][0].orderFk).toEqual(expectedOrder); expect(result[orderIndex][0].ticketFk).toBeGreaterThan(newestTicketIdInFixtures); - expect(result[angencyHourIndex][0].warehouseFk).toEqual(1); - expect(result[angencyHourIndex][0].shipped).toBeDefined(); - expect(result[angencyHourIndex][0].landed).toBeDefined(); }); it('should add the ticket to the order containing the original ticket and generate landed value if it was null', async() => { @@ -92,7 +88,6 @@ describe('ticket ticketCalculateClon()', () => { stmts.push(stmt); let orderIndex = stmts.push(`SELECT * FROM vn.orderTicket WHERE ticketFk = @result`) - 1; - let angencyHourIndex = stmts.push(`SELECT * FROM tmp.agencyHourGetShipped`) - 1; stmts.push('ROLLBACK'); @@ -104,8 +99,5 @@ describe('ticket ticketCalculateClon()', () => { expect(result[orderIndex][0].orderFk).toEqual(expectedOrder); expect(result[orderIndex][0].ticketFk).toBeGreaterThan(newestTicketIdInFixtures); - expect(result[angencyHourIndex][0].warehouseFk).toEqual(1); - expect(result[angencyHourIndex][0].shipped).toBeDefined(); - expect(result[angencyHourIndex][0].landed).toBeDefined(); }); });