Merge pull request 'fixes #4859 export_db' (!1200) from 4859-export_db into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1200 Reviewed-by: Joan Sanchez <joan@verdnatura.es> Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
3b9cd5be09
|
@ -0,0 +1 @@
|
|||
ALTER TABLE `vn`.`entry` DROP COLUMN `ref`;
|
File diff suppressed because one or more lines are too long
|
@ -60,7 +60,7 @@ INSERT INTO `vn`.`educationLevel` (`id`, `name`)
|
|||
|
||||
INSERT INTO `vn`.`worker`(`id`,`code`, `firstName`, `lastName`, `userFk`, `bossFk`)
|
||||
SELECT id,UPPER(LPAD(role, 3, '0')), name, name, id, 9
|
||||
FROM `vn`.`user`;
|
||||
FROM `account`.`user`;
|
||||
|
||||
UPDATE `vn`.`worker` SET bossFk = NULL WHERE id = 20;
|
||||
UPDATE `vn`.`worker` SET bossFk = 20 WHERE id = 1 OR id = 9;
|
||||
|
@ -105,20 +105,8 @@ INSERT INTO `account`.`mailForward`(`account`, `forwardTo`)
|
|||
VALUES
|
||||
(1, 'employee@domain.local');
|
||||
|
||||
INSERT INTO `vn`.`printer` (`id`, `name`, `path`, `isLabeler`)
|
||||
VALUES
|
||||
(1, 'printer1', 'path1', 0),
|
||||
(2, 'printer2', 'path2', 1);
|
||||
|
||||
|
||||
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`, `sectorFk`, `labelerFk`)
|
||||
VALUES
|
||||
(1106, 'LGN', 'David Charles', 'Haller', 1106, 19, 432978106, NULL, NULL),
|
||||
(1107, 'ANT', 'Hank' , 'Pym' , 1107, 19, 432978107, NULL, 1),
|
||||
(1108, 'DCX', 'Charles' , 'Xavier', 1108, 19, 432978108, 1, NULL),
|
||||
(1109, 'HLK', 'Bruce' , 'Banner', 1109, 19, 432978109, 1, 2),
|
||||
(1110, 'JJJ', 'Jessica' , 'Jones' , 1110, 19, 432978110, 2, 1);
|
||||
|
||||
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
|
||||
VALUES
|
||||
(1, 'EUR', 'Euro', 1),
|
||||
|
@ -159,6 +147,19 @@ INSERT INTO `vn`.`sector`(`id`, `description`, `warehouseFk`, `isPreviousPrepare
|
|||
(1, 'First sector', 1, 1, 'FIRST'),
|
||||
(2, 'Second sector', 2, 0, 'SECOND');
|
||||
|
||||
INSERT INTO `vn`.`printer` (`id`, `name`, `path`, `isLabeler`, `sectorFk`)
|
||||
VALUES
|
||||
(1, 'printer1', 'path1', 0, 1),
|
||||
(2, 'printer2', 'path2', 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`, `sectorFk`, `labelerFk`)
|
||||
VALUES
|
||||
(1106, 'LGN', 'David Charles', 'Haller', 1106, 19, 432978106, NULL, NULL),
|
||||
(1107, 'ANT', 'Hank' , 'Pym' , 1107, 19, 432978107, NULL, NULL),
|
||||
(1108, 'DCX', 'Charles' , 'Xavier', 1108, 19, 432978108, 1, NULL),
|
||||
(1109, 'HLK', 'Bruce' , 'Banner', 1109, 19, 432978109, 1, NULL),
|
||||
(1110, 'JJJ', 'Jessica' , 'Jones' , 1110, 19, 432978110, 2, NULL);
|
||||
|
||||
INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
||||
VALUES
|
||||
('1', 700, '01', 1, '700-01', 70001),
|
||||
|
@ -216,18 +217,18 @@ INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
|
|||
(3, 'PICKUP', 'Recogida'),
|
||||
(4, 'OTHER', 'Otros');
|
||||
|
||||
INSERT INTO `vn`.`agency`(`id`, `name`, `warehouseFk`, `bankFk__`, `warehouseAliasFk`)
|
||||
INSERT INTO `vn`.`agency`(`id`, `name`, `warehouseFk`, `warehouseAliasFk`)
|
||||
VALUES
|
||||
(1, 'inhouse pickup' , 1, 1, 1),
|
||||
(2, 'Super-Man delivery' , 1, 1, 1),
|
||||
(3, 'Teleportation device' , 1, 1, 1),
|
||||
(4, 'Entanglement' , 1, 1, 1),
|
||||
(5, 'Quantum break device' , 1, 1, 1),
|
||||
(6, 'Walking' , 1, 1, 1),
|
||||
(7, 'Gotham247' , 1, 1, 1),
|
||||
(8, 'Gotham247Expensive' , 1, 1, 1),
|
||||
(9, 'Refund' , 1, 1, 1),
|
||||
(10, 'Other agency' , 1, 1, 1);
|
||||
(1, 'inhouse pickup' , 1, 1),
|
||||
(2, 'Super-Man delivery' , 1, 1),
|
||||
(3, 'Teleportation device' , 1, 1),
|
||||
(4, 'Entanglement' , 1, 1),
|
||||
(5, 'Quantum break device' , 1, 1),
|
||||
(6, 'Walking' , 1, 1),
|
||||
(7, 'Gotham247' , 1, 1),
|
||||
(8, 'Gotham247Expensive' , 1, 1),
|
||||
(9, 'Refund' , 1, 1),
|
||||
(10, 'Other agency' , 1, 1);
|
||||
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 1 WHERE `name` = 'inhouse pickup';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 2 WHERE `name` = 'Super-Man delivery';
|
||||
|
@ -1132,11 +1133,11 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
|||
(32, 36, -92.324),
|
||||
(32, 39, 0.994);
|
||||
|
||||
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `shelve`, `visible`, `grouping`, `packing`, `userFk`)
|
||||
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`, `packing`, `userFk`)
|
||||
VALUES
|
||||
(2, 'GVC', 'A', 1, 1, 1, 1106),
|
||||
(4, 'HEJ', 'A', 1, 1, 1, 1106),
|
||||
(1, 'UXN', 'A', 2, 12, 12, 1106);
|
||||
(2, 'GVC', 1, 1, 1, 1106),
|
||||
(4, 'HEJ', 1, 1, 1, 1106),
|
||||
(1, 'UXN', 2, 12, 12, 1106);
|
||||
|
||||
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
||||
VALUES
|
||||
|
@ -1377,16 +1378,16 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO
|
|||
(7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1),
|
||||
(8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2);
|
||||
|
||||
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `ref`,`isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`)
|
||||
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`)
|
||||
VALUES
|
||||
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'Movement 1', 0, 0, '', ''),
|
||||
(2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'Movement 2', 0, 0, 'this is the note two', 'observation two'),
|
||||
(3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'Movement 3', 0, 0, 'this is the note three', 'observation three'),
|
||||
(4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'Movement 4', 0, 0, 'this is the note four', 'observation four'),
|
||||
(5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'Movement 5', 0, 0, 'this is the note five', 'observation five'),
|
||||
(6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'Movement 6', 0, 0, 'this is the note six', 'observation six'),
|
||||
(7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'Movement 7', 0, 0, 'this is the note seven', 'observation seven'),
|
||||
(8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'Movement 8', 1, 1, '', '');
|
||||
(1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, 0, '', ''),
|
||||
(2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 0, 'this is the note two', 'observation two'),
|
||||
(3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 0, 'this is the note three', 'observation three'),
|
||||
(4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 0, 'this is the note four', 'observation four'),
|
||||
(5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 0, 'this is the note five', 'observation five'),
|
||||
(6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 0, 'this is the note six', 'observation six'),
|
||||
(7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 0, 'this is the note seven', 'observation seven'),
|
||||
(8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, '', '');
|
||||
|
||||
INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWaste`, `rate`)
|
||||
VALUES
|
||||
|
@ -1406,23 +1407,23 @@ INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeF
|
|||
('HankPym', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Miscellaneous Accessories', 6, 1, '186', '0', '0.0'),
|
||||
('HankPym', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Adhesives', 7, 1, '277', '0', '0.0');
|
||||
|
||||
INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`packageFk`,`stickers`,`freightValue`,`packageValue`,`comissionValue`,`packing`,`grouping`,`groupingMode`,`location`,`price1`,`price2`,`price3`,`producer`,`printedStickers`,`isChecked`,`isIgnored`,`weight`, `created`)
|
||||
INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`packageFk`,`stickers`,`freightValue`,`packageValue`,`comissionValue`,`packing`,`grouping`,`groupingMode`,`location`,`price1`,`price2`,`price3`, `printedStickers`,`isChecked`,`isIgnored`,`weight`, `created`)
|
||||
VALUES
|
||||
(1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
|
||||
(2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 0, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, util.VN_CURDATE()),
|
||||
(4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, 0, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, 0, NULL, 0.00, 78.3, 75.6, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 30.50, 29.00, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE());
|
||||
(1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
|
||||
(2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 0, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE()),
|
||||
(4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, 0, NULL, 0.00, 7.30, 7.00, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, 0, NULL, 0.00, 78.3, 75.6, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 30.50, 29.00, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||
(9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 7.30, 7.00, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||
(15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE());
|
||||
|
||||
INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
|
||||
VALUES
|
||||
|
@ -1951,30 +1952,34 @@ INSERT INTO `vn`.`workerBusinessType` (`id`, `name`, `isFullTime`, `isPermanent`
|
|||
(100, 'INDEFINIDO A TIEMPO COMPLETO', 1, 1, 1),
|
||||
(109, 'CONVERSION DE TEMPORAL EN INDEFINIDO T.COMPLETO', 1, 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`businessCategory` (`id`, `description`, `rate`)
|
||||
VALUES
|
||||
(1, 'basic employee', 1);
|
||||
|
||||
UPDATE `vn`.`business` b
|
||||
SET `rate` = 7,
|
||||
`workerBusinessCategoryFk` = 12,
|
||||
`workerBusinessCategoryFk` = 1,
|
||||
`workerBusinessTypeFk` = 100,
|
||||
`amount` = 900.50
|
||||
WHERE b.id = 1;
|
||||
|
||||
UPDATE `vn`.`business` b
|
||||
SET `rate` = 7,
|
||||
`workerBusinessCategoryFk` = 12,
|
||||
`workerBusinessCategoryFk` = 1,
|
||||
`workerBusinessTypeFk` = 100,
|
||||
`amount` = 1263.03
|
||||
WHERE b.id = 1106;
|
||||
|
||||
UPDATE `vn`.`business` b
|
||||
SET `rate` = 7,
|
||||
`workerBusinessCategoryFk` = 12,
|
||||
`workerBusinessCategoryFk` = 1,
|
||||
`workerBusinessTypeFk` = 100,
|
||||
`amount` = 2000
|
||||
WHERE b.id = 1107;
|
||||
|
||||
UPDATE `vn`.`business` b
|
||||
SET `rate` = 7,
|
||||
`workerBusinessCategoryFk` = 12,
|
||||
`workerBusinessCategoryFk` = 1,
|
||||
`workerBusinessTypeFk` = 100,
|
||||
`amount` = 1500
|
||||
WHERE b.id = 1108;
|
||||
|
@ -2732,3 +2737,12 @@ INSERT INTO `vn`.`osTicketConfig` (`id`, `host`, `user`, `password`, `oldStatus`
|
|||
INSERT INTO `vn`.`ticketLog` (`id`, `originFk`, `userFk`, `action`, `changedModel`, `oldInstance`, `newInstance`, `changedModelId`)
|
||||
VALUES
|
||||
(1, 1, 9, 'insert', 'Ticket', '{}', '{"clientFk":1, "nickname": "Bat cave"}', 1);
|
||||
|
||||
INSERT INTO `salix`.`url` (`appName`, `environment`, `url`)
|
||||
VALUES
|
||||
('lilium', 'dev', 'http://localhost:8080/#/'),
|
||||
('salix', 'dev', 'http://localhost:5000/#!/');
|
||||
|
||||
INSERT INTO `vn`.`payDemDetail` (`id`, `detail`)
|
||||
VALUES
|
||||
(1, 1);
|
||||
|
|
13167
db/dump/structure.sql
13167
db/dump/structure.sql
File diff suppressed because it is too large
Load Diff
|
@ -41,6 +41,7 @@ dump_tables ${TABLES[@]}
|
|||
|
||||
TABLES=(
|
||||
vn
|
||||
agencyTermConfig
|
||||
alertLevel
|
||||
bookingPlanner
|
||||
businessType
|
||||
|
|
|
@ -6,7 +6,6 @@ SCHEMAS=(
|
|||
cache
|
||||
edi
|
||||
hedera
|
||||
nst
|
||||
pbx
|
||||
postgresql
|
||||
sage
|
||||
|
|
|
@ -154,8 +154,8 @@ module.exports = Self => {
|
|||
e.id,
|
||||
e.supplierFk,
|
||||
e.dated,
|
||||
e.ref reference,
|
||||
e.ref invoiceNumber,
|
||||
e.reference,
|
||||
e.invoiceNumber,
|
||||
e.isBooked,
|
||||
e.isExcludedFromAvailable,
|
||||
e.notes,
|
||||
|
|
|
@ -19,16 +19,10 @@
|
|||
"type": "date"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string",
|
||||
"mysql": {
|
||||
"columnName": "ref"
|
||||
}
|
||||
"type": "string"
|
||||
},
|
||||
"invoiceNumber": {
|
||||
"type": "string",
|
||||
"mysql": {
|
||||
"columnName": "ref"
|
||||
}
|
||||
"type": "string"
|
||||
},
|
||||
"isBooked": {
|
||||
"type": "boolean"
|
||||
|
|
|
@ -16,7 +16,6 @@ describe('AgencyTerm createInvoiceIn()', () => {
|
|||
];
|
||||
|
||||
it('should make an invoiceIn', async() => {
|
||||
pending('Include after #3638 export database');
|
||||
const tx = await models.AgencyTerm.beginTransaction({});
|
||||
const options = {transaction: tx};
|
||||
|
||||
|
|
|
@ -89,12 +89,12 @@ module.exports = Self => {
|
|||
ENGINE = MEMORY
|
||||
SELECT
|
||||
e.id,
|
||||
e.ref,
|
||||
e.invoiceNumber,
|
||||
e.supplierFk,
|
||||
t.shipped
|
||||
FROM vn.entry e
|
||||
JOIN vn.travel t ON t.id = e.travelFk
|
||||
JOIN buy b ON b.id = b.entryFk
|
||||
JOIN buy b ON e.id = b.entryFk
|
||||
JOIN item i ON i.id = b.itemFk
|
||||
JOIN itemType it ON it.id = i.typeFk`);
|
||||
stmt.merge(conn.makeWhere(filter.where));
|
||||
|
|
|
@ -11,7 +11,7 @@ describe('supplier consumption() filter', () => {
|
|||
};
|
||||
const result = await app.models.Supplier.consumption(ctx, filter);
|
||||
|
||||
expect(result.length).toEqual(6);
|
||||
expect(result.length).toEqual(5);
|
||||
});
|
||||
|
||||
it('should return a list of entries from the item id 1 and supplier 1', async() => {
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
<vn-td>{{::entry.id}}</vn-td>
|
||||
<vn-th field="data">Date</vn-th>
|
||||
<vn-td>{{::entry.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-th field="ref">Reference</vn-th>
|
||||
<vn-td vn-tooltip="{{::entry.ref}}">{{::entry.ref}}</vn-td>
|
||||
<vn-th field="invoiceNumber">Reference</vn-th>
|
||||
<vn-td vn-tooltip="{{::entry.invoiceNumber}}">{{::entry.invoiceNumber}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
|
||||
Total entry: Total entrada
|
||||
This supplier doesn't have a contact with an email address: Este proveedor no tiene ningún contacto con una dirección de email
|
|
@ -159,7 +159,8 @@ module.exports = Self => {
|
|||
`SELECT
|
||||
e.id,
|
||||
e.travelFk,
|
||||
e.ref,
|
||||
e.reference,
|
||||
e.invoiceNumber,
|
||||
e.loadPriority,
|
||||
s.id AS supplierFk,
|
||||
s.name AS supplierName,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
/* eslint max-len: ["error", { "code": 150 }]*/
|
||||
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('getEntries', {
|
||||
|
@ -25,7 +25,14 @@ module.exports = Self => {
|
|||
let stmt;
|
||||
|
||||
stmt = new ParameterizedSQL(`
|
||||
SELECT e.travelFk, e.id, e.isConfirmed, e.ref, e.notes, e.evaNotes AS observation,
|
||||
SELECT
|
||||
e.travelFk,
|
||||
e.id,
|
||||
e.isConfirmed,
|
||||
e.invoiceNumber,
|
||||
e.reference,
|
||||
e.notes,
|
||||
e.evaNotes AS observation,
|
||||
s.name AS supplierName,
|
||||
CAST((SUM(IF(p.volume > 0,p.volume,p.width * p.depth * IF(p.height, p.height, i.size + pconfig.upperGap))
|
||||
* b.stickers)/1000000)/((pcc.width*pcc.depth*pcc.height)/1000000) AS DECIMAL(10,2)) cc,
|
||||
|
|
|
@ -1,28 +1,34 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('travel getEntries()', () => {
|
||||
const travelId = 1;
|
||||
it('should check the response contains the id', async() => {
|
||||
const entries = await app.models.Travel.getEntries(travelId);
|
||||
const entries = await models.Travel.getEntries(travelId);
|
||||
|
||||
expect(entries.length).toEqual(1);
|
||||
expect(entries[0].id).toEqual(1);
|
||||
});
|
||||
|
||||
it('should check the response contains the travelFk', async() => {
|
||||
const entries = await app.models.Travel.getEntries(travelId);
|
||||
const entries = await models.Travel.getEntries(travelId);
|
||||
|
||||
expect(entries[0].travelFk).toEqual(1);
|
||||
});
|
||||
|
||||
it('should check the response contains the ref', async() => {
|
||||
const entries = await app.models.Travel.getEntries(travelId);
|
||||
it('should check the response contains the reference', async() => {
|
||||
const entries = await models.Travel.getEntries(travelId);
|
||||
|
||||
expect(entries[0].ref).toEqual('Movement 1');
|
||||
expect(entries[0].reference).toEqual('Movement 1');
|
||||
});
|
||||
|
||||
it('should check the response contains the invoiceNumber', async() => {
|
||||
const entries = await models.Travel.getEntries(travelId);
|
||||
|
||||
expect(entries[0].invoiceNumber).toEqual('IN2001');
|
||||
});
|
||||
|
||||
it('should check the response contains the m3', async() => {
|
||||
const entries = await app.models.Travel.getEntries(travelId);
|
||||
const entries = await models.Travel.getEntries(travelId);
|
||||
|
||||
expect(entries[0].m3).toEqual(0.22);
|
||||
});
|
||||
|
|
|
@ -410,6 +410,8 @@ describe('workerTimeControl add/delete timeEntry()', () => {
|
|||
|
||||
describe('12h rest', () => {
|
||||
it('should throw an error when the 12h rest is not fulfilled yet', async() => {
|
||||
pending('https://redmine.verdnatura.es/issues/4707');
|
||||
|
||||
activeCtx.accessToken.userId = salesBossId;
|
||||
const workerId = hankPymId;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue