Merge branch 'dev' into 4919-module_code
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
279456b377
|
@ -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);
|
||||
|
|
12697
db/dump/structure.sql
12697
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
|
|
@ -11,7 +11,12 @@ module.exports = Self => {
|
|||
required: true,
|
||||
description: 'The ticket id',
|
||||
http: {source: 'path'}
|
||||
},
|
||||
}, {
|
||||
arg: 'labelCount',
|
||||
type: 'number',
|
||||
required: false,
|
||||
description: 'The number of labels'
|
||||
}
|
||||
],
|
||||
returns: [
|
||||
{
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
const {Report} = require('vn-print');
|
||||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('expeditionPalletLabel', {
|
||||
description: 'Returns the expedition pallet label',
|
||||
accessType: 'READ',
|
||||
accepts: [
|
||||
{
|
||||
arg: 'id',
|
||||
type: 'number',
|
||||
required: true,
|
||||
description: 'The pallet id',
|
||||
http: {source: 'path'}
|
||||
}, {
|
||||
arg: 'userFk',
|
||||
type: 'number',
|
||||
required: true,
|
||||
description: 'The user id'
|
||||
}
|
||||
],
|
||||
returns: [
|
||||
{
|
||||
arg: 'body',
|
||||
type: 'file',
|
||||
root: true
|
||||
}, {
|
||||
arg: 'Content-Type',
|
||||
type: 'String',
|
||||
http: {target: 'header'}
|
||||
}, {
|
||||
arg: 'Content-Disposition',
|
||||
type: 'String',
|
||||
http: {target: 'header'}
|
||||
}
|
||||
],
|
||||
http: {
|
||||
path: '/:id/expedition-pallet-label',
|
||||
verb: 'GET'
|
||||
}
|
||||
});
|
||||
|
||||
Self.expeditionPalletLabel = async(ctx, id) => {
|
||||
const args = Object.assign({}, ctx.args);
|
||||
const params = {lang: ctx.req.getLocale()};
|
||||
|
||||
delete args.ctx;
|
||||
for (const param in args)
|
||||
params[param] = args[param];
|
||||
|
||||
const report = new Report('expedition-pallet-label', params);
|
||||
const stream = await report.toPdfStream();
|
||||
|
||||
return [stream, 'application/pdf', `filename="doc-${id}.pdf"`];
|
||||
};
|
||||
};
|
|
@ -37,4 +37,5 @@ module.exports = function(Self) {
|
|||
require('../methods/ticket/merge')(Self);
|
||||
require('../methods/ticket/isRoleAdvanced')(Self);
|
||||
require('../methods/ticket/collectionLabel')(Self);
|
||||
require('../methods/ticket/expeditionPalletLabel')(Self);
|
||||
};
|
||||
|
|
|
@ -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
|
@ -13,11 +13,12 @@ html {
|
|||
font-size: 29px;
|
||||
margin-left: -13px;
|
||||
}
|
||||
.outline {
|
||||
#outline {
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
height: 37px;
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
}
|
||||
#nickname {
|
||||
font-size: 22px;
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><div v-html="getBarcode(labelData.ticketFk)" id="barcode"></div></td>
|
||||
<td class="outline">{{labelData.workerCode || '---'}}</td>
|
||||
<td id="outline" class="ellipsize">{{labelData.workerCode || '---'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="outline">{{labelData.labelCount || 0}}</td>
|
||||
<td id="outline" class="ellipsize">{{labelCount || labelData.labelCount || 0}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="outline">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
||||
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="agencyDescripton" class="ellipsize">{{labelData.agencyDescription ? labelData.agencyDescription.toUpperCase() : '---'}}</div></td>
|
||||
|
|
|
@ -11,6 +11,11 @@ module.exports = {
|
|||
type: Number,
|
||||
required: true,
|
||||
description: 'The ticket or collection id'
|
||||
},
|
||||
labelCount: {
|
||||
type: Number,
|
||||
required: false,
|
||||
description: 'The number of labels'
|
||||
}
|
||||
},
|
||||
async serverPrefetch() {
|
||||
|
|
|
@ -12,8 +12,8 @@ SELECT c.itemPackingTypeFk code,
|
|||
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
|
||||
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
|
||||
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||
t.nickName,
|
||||
tt.labelCount,
|
||||
t.nickName,
|
||||
COUNT(*) lineCount
|
||||
FROM vn.ticket t
|
||||
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||
|
||||
const path = require('path');
|
||||
const vnPrintPath = path.resolve('print');
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${vnPrintPath}/common/css/spacing.css`,
|
||||
`${vnPrintPath}/common/css/misc.css`,
|
||||
`${vnPrintPath}/common/css/layout.css`,
|
||||
`${vnPrintPath}/common/css/report.css`,
|
||||
`${__dirname}/style.css`])
|
||||
.mergeStyles();
|
|
@ -0,0 +1,62 @@
|
|||
html {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
font-size: 25px;
|
||||
}
|
||||
#truck {
|
||||
width: 100%;
|
||||
max-width: 150px;
|
||||
height: 90px;
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-size: 50px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.mainTable {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 10px solid;
|
||||
border-radius: 20px;
|
||||
-moz-border-radius: 20px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
.zoneTable{
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#routeFk, #zone, #labels{
|
||||
font-size: 30px;
|
||||
}
|
||||
#routeFk{
|
||||
width: 120px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
max-width: 120px;
|
||||
text-align: center;
|
||||
}
|
||||
#zone{
|
||||
width: 305px;
|
||||
max-width: 305px;
|
||||
text-align: center;
|
||||
}
|
||||
#labels{
|
||||
text-align: center;
|
||||
}
|
||||
#black {
|
||||
background-color: rgb(102, 102, 102);
|
||||
color: white;
|
||||
}
|
||||
#QR {
|
||||
padding: 25px;
|
||||
padding-left: 40px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
#additionalInfo {
|
||||
padding-top: 20px;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<table class="mainTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" id="truck" class="ellipsize">{{labelData.truck || '---'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table v-for="labelData in labelsData" class="zoneTable">
|
||||
<thead>
|
||||
<tr v-if="!labelData.isMatch" id="black">
|
||||
<td id="routeFk" class="ellipsize">{{labelData.routeFk}}</td>
|
||||
<td id="zone" class="ellipsize">{{labelData.zone || '---'}}</td>
|
||||
<td id="labels" class="ellipsize">{{labelData.labels}}</td>
|
||||
</tr>
|
||||
<tr v-else>
|
||||
<td id="routeFk" class="ellipsize">{{labelData.routeFk}}</td>
|
||||
<td id="zone" class="ellipsize">{{labelData.zone || '---'}}</td>
|
||||
<td id="labels" class="ellipsize">{{labelData.labels || '--'}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img :src="QR" id="QR"/></td>
|
||||
<td class="ellipsize">
|
||||
<div id="additionalInfo"><b>Pallet: </b>{{id}}</div>
|
||||
<div id="additionalInfo"><b>User: </b> {{username.name || '---'}}</div>
|
||||
<div id="additionalInfo"><b>Day: </b>{{labelData.dayName.toUpperCase() || '---'}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,46 @@
|
|||
const Component = require(`vn-print/core/component`);
|
||||
const reportBody = new Component('report-body');
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
const qrcode = require('qrcode');
|
||||
|
||||
module.exports = {
|
||||
name: 'expedition-pallet-label',
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
description: 'The pallet id'
|
||||
},
|
||||
userFk: {
|
||||
type: Number,
|
||||
required: true,
|
||||
description: 'The user id'
|
||||
}
|
||||
},
|
||||
async serverPrefetch() {
|
||||
this.labelsData = await this.rawSqlFromDef('labelData', this.id);
|
||||
this.username = await this.findOneFromDef('username', this.userFk);
|
||||
this.labelData = this.labelsData[0];
|
||||
|
||||
let QRdata = JSON.stringify({
|
||||
company: 'vnl',
|
||||
user: this.userFk,
|
||||
created: new Date(),
|
||||
table: 'expeditionPallet',
|
||||
id: this.id
|
||||
});
|
||||
|
||||
this.QR = await this.getQR(QRdata);
|
||||
if (!this.labelsData.length)
|
||||
throw new UserError('Empty data source');
|
||||
},
|
||||
methods: {
|
||||
getQR(id) {
|
||||
const data = String(id);
|
||||
return qrcode.toDataURL(data, {margin: 0});
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'report-body': reportBody.build()
|
||||
},
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
reportName: labelPalletExpedition
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"width": "10cm",
|
||||
"height": "15cm",
|
||||
"margin": {
|
||||
"top": "0.5cm",
|
||||
"right": "0.2cm",
|
||||
"bottom": "0cm",
|
||||
"left": "0cm"
|
||||
},
|
||||
"printBackground": true
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
SELECT ep.id palletFk,
|
||||
t.routeFk,
|
||||
et2.description truck,
|
||||
r.description `zone`,
|
||||
COUNT(es.id) labels,
|
||||
t.warehouseFk warehouseFk,
|
||||
dayname(r.created) `dayName`,
|
||||
et.id <=> rm.expeditionTruckFk isMatch
|
||||
FROM vn.expeditionTruck et
|
||||
JOIN vn.expeditionPallet ep ON ep.truckFk = et.id
|
||||
JOIN vn.expeditionScan es ON es.palletFk = ep.id
|
||||
JOIN vn.expedition e ON e.id = es.expeditionFk
|
||||
JOIN vn.ticket t ON t.id = e.ticketFk
|
||||
JOIN vn.route r ON r.id = t.routeFk
|
||||
LEFT JOIN vn2008.Rutas_monitor rm ON rm.Id_Ruta = r.id
|
||||
LEFT JOIN vn.expeditionTruck et2 ON et2.id = rm.expeditionTruckFk
|
||||
WHERE ep.id = ?
|
||||
GROUP BY ep.id, t.routeFk
|
||||
ORDER BY t.routeFk
|
|
@ -0,0 +1,3 @@
|
|||
SELECT `name`
|
||||
FROM account.user
|
||||
WHERE id = ?
|
Loading…
Reference in New Issue