From ca767b84f02adba45b0226b6655739bc4f4c2f5d Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 30 Jun 2022 13:21:07 +0200 Subject: [PATCH 1/9] fix(entry): change isInventory to isExcludedFromAvailable --- db/dump/fixtures.sql | 2 +- db/dump/structure.sql | 52 +++++++++++----------- e2e/helpers/selectors.js | 2 +- modules/entry/back/methods/entry/filter.js | 2 +- modules/entry/back/models/entry.json | 2 +- modules/entry/front/basic-data/index.html | 2 +- modules/entry/front/descriptor/index.html | 2 +- modules/entry/front/index/index.html | 2 +- modules/entry/front/summary/index.html | 2 +- 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 0a27b48b8..86fadd90b 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1363,7 +1363,7 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO (7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1), (8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(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`,`isInventory`, `isRaid`, `notes`, `evaNotes`) +INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `ref`,`isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`) VALUES (1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'Movement 1', 0, 0, '', ''), (2, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'Movement 2', 0, 0, 'this is the note two', 'observation two'), diff --git a/db/dump/structure.sql b/db/dump/structure.sql index 21ef7758c..601413415 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -7863,7 +7863,7 @@ proc: BEGIN JOIN vn.warehouse w ON w.id = t.warehouseInFk WHERE t.landed BETWEEN vInventoryDate AND vStartDate AND t.warehouseInFk = vWarehouse - AND NOT e.isInventory + AND NOT e.isExcludedFromAvailable GROUP BY b.itemFk ) c JOIN vn.item i ON i.id = c.item_id @@ -27642,7 +27642,7 @@ trig: BEGIN END IF; END IF; - SELECT e.isInventory INTO vIsInventory + SELECT e.isExcludedFromAvailable INTO vIsInventory FROM entry e WHERE e.id = NEW.entryFk; @@ -31063,24 +31063,24 @@ DROP TABLE IF EXISTS `entry`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `entry` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `supplierFk` int(11) NOT NULL DEFAULT '644', + `supplierFk` int(11) NOT NULL DEFAULT 644, `dated` datetime NOT NULL, - `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `isBooked` tinyint(1) NOT NULL DEFAULT '0', - `isInventory` tinyint(1) NOT NULL DEFAULT '0', - `notes` longtext COLLATE utf8_unicode_ci, - `isConfirmed` tinyint(1) NOT NULL DEFAULT '0', - `isOrdered` tinyint(1) NOT NULL DEFAULT '0', - `isRaid` tinyint(1) NOT NULL DEFAULT '0', - `commission` float DEFAULT '0', - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `evaNotes` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `isBooked` tinyint(1) NOT NULL DEFAULT 0, + `isExcludedFromAvailable` tinyint(1) NOT NULL DEFAULT 0, + `notes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `isConfirmed` tinyint(1) NOT NULL DEFAULT 0, + `isOrdered` tinyint(1) NOT NULL DEFAULT 0, + `isRaid` tinyint(1) NOT NULL DEFAULT 0, + `commission` float DEFAULT 0, + `created` timestamp NOT NULL DEFAULT current_timestamp(), + `evaNotes` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL, `travelFk` int(11) unsigned DEFAULT NULL, - `currencyFk` tinyint(3) unsigned DEFAULT '1', - `companyFk` smallint(5) unsigned NOT NULL DEFAULT '442', + `currencyFk` tinyint(3) unsigned DEFAULT 1, + `companyFk` smallint(5) unsigned NOT NULL DEFAULT 442, `gestDocFk` int(11) DEFAULT NULL, `invoiceInFk` mediumint(8) unsigned DEFAULT NULL, - `isBlocked` tinyint(4) NOT NULL DEFAULT '0', + `isBlocked` tinyint(4) NOT NULL DEFAULT 0, `loadPriority` int(11) DEFAULT NULL, `kop` int(11) DEFAULT NULL, `sub` mediumint(8) unsigned DEFAULT NULL, @@ -58745,7 +58745,7 @@ BEGIN LEFT JOIN vn.producer pr on pr.id = i.producerFk LEFT JOIN vn.coolerPathDetail cpd ON LEFT(ip.code, 3) = cpd.hallway WHERE - NOT wIn.isFeedStock AND NOT e.isInventory AND NOT e.isRaid + NOT wIn.isFeedStock AND NOT e.isExcludedFromAvailable AND NOT e.isRaid AND e.id = 158772 AND i.typeFk IS NOT NULL AND ic.display IS NOT FALSE; @@ -64855,7 +64855,7 @@ BEGIN WHERE tr.landed >= vDateInventory AND vWarehouse = tr.warehouseInFk AND b.itemFk = vItemId - AND e.isInventory = 0 + AND e.isExcludedFromAvailable = 0 AND e.isRaid = 0 UNION ALL @@ -64886,7 +64886,7 @@ BEGIN AND vWarehouse =tr.warehouseOutFk AND s.id <> 4 AND b.itemFk = vItemId - AND e.isInventory = 0 + AND e.isExcludedFromAvailable = 0 AND w.isFeedStock = 0 AND e.isRaid = 0 UNION ALL @@ -68550,7 +68550,7 @@ BEGIN WHERE tr.landed >= vDateInventory AND vWarehouse = tr.warehouseInFk AND b.itemFk = vItemId - AND e.isInventory = FALSE + AND e.isExcludedFromAvailable = FALSE AND e.isRaid = FALSE UNION ALL @@ -68585,7 +68585,7 @@ BEGIN AND vWarehouse =tr.warehouseOutFk AND s.id <> 4 AND b.itemFk = vItemId - AND e.isInventory = FALSE + AND e.isExcludedFromAvailable = FALSE AND w.isFeedStock = FALSE AND e.isRaid = FALSE UNION ALL @@ -68838,7 +68838,7 @@ BEGIN LEFT JOIN travel t ON t.id = e.travelFk WHERE t.landed BETWEEN vDatedFrom AND vDatedTo AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND !e.isInventory + AND !e.isExcludedFromAvailable AND b.quantity != 0 AND (vItemFk IS NULL OR b.itemFk = vItemFk) UNION ALL @@ -68851,7 +68851,7 @@ BEGIN LEFT JOIN travel t ON t.id = e.travelFk WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo AND (vWarehouseFk IS NULL OR t.warehouseOutFk = vWarehouseFk) - AND !e.isInventory + AND !e.isExcludedFromAvailable AND b.quantity != 0 AND (vItemFk IS NULL OR b.itemFk = vItemFk) AND !e.isRaid @@ -82048,7 +82048,7 @@ BEGIN * Devuelve los tickets y la cantidad de lineas de venta que se pueden adelantar. * * @param vDated Fecha de los tickets que se quieren adelantar. - * @param vWarehouseFk Almacén + * @param vWarehouseFk AlmacénitemEntryIn */ DECLARE vDateInventory DATE; DECLARE vDateToAdvance DATE; @@ -96570,7 +96570,7 @@ USE `vn`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `itemEntryIn` AS select `t`.`warehouseInFk` AS `warehouseInFk`,`t`.`landed` AS `landed`,`b`.`itemFk` AS `itemFk`,`b`.`quantity` AS `quantity`,`t`.`isReceived` AS `isReceived`,`e`.`isRaid` AS `isVirtualStock`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isInventory` = 0) and (`b`.`quantity` <> 0)) */; +/*!50001 VIEW `itemEntryIn` AS select `t`.`warehouseInFk` AS `warehouseInFk`,`t`.`landed` AS `landed`,`b`.`itemFk` AS `itemFk`,`b`.`quantity` AS `quantity`,`t`.`isReceived` AS `isReceived`,`e`.`isRaid` AS `isVirtualStock`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isExcludedFromAvailable` = 0) and (`b`.`quantity` <> 0)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -96589,7 +96589,7 @@ USE `vn`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `itemEntryOut` AS select `t`.`warehouseOutFk` AS `warehouseOutFk`,`t`.`shipped` AS `shipped`,`b`.`itemFk` AS `itemFk`,-(`b`.`quantity`) AS `quantity`,`t`.`isDelivered` AS `isDelivered`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isInventory` = 0) and (`e`.`isRaid` = 0) and (`b`.`quantity` <> 0)) */; +/*!50001 VIEW `itemEntryOut` AS select `t`.`warehouseOutFk` AS `warehouseOutFk`,`t`.`shipped` AS `shipped`,`b`.`itemFk` AS `itemFk`,-(`b`.`quantity`) AS `quantity`,`t`.`isDelivered` AS `isDelivered`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isExcludedFromAvailable` = 0) and (`e`.`isRaid` = 0) and (`b`.`quantity` <> 0)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 770911d0e..609145019 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -1135,7 +1135,7 @@ export default { company: 'vn-entry-basic-data vn-autocomplete[ng-model="$ctrl.entry.companyFk"]', ordered: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isOrdered"]', confirmed: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isConfirmed"]', - inventory: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isInventory"]', + inventory: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isExcludedFromAvailable"]', raid: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isRaid"]', booked: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isBooked"]', save: 'vn-entry-basic-data button[type=submit]', diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index 13690d3ac..1ba4166dc 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -156,7 +156,7 @@ module.exports = Self => { e.dated, e.ref, e.isBooked, - e.isInventory, + e.isExcludedFromAvailable, e.notes, e.evaNotes AS observation, e.isConfirmed, diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json index d8bd079a2..c456859a5 100644 --- a/modules/entry/back/models/entry.json +++ b/modules/entry/back/models/entry.json @@ -24,7 +24,7 @@ "isBooked": { "type": "boolean" }, - "isInventory": { + "isExcludedFromAvailable": { "type": "boolean" }, "notes": { diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html index a05630dd6..8787853a5 100644 --- a/modules/entry/front/basic-data/index.html +++ b/modules/entry/front/basic-data/index.html @@ -103,7 +103,7 @@ + ng-model="$ctrl.entry.isExcludedFromAvailable"> + ng-if="$ctrl.entry.isExcludedFromAvailable"> diff --git a/modules/entry/front/summary/index.html b/modules/entry/front/summary/index.html index a95b2f18a..3dd9a4be5 100644 --- a/modules/entry/front/summary/index.html +++ b/modules/entry/front/summary/index.html @@ -91,7 +91,7 @@ From c88df46b4fde3e7f8c69c7892ad2daa427697d7c Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 30 Jun 2022 13:23:57 +0200 Subject: [PATCH 2/9] typo --- db/dump/structure.sql | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/db/dump/structure.sql b/db/dump/structure.sql index 601413415..a2f345fa0 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -31063,24 +31063,24 @@ DROP TABLE IF EXISTS `entry`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `entry` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `supplierFk` int(11) NOT NULL DEFAULT 644, + `supplierFk` int(11) NOT NULL DEFAULT '644', `dated` datetime NOT NULL, - `ref` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `isBooked` tinyint(1) NOT NULL DEFAULT 0, + `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `isBooked` tinyint(1) NOT NULL DEFAULT '0', `isExcludedFromAvailable` tinyint(1) NOT NULL DEFAULT 0, - `notes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, - `isConfirmed` tinyint(1) NOT NULL DEFAULT 0, - `isOrdered` tinyint(1) NOT NULL DEFAULT 0, - `isRaid` tinyint(1) NOT NULL DEFAULT 0, - `commission` float DEFAULT 0, - `created` timestamp NOT NULL DEFAULT current_timestamp(), - `evaNotes` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL, + `notes` longtext COLLATE utf8_unicode_ci, + `isConfirmed` tinyint(1) NOT NULL DEFAULT '0', + `isOrdered` tinyint(1) NOT NULL DEFAULT '0', + `isRaid` tinyint(1) NOT NULL DEFAULT '0', + `commission` float DEFAULT '0', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `evaNotes` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `travelFk` int(11) unsigned DEFAULT NULL, - `currencyFk` tinyint(3) unsigned DEFAULT 1, - `companyFk` smallint(5) unsigned NOT NULL DEFAULT 442, + `currencyFk` tinyint(3) unsigned DEFAULT '1', + `companyFk` smallint(5) unsigned NOT NULL DEFAULT '442', `gestDocFk` int(11) DEFAULT NULL, `invoiceInFk` mediumint(8) unsigned DEFAULT NULL, - `isBlocked` tinyint(4) NOT NULL DEFAULT 0, + `isBlocked` tinyint(4) NOT NULL DEFAULT '0', `loadPriority` int(11) DEFAULT NULL, `kop` int(11) DEFAULT NULL, `sub` mediumint(8) unsigned DEFAULT NULL, From c02433faabc26e6efc045e4184aeb56a330d55a9 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 30 Jun 2022 13:24:26 +0200 Subject: [PATCH 3/9] typo --- db/dump/structure.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dump/structure.sql b/db/dump/structure.sql index a2f345fa0..67763066f 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -31076,7 +31076,7 @@ CREATE TABLE `entry` ( `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `evaNotes` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `travelFk` int(11) unsigned DEFAULT NULL, - `currencyFk` tinyint(3) unsigned DEFAULT '1', + `currencyFk` tinyint(3) unsigned DEFAULT '1', `companyFk` smallint(5) unsigned NOT NULL DEFAULT '442', `gestDocFk` int(11) DEFAULT NULL, `invoiceInFk` mediumint(8) unsigned DEFAULT NULL, From 169f39cf1a1c08022fe78a7ae422bddd8d8bf472 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 1 Jul 2022 09:53:44 +0200 Subject: [PATCH 4/9] fix entry isExcludedFromAvailable --- db/dump/fixtures.sql | 2 +- db/dump/structure.sql | 24 +++++++++++----------- e2e/helpers/selectors.js | 2 +- modules/entry/back/methods/entry/filter.js | 2 +- modules/entry/back/models/entry.json | 2 +- modules/entry/front/basic-data/index.html | 2 +- modules/entry/front/descriptor/index.html | 2 +- modules/entry/front/index/index.html | 2 +- modules/entry/front/summary/index.html | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index feca90843..4300f52f7 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1351,7 +1351,7 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO (7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1), (8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(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`,`isInventory`, `isRaid`, `notes`, `evaNotes`) +INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `ref`,`isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`) VALUES (1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'Movement 1', 0, 0, '', ''), (2, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'Movement 2', 0, 0, 'this is the note two', 'observation two'), diff --git a/db/dump/structure.sql b/db/dump/structure.sql index fdd7e1151..1ad73243b 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -7863,7 +7863,7 @@ proc: BEGIN JOIN vn.warehouse w ON w.id = t.warehouseInFk WHERE t.landed BETWEEN vInventoryDate AND vStartDate AND t.warehouseInFk = vWarehouse - AND NOT e.isInventory + AND NOT e.isExcludedFromAvailable GROUP BY b.itemFk ) c JOIN vn.item i ON i.id = c.item_id @@ -27642,7 +27642,7 @@ trig: BEGIN END IF; END IF; - SELECT e.isInventory INTO vIsInventory + SELECT e.isExcludedFromAvailable INTO vIsInventory FROM entry e WHERE e.id = NEW.entryFk; @@ -31067,7 +31067,7 @@ CREATE TABLE `entry` ( `dated` datetime NOT NULL, `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `isBooked` tinyint(1) NOT NULL DEFAULT '0', - `isInventory` tinyint(1) NOT NULL DEFAULT '0', + `isExcludedFromAvailable` tinyint(1) NOT NULL DEFAULT '0', `notes` longtext COLLATE utf8_unicode_ci, `isConfirmed` tinyint(1) NOT NULL DEFAULT '0', `isOrdered` tinyint(1) NOT NULL DEFAULT '0', @@ -58720,7 +58720,7 @@ BEGIN LEFT JOIN vn.producer pr on pr.id = i.producerFk LEFT JOIN vn.coolerPathDetail cpd ON LEFT(ip.code, 3) = cpd.hallway WHERE - NOT wIn.isFeedStock AND NOT e.isInventory AND NOT e.isRaid + NOT wIn.isFeedStock AND NOT e.isExcludedFromAvailable AND NOT e.isRaid AND e.id = 158772 AND i.typeFk IS NOT NULL AND ic.display IS NOT FALSE; @@ -64830,7 +64830,7 @@ BEGIN WHERE tr.landed >= vDateInventory AND vWarehouse = tr.warehouseInFk AND b.itemFk = vItemId - AND e.isInventory = 0 + AND e.isExcludedFromAvailable = 0 AND e.isRaid = 0 UNION ALL @@ -64861,7 +64861,7 @@ BEGIN AND vWarehouse =tr.warehouseOutFk AND s.id <> 4 AND b.itemFk = vItemId - AND e.isInventory = 0 + AND e.isExcludedFromAvailable = 0 AND w.isFeedStock = 0 AND e.isRaid = 0 UNION ALL @@ -68525,7 +68525,7 @@ BEGIN WHERE tr.landed >= vDateInventory AND vWarehouse = tr.warehouseInFk AND b.itemFk = vItemId - AND e.isInventory = FALSE + AND e.isExcludedFromAvailable = FALSE AND e.isRaid = FALSE UNION ALL @@ -68560,7 +68560,7 @@ BEGIN AND vWarehouse =tr.warehouseOutFk AND s.id <> 4 AND b.itemFk = vItemId - AND e.isInventory = FALSE + AND e.isExcludedFromAvailable = FALSE AND w.isFeedStock = FALSE AND e.isRaid = FALSE UNION ALL @@ -68813,7 +68813,7 @@ BEGIN LEFT JOIN travel t ON t.id = e.travelFk WHERE t.landed BETWEEN vDatedFrom AND vDatedTo AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) - AND !e.isInventory + AND !e.isExcludedFromAvailable AND b.quantity != 0 AND (vItemFk IS NULL OR b.itemFk = vItemFk) UNION ALL @@ -68826,7 +68826,7 @@ BEGIN LEFT JOIN travel t ON t.id = e.travelFk WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo AND (vWarehouseFk IS NULL OR t.warehouseOutFk = vWarehouseFk) - AND !e.isInventory + AND !e.isExcludedFromAvailable AND b.quantity != 0 AND (vItemFk IS NULL OR b.itemFk = vItemFk) AND !e.isRaid @@ -96545,7 +96545,7 @@ USE `vn`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `itemEntryIn` AS select `t`.`warehouseInFk` AS `warehouseInFk`,`t`.`landed` AS `landed`,`b`.`itemFk` AS `itemFk`,`b`.`quantity` AS `quantity`,`t`.`isReceived` AS `isReceived`,`e`.`isRaid` AS `isVirtualStock`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isInventory` = 0) and (`b`.`quantity` <> 0)) */; +/*!50001 VIEW `itemEntryIn` AS select `t`.`warehouseInFk` AS `warehouseInFk`,`t`.`landed` AS `landed`,`b`.`itemFk` AS `itemFk`,`b`.`quantity` AS `quantity`,`t`.`isReceived` AS `isReceived`,`e`.`isRaid` AS `isVirtualStock`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isExcludedFromAvailable` = 0) and (`b`.`quantity` <> 0)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -96564,7 +96564,7 @@ USE `vn`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `itemEntryOut` AS select `t`.`warehouseOutFk` AS `warehouseOutFk`,`t`.`shipped` AS `shipped`,`b`.`itemFk` AS `itemFk`,-(`b`.`quantity`) AS `quantity`,`t`.`isDelivered` AS `isDelivered`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isInventory` = 0) and (`e`.`isRaid` = 0) and (`b`.`quantity` <> 0)) */; +/*!50001 VIEW `itemEntryOut` AS select `t`.`warehouseOutFk` AS `warehouseOutFk`,`t`.`shipped` AS `shipped`,`b`.`itemFk` AS `itemFk`,-(`b`.`quantity`) AS `quantity`,`t`.`isDelivered` AS `isDelivered`,`e`.`id` AS `entryFk` from ((`buy` `b` join `entry` `e` on((`b`.`entryFk` = `e`.`id`))) join `travel` `t` on((`e`.`travelFk` = `t`.`id`))) where ((`e`.`isExcludedFromAvailable` = 0) and (`e`.`isRaid` = 0) and (`b`.`quantity` <> 0)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 29176489c..57acfda81 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -1094,7 +1094,7 @@ export default { company: 'vn-entry-basic-data vn-autocomplete[ng-model="$ctrl.entry.companyFk"]', ordered: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isOrdered"]', confirmed: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isConfirmed"]', - inventory: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isInventory"]', + inventory: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isExcludedFromAvailable"]', raid: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isRaid"]', booked: 'vn-entry-basic-data vn-check[ng-model="$ctrl.entry.isBooked"]', save: 'vn-entry-basic-data button[type=submit]', diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index 13690d3ac..1ba4166dc 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -156,7 +156,7 @@ module.exports = Self => { e.dated, e.ref, e.isBooked, - e.isInventory, + e.isExcludedFromAvailable, e.notes, e.evaNotes AS observation, e.isConfirmed, diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json index d8bd079a2..c456859a5 100644 --- a/modules/entry/back/models/entry.json +++ b/modules/entry/back/models/entry.json @@ -24,7 +24,7 @@ "isBooked": { "type": "boolean" }, - "isInventory": { + "isExcludedFromAvailable": { "type": "boolean" }, "notes": { diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html index a05630dd6..8787853a5 100644 --- a/modules/entry/front/basic-data/index.html +++ b/modules/entry/front/basic-data/index.html @@ -103,7 +103,7 @@ + ng-model="$ctrl.entry.isExcludedFromAvailable"> + ng-if="$ctrl.entry.isExcludedFromAvailable"> diff --git a/modules/entry/front/summary/index.html b/modules/entry/front/summary/index.html index a95b2f18a..3dd9a4be5 100644 --- a/modules/entry/front/summary/index.html +++ b/modules/entry/front/summary/index.html @@ -91,7 +91,7 @@ From e441c658fdbedcce18afe9aee7f5bd1793d362d5 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 4 Jul 2022 08:31:53 +0200 Subject: [PATCH 5/9] feat: set daysInFuture value --- db/changes/10470-family/00-accountingType.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/changes/10470-family/00-accountingType.sql b/db/changes/10470-family/00-accountingType.sql index f3c092a34..964027e3a 100644 --- a/db/changes/10470-family/00-accountingType.sql +++ b/db/changes/10470-family/00-accountingType.sql @@ -1,2 +1,3 @@ ALTER TABLE `vn`.`accountingType` ADD daysInFuture INT NULL; -ALTER TABLE `vn`.`accountingType` MODIFY COLUMN daysInFuture int(11) DEFAULT 0 NULL; \ No newline at end of file +ALTER TABLE `vn`.`accountingType` MODIFY COLUMN daysInFuture int(11) DEFAULT 0 NULL; +UPDATE `vn`.`accountingType` SET daysInFuture=1 WHERE id=8; \ No newline at end of file From f4825488c6efd23837c4a8fb13e795478b459273 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 26 Jul 2022 11:47:43 +0200 Subject: [PATCH 6/9] refactor(Tasks API): ghanged method to GET --- back/methods/dms/deleteTrashFiles.js | 7 +++---- .../item/back/methods/item-image-queue/downloadImages.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/back/methods/dms/deleteTrashFiles.js b/back/methods/dms/deleteTrashFiles.js index 9d16e9d81..716e03311 100644 --- a/back/methods/dms/deleteTrashFiles.js +++ b/back/methods/dms/deleteTrashFiles.js @@ -11,11 +11,11 @@ module.exports = Self => { }, http: { path: `/deleteTrashFiles`, - verb: 'POST' + verb: 'GET' } }); - Self.deleteTrashFiles = async(options) => { + Self.deleteTrashFiles = async options => { const tx = await Self.beginTransaction({}); const myOptions = {}; @@ -47,10 +47,9 @@ module.exports = Self => { await dms.destroy(myOptions); } if (tx) await tx.commit(); - } catch (e) { if (tx) await tx.rollback(); - + throw e; } }; diff --git a/modules/item/back/methods/item-image-queue/downloadImages.js b/modules/item/back/methods/item-image-queue/downloadImages.js index 05b223598..ec8244f49 100644 --- a/modules/item/back/methods/item-image-queue/downloadImages.js +++ b/modules/item/back/methods/item-image-queue/downloadImages.js @@ -12,7 +12,7 @@ module.exports = Self => { }, http: { path: `/downloadImages`, - verb: 'POST' + verb: 'GET' } }); From e9169154354517c2cc1f6ec5b5e15cfd39ff0dea Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 26 Jul 2022 12:08:38 +0200 Subject: [PATCH 7/9] Updated to POST --- back/methods/chat/sendQueued.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/chat/sendQueued.js b/back/methods/chat/sendQueued.js index c34642c7e..cf80817e5 100644 --- a/back/methods/chat/sendQueued.js +++ b/back/methods/chat/sendQueued.js @@ -10,7 +10,7 @@ module.exports = Self => { }, http: { path: `/sendQueued`, - verb: 'POST' + verb: 'GET' } }); From 3fd289ff517175114b77eeb841384aa1a587830c Mon Sep 17 00:00:00 2001 From: vicent Date: Tue, 26 Jul 2022 13:03:03 +0200 Subject: [PATCH 8/9] update chat --- db/changes/10471-family/00-chat.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 db/changes/10471-family/00-chat.sql diff --git a/db/changes/10471-family/00-chat.sql b/db/changes/10471-family/00-chat.sql new file mode 100644 index 000000000..6f3c9d437 --- /dev/null +++ b/db/changes/10471-family/00-chat.sql @@ -0,0 +1,3 @@ +ALTER TABLE `vn`.`chat` MODIFY COLUMN message TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL; +ALTER TABLE `vn`.`chat` MODIFY COLUMN dated DATETIME DEFAULT NULL NULL; +ALTER TABLE `vn`.`chat` ADD error TEXT NULL; From 882c4cc3d7c156575b15239656b45211eda3b51b Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 26 Jul 2022 13:19:57 +0200 Subject: [PATCH 9/9] fix(insurance): force script execution --- db/changes/10472-family/00-creditInsurance.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 db/changes/10472-family/00-creditInsurance.sql diff --git a/db/changes/10472-family/00-creditInsurance.sql b/db/changes/10472-family/00-creditInsurance.sql new file mode 100644 index 000000000..4731cfb2a --- /dev/null +++ b/db/changes/10472-family/00-creditInsurance.sql @@ -0,0 +1,3 @@ +ALTER TABLE `vn`.`creditInsurance` + ADD CONSTRAINT `creditInsurance_creditClassificationFk` FOREIGN KEY (`creditClassificationFk`) + REFERENCES `vn`.`creditClassification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file