From 8b26c41b7fa9bdda5acdc98cda068b85615d5637 Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 28 Aug 2020 17:06:27 +0200 Subject: [PATCH 1/4] campo packageFk --- db/dump/fixtures.sql | 52 +++++++++---------- .../ticket/back/methods/expedition/filter.js | 14 +++-- modules/ticket/back/models/expedition.json | 15 +++--- modules/ticket/front/expedition/index.html | 14 ++--- package-lock.json | 32 ++++++------ 5 files changed, 63 insertions(+), 64 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 2b70cf2be..6cb6e3455 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -735,36 +735,36 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`) INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`) VALUES - (1, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL), - (2, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL), - (3, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL), - (4, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL), - (5, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL), - (6, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), - (7, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), - (8, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL), - (9, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL), - (10, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL), - (11, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL), - (12, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL), - (13, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), - (14, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), + (1, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 67, 1, NULL), + (2, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66, 1, NULL), + (3, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 65, 1, NULL), + (4, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 69, 2, NULL), + (5, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 74, 2, NULL), + (6, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 62, 2, NULL), + (7, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 64, 2, NULL), + (8, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 75, 1, NULL), + (9, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 76, 1, NULL), + (10, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 77, 1, NULL), + (11, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 78, 2, NULL), + (12, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 82, 2, NULL), + (13, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 83, 2, NULL), + (14, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 84, 2, NULL), (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), - (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL); + (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL); -INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`) +INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `workerFk`, `packagingFk`) VALUES - (1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 18), - (2, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 18), - (3, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 3, 1, 18), - (4, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 18), - (5, 1, 2, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 18), - (6, 7, 3, 71, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 1, 1, 18), - (7, 2, 4, 71, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 1, 1, 1, 18), - (8, 3, 5, 71, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), 1, 1, 1, 18), - (9, 3, 6, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 18), - (10, 7, 7, 71, CURDATE(), 1, 1, 1, 18); + (2, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 1), + (1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), + (3, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 3, 1, 1), + (4, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 1), + (5, 1, 2, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), + (1, 7, 3, 71, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 1, 1, 1), + (7, 2, 4, 71, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 1, 1, 1, 1), + (8, 3, 5, 71, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), 1, 1, 1, 1), + (9, 3, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), + (10, 7, 7, 71, CURDATE(), 1, 1, 1, 1); INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`) VALUES diff --git a/modules/ticket/back/methods/expedition/filter.js b/modules/ticket/back/methods/expedition/filter.js index 3ff2fcb59..79c7131ea 100644 --- a/modules/ticket/back/methods/expedition/filter.js +++ b/modules/ticket/back/methods/expedition/filter.js @@ -29,20 +29,24 @@ module.exports = Self => { e.ticketFk, e.isBox, e.workerFk, - i1.name namePackage, + i1.name packageItemName, e.counter, e.checked, - i2.name nameBox, + i2.name freightItemName, e.itemFk, u.nickname userNickname, e.created, - e.externalId + e.externalId, + i3.name packagingName, + i3.id packagingItemFk, + e.packagingFk FROM vn.expedition e LEFT JOIN vn.item i2 ON i2.id = e.itemFk INNER JOIN vn.item i1 ON i1.id = e.isBox - LEFT JOIN vn.worker w ON w.id = e.workerFk - LEFT JOIN account.user u ON u.id = w.userFk + LEFT JOIN vn.packaging p ON p.id = e.packagingFk + LEFT JOIN vn.item i3 ON i3.id = p.itemFk + LEFT JOIN account.user u ON u.id = e.workerFk `); stmt.merge(Self.buildSuffix(filter, 'e')); diff --git a/modules/ticket/back/models/expedition.json b/modules/ticket/back/models/expedition.json index 4a9682e03..c0b8d6508 100644 --- a/modules/ticket/back/models/expedition.json +++ b/modules/ticket/back/models/expedition.json @@ -24,12 +24,6 @@ }, "counter": { "type": "Number" - }, - "checked": { - "type": "Number" - }, - "externalId": { - "type": "Number" } }, "relations": { @@ -43,7 +37,7 @@ "model": "agency-mode", "foreignKey": "agencyModeFk" }, - "item": { + "packageItem": { "type": "belongsTo", "model": "Item", "foreignKey": "itemFk" @@ -58,10 +52,15 @@ "model": "TicketPackaging", "foreignKey": "ticketFk" }, - "box": { + "freightItem": { "type": "belongsTo", "model": "Item", "foreignKey": "isBox" + }, + "packaging": { + "type": "belongsTo", + "model": "Package", + "foreignKey": "packagingFk" } } } diff --git a/modules/ticket/front/expedition/index.html b/modules/ticket/front/expedition/index.html index 3b17a3b88..fc7b473cc 100644 --- a/modules/ticket/front/expedition/index.html +++ b/modules/ticket/front/expedition/index.html @@ -14,12 +14,10 @@ Expedition - Envialia Item Name Package type Counter - Checked Worker Created @@ -33,18 +31,16 @@ {{expedition.id | zeroFill:6}} - {{expedition.externalId | zeroFill:6}} - {{expedition.itemFk | zeroFill:6}} + ng-class="{link: expedition.packagingItemFk}" + ng-click="itemDescriptor.show($event, expedition.packagingItemFk)"> + {{expedition.packagingFk}} - {{::expedition.namePackage}} - {{::expedition.nameBox}} + {{::expedition.packageItemName}} + {{::expedition.freightItemName}} {{::expedition.counter}} - {{::expedition.checked}} Date: Mon, 31 Aug 2020 12:29:51 +0200 Subject: [PATCH 2/4] test excepto invoiceOut --- db/dump/fixtures.sql | 26 ++++++++++---------- gulpfile.js | 1 - modules/item/front/basic-data/index.html | 8 +++++++ package-lock.json | 30 ++++++++++++------------ 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 6cb6e3455..9feecb0f6 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -753,19 +753,6 @@ INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `d (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL), (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL); -INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `workerFk`, `packagingFk`) - VALUES - (2, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 1), - (1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), - (3, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 3, 1, 1), - (4, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 1), - (5, 1, 2, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), - (1, 7, 3, 71, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 1, 1, 1), - (7, 2, 4, 71, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 1, 1, 1, 1), - (8, 3, 5, 71, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), 1, 1, 1, 1), - (9, 3, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), - (10, 7, 7, 71, CURDATE(), 1, 1, 1, 1); - INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`) VALUES (1, 0.00, 10, 10, 0, 1, CURDATE(), 6, 1.50), @@ -777,6 +764,19 @@ INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPack ('cc', 1640038.00, 56.00, 220.00, 128.00, 1, CURDATE(), 15, 90.00), ('pallet 100', 2745600.00, 100.00, 220.00, 120.00, 1, CURDATE(), 16, 0.00); +INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `workerFk`, `packagingFk`) + VALUES + (1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), + (2, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 1), + (3, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 3, 1, 1), + (4, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 1), + (5, 1, 2, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), + (6, 7, 3, 71, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 1, 1, 1), + (7, 2, 4, 71, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 1, 1, 1, 1), + (8, 3, 5, 71, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), 1, 1, 1, 1), + (9, 3, 6, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 1), + (10, 7, 7, 71, CURDATE(), 1, 1, 1, 1); + INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, `created`, `pvp`) VALUES (1, 1, 2, 2, CURDATE(), NULL), diff --git a/gulpfile.js b/gulpfile.js index 096c44584..d645ea0cd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -403,7 +403,6 @@ module.exports = { back, backOnly, backWatch, - backTestOnce, backTest, e2e, i, diff --git a/modules/item/front/basic-data/index.html b/modules/item/front/basic-data/index.html index 7b3504b3c..99146deb0 100644 --- a/modules/item/front/basic-data/index.html +++ b/modules/item/front/basic-data/index.html @@ -109,6 +109,14 @@ ng-model="$ctrl.item.density" rule> + + Date: Tue, 1 Sep 2020 08:33:11 +0200 Subject: [PATCH 3/4] set addressFk --- modules/ticket/front/basic-data/step-one/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/basic-data/step-one/index.js b/modules/ticket/front/basic-data/step-one/index.js index 68f5ac54d..45fd397dd 100644 --- a/modules/ticket/front/basic-data/step-one/index.js +++ b/modules/ticket/front/basic-data/step-one/index.js @@ -155,7 +155,7 @@ class Controller extends Component { let query = `Clients/${value}`; this.$http.get(query).then(res => { if (res.data) - this.ticket.addressFk = res.data.defaultAddressFk; + this.addressId = res.data.defaultAddressFk; }); } -- 2.40.1 From a5fbe571597dc36338268eaa06b0465b3c26ba22 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 1 Sep 2020 08:42:31 +0200 Subject: [PATCH 4/4] gulpfile --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index d645ea0cd..40590d7c2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -404,6 +404,7 @@ module.exports = { backOnly, backWatch, backTest, + backTestOnce, e2e, i, install, -- 2.40.1