From d330529bf2d828557d6d83d92b51336417a62170 Mon Sep 17 00:00:00 2001 From: ivanm Date: Tue, 3 Sep 2024 12:33:26 +0200 Subject: [PATCH 1/6] feat: refs #7819 Delete obsolete objects --- db/dump/fixtures.before.sql | 22 +-- .../11210-greenDendro/00-firstScript.sql | 8 ++ .../11210-greenDendro/01-firstScript.sql | 1 + .../11210-greenDendro/02-firstScript.sql | 21 +++ .../11210-greenDendro/03-firstScript.sql | 135 ++++++++++++++++++ 5 files changed, 176 insertions(+), 11 deletions(-) create mode 100644 db/versions/11210-greenDendro/00-firstScript.sql create mode 100644 db/versions/11210-greenDendro/01-firstScript.sql create mode 100644 db/versions/11210-greenDendro/02-firstScript.sql create mode 100644 db/versions/11210-greenDendro/03-firstScript.sql diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 703c67443..e32dab52e 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -2572,18 +2572,18 @@ INSERT INTO `vn`.`rate`(`dated`, `warehouseFk`, `rate0`, `rate1`, `rate2`, `rate (DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR), 1, 10, 15, 20, 25), (util.VN_CURDATE(), 1, 12, 17, 22, 27); -INSERT INTO `vn`.`dua` (id, code, awbFk__, issued, operated, booked, bookEntried, gestdocFk, customsValue, companyFk) +INSERT INTO `vn`.`dua` (id, code, issued, operated, booked, bookEntried, gestdocFk, customsValue, companyFk) VALUES - (1, '19ES0028013A481523', 1, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 11276.95, 442), - (2, '21ES00280136115760', 2, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1376.20, 442), - (3, '19ES00280131956004', 3, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 3, 14268.50, 442), - (4, '19ES00280131955995', 4, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 8242.50, 442), - (5, '19ES00280132022070', 5, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 10012.49, 442), - (6, '19ES00280132032308', 6, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 19914.25, 442), - (7, '19ES00280132025489', 7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1934.06, 442), - (8, '19ES00280132025490', 8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 3618.52, 442), - (9, '19ES00280132025491', 9, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 7126.23, 442), - (10, '19ES00280132025492', 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 4631.45, 442); + (1, '19ES0028013A481523', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 11276.95, 442), + (2, '21ES00280136115760', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1376.20, 442), + (3, '19ES00280131956004', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 3, 14268.50, 442), + (4, '19ES00280131955995', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 8242.50, 442), + (5, '19ES00280132022070', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 10012.49, 442), + (6, '19ES00280132032308', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 19914.25, 442), + (7, '19ES00280132025489', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1934.06, 442), + (8, '19ES00280132025490', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 3618.52, 442), + (9, '19ES00280132025491', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 7126.23, 442), + (10, '19ES00280132025492', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 4631.45, 442); INSERT INTO `vn`.`duaEntry` (`duaFk`, `entryFk`, `value`, `customsValue`, `euroValue`) VALUES diff --git a/db/versions/11210-greenDendro/00-firstScript.sql b/db/versions/11210-greenDendro/00-firstScript.sql new file mode 100644 index 000000000..58e6450d6 --- /dev/null +++ b/db/versions/11210-greenDendro/00-firstScript.sql @@ -0,0 +1,8 @@ +ALTER TABLE util.config + CHANGE dbVersion dbVersion__ char(11) DEFAULT NULL COMMENT '@deprecated 2024-09-02 refs #7819'; + +ALTER TABLE util.config + CHANGE hasTriggersDisabled hasTriggersDisabled__ tinyint(1) DEFAULT 0 NOT NULL COMMENT '@deprecated 2024-09-02 refs #7819'; + +RENAME TABLE account.accountLog TO account.accountLog__; + ALTER TABLE account.accountLog__ COMMENT='@deprecated 2024-09-02 refs #7819'; diff --git a/db/versions/11210-greenDendro/01-firstScript.sql b/db/versions/11210-greenDendro/01-firstScript.sql new file mode 100644 index 000000000..787011343 --- /dev/null +++ b/db/versions/11210-greenDendro/01-firstScript.sql @@ -0,0 +1 @@ +DROP DATABASE IF EXISTS `.mysqlworkbench`; \ No newline at end of file diff --git a/db/versions/11210-greenDendro/02-firstScript.sql b/db/versions/11210-greenDendro/02-firstScript.sql new file mode 100644 index 000000000..4cb6bbb02 --- /dev/null +++ b/db/versions/11210-greenDendro/02-firstScript.sql @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS account.mailClientAccess__; +DROP TABLE IF EXISTS account.mailSenderAccess__; +DROP TABLE IF EXISTS bi.analisis_ventas_familia_evolution__; +DROP TABLE IF EXISTS bi.live_counter__; +DROP TABLE IF EXISTS bi.partitioning_information__; +DROP TABLE IF EXISTS bi.primer_pedido__; +DROP TABLE IF EXISTS bi.tarifa_premisas__; +DROP TABLE IF EXISTS bi.tarifa_warehouse__; +DROP TABLE IF EXISTS bs.compradores__; +DROP TABLE IF EXISTS bs.salesMonthlySnapshot___; +DROP TABLE IF EXISTS bs.salesPerson__; +DROP TABLE IF EXISTS bs.vendedores_evolution__; +DROP TABLE IF EXISTS vn.botanicExport__; +DROP TABLE IF EXISTS vn.claimRma__; +DROP TABLE IF EXISTS vn.coolerPathDetail__; +DROP TABLE IF EXISTS vn.forecastedBalance__; +DROP TABLE IF EXISTS vn.routeLoadWorker__; +DROP TABLE IF EXISTS vn.routeUserPercentage__; +DROP TABLE IF EXISTS vn.ticketSms__; +DROP TABLE IF EXISTS vn.ticketTrackingState__; +DROP TABLE IF EXISTS vn.warehouseAlias__; \ No newline at end of file diff --git a/db/versions/11210-greenDendro/03-firstScript.sql b/db/versions/11210-greenDendro/03-firstScript.sql new file mode 100644 index 000000000..b069d0982 --- /dev/null +++ b/db/versions/11210-greenDendro/03-firstScript.sql @@ -0,0 +1,135 @@ +ALTER TABLE bi.rutasBoard DROP COLUMN coste_bulto__; +ALTER TABLE bi.rutasBoard DROP COLUMN Dia__; +ALTER TABLE bi.rutasBoard DROP COLUMN km__; +ALTER TABLE bi.rutasBoard DROP COLUMN m3__; +ALTER TABLE bi.rutasBoard DROP COLUMN Matricula__; +ALTER TABLE bi.rutasBoard DROP COLUMN month__; +ALTER TABLE bi.rutasBoard DROP COLUMN Terceros__; +ALTER TABLE bi.rutasBoard DROP COLUMN Tipo__; +ALTER TABLE bi.rutasBoard DROP COLUMN warehouse_id__; +ALTER TABLE bi.rutasBoard DROP COLUMN year__; + +ALTER TABLE bs.clientDied DROP COLUMN Boss__; +ALTER TABLE bs.clientDied DROP COLUMN clientName__; +ALTER TABLE bs.clientDied DROP COLUMN workerCode__; + +ALTER TABLE bs.salesByItemTypeDay DROP COLUMN netSale__; + +ALTER TABLE vn.agency DROP FOREIGN KEY agency_FK; +ALTER TABLE vn.agency DROP COLUMN warehouseAliasFk__; + +ALTER TABLE vn.awbComponent DROP COLUMN dated__; + +ALTER TABLE vn.buy DROP COLUMN containerFk__; + +ALTER TABLE vn.chat DROP COLUMN status__; + +ALTER TABLE vn.claim DROP COLUMN rma__; + +ALTER TABLE vn.client DROP COLUMN clientTypeFk__; +ALTER TABLE vn.client DROP COLUMN hasIncoterms__; + +ALTER TABLE vn.clientType DROP COLUMN id__; + +ALTER TABLE vn.cmr DROP FOREIGN KEY cmr_fk1; +ALTER TABLE vn.cmr DROP COLUMN ticketFk__; + +ALTER TABLE vn.company DROP COLUMN sage200Company__; + +ALTER TABLE vn.country DROP FOREIGN KEY country_FK; +ALTER TABLE vn.country DROP COLUMN politicalCountryFk__; + +ALTER TABLE vn.deliveryNote DROP FOREIGN KEY albaran_FK; +ALTER TABLE vn.deliveryNote DROP COLUMN farmingFk__; + +ALTER TABLE vn.dmsType DROP COLUMN path__; + +ALTER TABLE vn.dua DROP COLUMN awbFk__; + +ALTER TABLE vn.entry DROP COLUMN isBlocked__; + +ALTER TABLE vn.expedition DROP COLUMN itemFk__; + +ALTER TABLE vn.item DROP COLUMN minQuantity__; +ALTER TABLE vn.item DROP COLUMN packingShelve__; + +ALTER TABLE vn.itemType DROP COLUMN compression__; +ALTER TABLE vn.itemType DROP COLUMN density__; +ALTER TABLE vn.itemType DROP COLUMN hasComponents__; +ALTER TABLE vn.itemType DROP COLUMN location__; +ALTER TABLE vn.itemType DROP COLUMN maneuver__; +ALTER TABLE vn.itemType DROP COLUMN profit__; +ALTER TABLE vn.itemType DROP COLUMN target__; +ALTER TABLE vn.itemType DROP COLUMN topMargin__; +ALTER TABLE vn.itemType DROP COLUMN transaction__; +ALTER TABLE vn.itemType DROP FOREIGN KEY warehouseFk5; +ALTER TABLE vn.itemType DROP COLUMN warehouseFk__; + +ALTER TABLE vn.ledgerConfig DROP COLUMN lastBookEntry__; + +ALTER TABLE vn.saleTracking DROP FOREIGN KEY saleTracking_FK_1; +ALTER TABLE vn.saleTracking DROP COLUMN actionFk__; + +ALTER TABLE vn.supplier DROP COLUMN isFarmer__; + +ALTER TABLE vn.supplierAccount DROP COLUMN description__; + +ALTER TABLE vn.ticketRequest DROP COLUMN buyerCode__; + +ALTER TABLE vn.travel DROP COLUMN agencyFk__; + +ALTER TABLE vn.warehouse DROP FOREIGN KEY warehouse_ibfk_2; +ALTER TABLE vn.warehouse DROP COLUMN aliasFk__; + +ALTER TABLE vn.worker DROP COLUMN labelerFk__; + +CREATE OR REPLACE +ALGORITHM = UNDEFINED VIEW `vn2008`.`Articles` AS +SELECT `i`.`id` AS `Id_Article`, + `i`.`name` AS `Article`, + `i`.`typeFk` AS `tipo_id`, + `i`.`size` AS `Medida`, + `i`.`inkFk` AS `Color`, + `i`.`category` AS `Categoria`, + `i`.`stems` AS `Tallos`, + `i`.`originFk` AS `id_origen`, + `i`.`description` AS `description`, + `i`.`producerFk` AS `producer_id`, + `i`.`intrastatFk` AS `Codintrastat`, + `i`.`box` AS `caja`, + `i`.`expenseFk` AS `expenseFk`, + `i`.`comment` AS `comments`, + `i`.`relevancy` AS `relevancy`, + `i`.`image` AS `Foto`, + `i`.`generic` AS `generic`, + `i`.`density` AS `density`, + `i`.`minPrice` AS `PVP`, + `i`.`hasMinPrice` AS `Min`, + `i`.`isActive` AS `isActive`, + `i`.`longName` AS `longName`, + `i`.`subName` AS `subName`, + `i`.`tag5` AS `tag5`, + `i`.`value5` AS `value5`, + `i`.`tag6` AS `tag6`, + `i`.`value6` AS `value6`, + `i`.`tag7` AS `tag7`, + `i`.`value7` AS `value7`, + `i`.`tag8` AS `tag8`, + `i`.`value8` AS `value8`, + `i`.`tag9` AS `tag9`, + `i`.`value9` AS `value9`, + `i`.`tag10` AS `tag10`, + `i`.`value10` AS `value10`, + `i`.`minimum` AS `minimum`, + `i`.`upToDown` AS `upToDown`, + `i`.`hasKgPrice` AS `hasKgPrice`, + `i`.`equivalent` AS `Equivalente`, + `i`.`isToPrint` AS `Imprimir`, + `i`.`doPhoto` AS `do_photo`, + `i`.`created` AS `odbc_date`, + `i`.`isFloramondo` AS `isFloramondo`, + `i`.`supplyResponseFk` AS `supplyResponseFk`, + `i`.`stemMultiplier` AS `stemMultiplier`, + `i`.`itemPackingTypeFk` AS `itemPackingTypeFk`, + `i`.`packingOut` AS `packingOut` +FROM `vn`.`item` `i`; \ No newline at end of file From e5161fe9e261abd6bf9b54447f659a4f31601332 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 11 Sep 2024 13:26:40 +0200 Subject: [PATCH 2/6] fix: fixed balanceDialog amount field --- modules/client/front/balance/create/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index f4ff0e3aa..f1474e10c 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -33,7 +33,6 @@ class Controller extends Dialog { } }; - this.getAmountPaid(); this.$http.get(`Clients/findOne`, {filter}) .then(res => { this.receipt.email = res.data.email; @@ -52,6 +51,7 @@ class Controller extends Dialog { set companyFk(value) { this.receipt.companyFk = value; + this.getAmountPaid(); } set description(value) { From 63dde3dd786b4f60c7638c33f4268cbcfd5646a4 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 13 Sep 2024 14:13:14 +0200 Subject: [PATCH 3/6] fix: refs #7819 Version --- db/routines/vn2008/views/Articles.sql | 1 - .../11210-greenDendro/02-firstScript.sql | 105 +++++++++--- .../11210-greenDendro/03-firstScript.sql | 156 +++--------------- 3 files changed, 105 insertions(+), 157 deletions(-) diff --git a/db/routines/vn2008/views/Articles.sql b/db/routines/vn2008/views/Articles.sql index 385bf310b..87f1b6d5e 100644 --- a/db/routines/vn2008/views/Articles.sql +++ b/db/routines/vn2008/views/Articles.sql @@ -41,7 +41,6 @@ AS SELECT `i`.`id` AS `Id_Article`, `i`.`hasKgPrice` AS `hasKgPrice`, `i`.`equivalent` AS `Equivalente`, `i`.`isToPrint` AS `Imprimir`, - `i`.`family` AS `Familia__`, `i`.`doPhoto` AS `do_photo`, `i`.`created` AS `odbc_date`, `i`.`isFloramondo` AS `isFloramondo`, diff --git a/db/versions/11210-greenDendro/02-firstScript.sql b/db/versions/11210-greenDendro/02-firstScript.sql index 4cb6bbb02..2603c5df5 100644 --- a/db/versions/11210-greenDendro/02-firstScript.sql +++ b/db/versions/11210-greenDendro/02-firstScript.sql @@ -1,21 +1,84 @@ -DROP TABLE IF EXISTS account.mailClientAccess__; -DROP TABLE IF EXISTS account.mailSenderAccess__; -DROP TABLE IF EXISTS bi.analisis_ventas_familia_evolution__; -DROP TABLE IF EXISTS bi.live_counter__; -DROP TABLE IF EXISTS bi.partitioning_information__; -DROP TABLE IF EXISTS bi.primer_pedido__; -DROP TABLE IF EXISTS bi.tarifa_premisas__; -DROP TABLE IF EXISTS bi.tarifa_warehouse__; -DROP TABLE IF EXISTS bs.compradores__; -DROP TABLE IF EXISTS bs.salesMonthlySnapshot___; -DROP TABLE IF EXISTS bs.salesPerson__; -DROP TABLE IF EXISTS bs.vendedores_evolution__; -DROP TABLE IF EXISTS vn.botanicExport__; -DROP TABLE IF EXISTS vn.claimRma__; -DROP TABLE IF EXISTS vn.coolerPathDetail__; -DROP TABLE IF EXISTS vn.forecastedBalance__; -DROP TABLE IF EXISTS vn.routeLoadWorker__; -DROP TABLE IF EXISTS vn.routeUserPercentage__; -DROP TABLE IF EXISTS vn.ticketSms__; -DROP TABLE IF EXISTS vn.ticketTrackingState__; -DROP TABLE IF EXISTS vn.warehouseAlias__; \ No newline at end of file +ALTER TABLE bi.rutasBoard DROP COLUMN coste_bulto__; +ALTER TABLE bi.rutasBoard DROP COLUMN Dia__; +ALTER TABLE bi.rutasBoard DROP COLUMN km__; +ALTER TABLE bi.rutasBoard DROP COLUMN m3__; +ALTER TABLE bi.rutasBoard DROP COLUMN Matricula__; +ALTER TABLE bi.rutasBoard DROP COLUMN month__; +ALTER TABLE bi.rutasBoard DROP COLUMN Terceros__; +ALTER TABLE bi.rutasBoard DROP COLUMN Tipo__; +ALTER TABLE bi.rutasBoard DROP COLUMN warehouse_id__; +ALTER TABLE bi.rutasBoard DROP COLUMN year__; + +ALTER TABLE bs.clientDied DROP COLUMN Boss__; +ALTER TABLE bs.clientDied DROP COLUMN clientName__; +ALTER TABLE bs.clientDied DROP COLUMN workerCode__; + +ALTER TABLE bs.salesByItemTypeDay DROP COLUMN netSale__; + +ALTER TABLE vn.agency DROP FOREIGN KEY agency_FK; +ALTER TABLE vn.agency DROP COLUMN warehouseAliasFk__; + +ALTER TABLE vn.awbComponent DROP COLUMN dated__; + +ALTER TABLE vn.buy DROP COLUMN containerFk__; + +ALTER TABLE vn.chat DROP COLUMN status__; + +ALTER TABLE vn.claim DROP COLUMN rma__; + +ALTER TABLE vn.client DROP COLUMN clientTypeFk__; +ALTER TABLE vn.client DROP COLUMN hasIncoterms__; + +ALTER TABLE vn.clientType DROP COLUMN id__; + +ALTER TABLE vn.cmr DROP FOREIGN KEY cmr_fk1; +ALTER TABLE vn.cmr DROP COLUMN ticketFk__; + +ALTER TABLE vn.company DROP COLUMN sage200Company__; + +ALTER TABLE vn.country DROP FOREIGN KEY country_FK; +ALTER TABLE vn.country DROP COLUMN politicalCountryFk__; + +ALTER TABLE vn.deliveryNote DROP FOREIGN KEY albaran_FK; +ALTER TABLE vn.deliveryNote DROP COLUMN farmingFk__; + +ALTER TABLE vn.dmsType DROP COLUMN path__; + +ALTER TABLE vn.dua DROP COLUMN awbFk__; + +ALTER TABLE vn.entry DROP COLUMN isBlocked__; + +ALTER TABLE vn.expedition DROP COLUMN itemFk__; + +ALTER TABLE vn.item DROP COLUMN minQuantity__; +ALTER TABLE vn.item DROP COLUMN packingShelve__; + +ALTER TABLE vn.itemType DROP COLUMN compression__; +ALTER TABLE vn.itemType DROP COLUMN density__; +ALTER TABLE vn.itemType DROP COLUMN hasComponents__; +ALTER TABLE vn.itemType DROP COLUMN location__; +ALTER TABLE vn.itemType DROP COLUMN maneuver__; +ALTER TABLE vn.itemType DROP COLUMN profit__; +ALTER TABLE vn.itemType DROP COLUMN target__; +ALTER TABLE vn.itemType DROP COLUMN topMargin__; +ALTER TABLE vn.itemType DROP COLUMN transaction__; +ALTER TABLE vn.itemType DROP FOREIGN KEY warehouseFk5; +ALTER TABLE vn.itemType DROP COLUMN warehouseFk__; + +ALTER TABLE vn.ledgerConfig DROP COLUMN lastBookEntry__; + +ALTER TABLE vn.saleTracking DROP FOREIGN KEY saleTracking_FK_1; +ALTER TABLE vn.saleTracking DROP COLUMN actionFk__; + +ALTER TABLE vn.supplier DROP COLUMN isFarmer__; + +ALTER TABLE vn.supplierAccount DROP COLUMN description__; + +ALTER TABLE vn.ticketRequest DROP COLUMN buyerCode__; + +ALTER TABLE vn.travel DROP COLUMN agencyFk__; + +ALTER TABLE vn.warehouse DROP FOREIGN KEY warehouse_ibfk_2; +ALTER TABLE vn.warehouse DROP COLUMN aliasFk__; + +ALTER TABLE vn.worker DROP COLUMN labelerFk__; diff --git a/db/versions/11210-greenDendro/03-firstScript.sql b/db/versions/11210-greenDendro/03-firstScript.sql index b069d0982..f8157b756 100644 --- a/db/versions/11210-greenDendro/03-firstScript.sql +++ b/db/versions/11210-greenDendro/03-firstScript.sql @@ -1,135 +1,21 @@ -ALTER TABLE bi.rutasBoard DROP COLUMN coste_bulto__; -ALTER TABLE bi.rutasBoard DROP COLUMN Dia__; -ALTER TABLE bi.rutasBoard DROP COLUMN km__; -ALTER TABLE bi.rutasBoard DROP COLUMN m3__; -ALTER TABLE bi.rutasBoard DROP COLUMN Matricula__; -ALTER TABLE bi.rutasBoard DROP COLUMN month__; -ALTER TABLE bi.rutasBoard DROP COLUMN Terceros__; -ALTER TABLE bi.rutasBoard DROP COLUMN Tipo__; -ALTER TABLE bi.rutasBoard DROP COLUMN warehouse_id__; -ALTER TABLE bi.rutasBoard DROP COLUMN year__; - -ALTER TABLE bs.clientDied DROP COLUMN Boss__; -ALTER TABLE bs.clientDied DROP COLUMN clientName__; -ALTER TABLE bs.clientDied DROP COLUMN workerCode__; - -ALTER TABLE bs.salesByItemTypeDay DROP COLUMN netSale__; - -ALTER TABLE vn.agency DROP FOREIGN KEY agency_FK; -ALTER TABLE vn.agency DROP COLUMN warehouseAliasFk__; - -ALTER TABLE vn.awbComponent DROP COLUMN dated__; - -ALTER TABLE vn.buy DROP COLUMN containerFk__; - -ALTER TABLE vn.chat DROP COLUMN status__; - -ALTER TABLE vn.claim DROP COLUMN rma__; - -ALTER TABLE vn.client DROP COLUMN clientTypeFk__; -ALTER TABLE vn.client DROP COLUMN hasIncoterms__; - -ALTER TABLE vn.clientType DROP COLUMN id__; - -ALTER TABLE vn.cmr DROP FOREIGN KEY cmr_fk1; -ALTER TABLE vn.cmr DROP COLUMN ticketFk__; - -ALTER TABLE vn.company DROP COLUMN sage200Company__; - -ALTER TABLE vn.country DROP FOREIGN KEY country_FK; -ALTER TABLE vn.country DROP COLUMN politicalCountryFk__; - -ALTER TABLE vn.deliveryNote DROP FOREIGN KEY albaran_FK; -ALTER TABLE vn.deliveryNote DROP COLUMN farmingFk__; - -ALTER TABLE vn.dmsType DROP COLUMN path__; - -ALTER TABLE vn.dua DROP COLUMN awbFk__; - -ALTER TABLE vn.entry DROP COLUMN isBlocked__; - -ALTER TABLE vn.expedition DROP COLUMN itemFk__; - -ALTER TABLE vn.item DROP COLUMN minQuantity__; -ALTER TABLE vn.item DROP COLUMN packingShelve__; - -ALTER TABLE vn.itemType DROP COLUMN compression__; -ALTER TABLE vn.itemType DROP COLUMN density__; -ALTER TABLE vn.itemType DROP COLUMN hasComponents__; -ALTER TABLE vn.itemType DROP COLUMN location__; -ALTER TABLE vn.itemType DROP COLUMN maneuver__; -ALTER TABLE vn.itemType DROP COLUMN profit__; -ALTER TABLE vn.itemType DROP COLUMN target__; -ALTER TABLE vn.itemType DROP COLUMN topMargin__; -ALTER TABLE vn.itemType DROP COLUMN transaction__; -ALTER TABLE vn.itemType DROP FOREIGN KEY warehouseFk5; -ALTER TABLE vn.itemType DROP COLUMN warehouseFk__; - -ALTER TABLE vn.ledgerConfig DROP COLUMN lastBookEntry__; - -ALTER TABLE vn.saleTracking DROP FOREIGN KEY saleTracking_FK_1; -ALTER TABLE vn.saleTracking DROP COLUMN actionFk__; - -ALTER TABLE vn.supplier DROP COLUMN isFarmer__; - -ALTER TABLE vn.supplierAccount DROP COLUMN description__; - -ALTER TABLE vn.ticketRequest DROP COLUMN buyerCode__; - -ALTER TABLE vn.travel DROP COLUMN agencyFk__; - -ALTER TABLE vn.warehouse DROP FOREIGN KEY warehouse_ibfk_2; -ALTER TABLE vn.warehouse DROP COLUMN aliasFk__; - -ALTER TABLE vn.worker DROP COLUMN labelerFk__; - -CREATE OR REPLACE -ALGORITHM = UNDEFINED VIEW `vn2008`.`Articles` AS -SELECT `i`.`id` AS `Id_Article`, - `i`.`name` AS `Article`, - `i`.`typeFk` AS `tipo_id`, - `i`.`size` AS `Medida`, - `i`.`inkFk` AS `Color`, - `i`.`category` AS `Categoria`, - `i`.`stems` AS `Tallos`, - `i`.`originFk` AS `id_origen`, - `i`.`description` AS `description`, - `i`.`producerFk` AS `producer_id`, - `i`.`intrastatFk` AS `Codintrastat`, - `i`.`box` AS `caja`, - `i`.`expenseFk` AS `expenseFk`, - `i`.`comment` AS `comments`, - `i`.`relevancy` AS `relevancy`, - `i`.`image` AS `Foto`, - `i`.`generic` AS `generic`, - `i`.`density` AS `density`, - `i`.`minPrice` AS `PVP`, - `i`.`hasMinPrice` AS `Min`, - `i`.`isActive` AS `isActive`, - `i`.`longName` AS `longName`, - `i`.`subName` AS `subName`, - `i`.`tag5` AS `tag5`, - `i`.`value5` AS `value5`, - `i`.`tag6` AS `tag6`, - `i`.`value6` AS `value6`, - `i`.`tag7` AS `tag7`, - `i`.`value7` AS `value7`, - `i`.`tag8` AS `tag8`, - `i`.`value8` AS `value8`, - `i`.`tag9` AS `tag9`, - `i`.`value9` AS `value9`, - `i`.`tag10` AS `tag10`, - `i`.`value10` AS `value10`, - `i`.`minimum` AS `minimum`, - `i`.`upToDown` AS `upToDown`, - `i`.`hasKgPrice` AS `hasKgPrice`, - `i`.`equivalent` AS `Equivalente`, - `i`.`isToPrint` AS `Imprimir`, - `i`.`doPhoto` AS `do_photo`, - `i`.`created` AS `odbc_date`, - `i`.`isFloramondo` AS `isFloramondo`, - `i`.`supplyResponseFk` AS `supplyResponseFk`, - `i`.`stemMultiplier` AS `stemMultiplier`, - `i`.`itemPackingTypeFk` AS `itemPackingTypeFk`, - `i`.`packingOut` AS `packingOut` -FROM `vn`.`item` `i`; \ No newline at end of file +DROP TABLE IF EXISTS account.mailClientAccess__; +DROP TABLE IF EXISTS account.mailSenderAccess__; +DROP TABLE IF EXISTS bi.analisis_ventas_familia_evolution__; +DROP TABLE IF EXISTS bi.live_counter__; +DROP TABLE IF EXISTS bi.partitioning_information__; +DROP TABLE IF EXISTS bi.primer_pedido__; +DROP TABLE IF EXISTS bi.tarifa_premisas__; +DROP TABLE IF EXISTS bi.tarifa_warehouse__; +DROP TABLE IF EXISTS bs.compradores__; +DROP TABLE IF EXISTS bs.salesMonthlySnapshot___; +DROP TABLE IF EXISTS bs.salesPerson__; +DROP TABLE IF EXISTS bs.vendedores_evolution__; +DROP TABLE IF EXISTS vn.botanicExport__; +DROP TABLE IF EXISTS vn.claimRma__; +DROP TABLE IF EXISTS vn.coolerPathDetail__; +DROP TABLE IF EXISTS vn.forecastedBalance__; +DROP TABLE IF EXISTS vn.routeLoadWorker__; +DROP TABLE IF EXISTS vn.routeUserPercentage__; +DROP TABLE IF EXISTS vn.ticketSms__; +DROP TABLE IF EXISTS vn.ticketTrackingState__; +DROP TABLE IF EXISTS vn.warehouseAlias__; From 6f1d962db25fd2b3f536875cedd2393ca75673c0 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 13 Sep 2024 14:39:47 +0200 Subject: [PATCH 4/6] fix: refs #7644 Update in print method --- modules/entry/back/methods/entry/print.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/entry/back/methods/entry/print.js b/modules/entry/back/methods/entry/print.js index c155c3d8b..4d36dda7d 100644 --- a/modules/entry/back/methods/entry/print.js +++ b/modules/entry/back/methods/entry/print.js @@ -53,6 +53,13 @@ module.exports = Self => { } if (!merger._doc) throw new UserError('The entry not have stickers'); + + await Self.rawSql(` + UPDATE buy + SET printedStickers = stickers + WHERE entryFk = ? + `, [id], options); + return [await merger.saveAsBuffer(), 'application/pdf', `filename="entry-${id}.pdf"`]; }; }; From 635eb405a29b0d571f1b67650d7e7d83734f40a6 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 13 Sep 2024 14:53:44 +0200 Subject: [PATCH 5/6] fix: refs #7644 Update in print method --- modules/entry/back/methods/entry/print.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/entry/back/methods/entry/print.js b/modules/entry/back/methods/entry/print.js index 4d36dda7d..5b9de9a69 100644 --- a/modules/entry/back/methods/entry/print.js +++ b/modules/entry/back/methods/entry/print.js @@ -58,7 +58,7 @@ module.exports = Self => { UPDATE buy SET printedStickers = stickers WHERE entryFk = ? - `, [id], options); + `, [id], myOptions); return [await merger.saveAsBuffer(), 'application/pdf', `filename="entry-${id}.pdf"`]; }; From d7679fcb500a7c09e9c5ec5d9695bf8570b4b976 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 16 Sep 2024 09:01:47 +0200 Subject: [PATCH 6/6] feat: refs #7977 muestra las facturas sin vencimientos tambien --- .../procedures/supplier_statementWithEntries.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/db/routines/vn/procedures/supplier_statementWithEntries.sql b/db/routines/vn/procedures/supplier_statementWithEntries.sql index df3b918a7..55b271296 100644 --- a/db/routines/vn/procedures/supplier_statementWithEntries.sql +++ b/db/routines/vn/procedures/supplier_statementWithEntries.sql @@ -17,14 +17,14 @@ BEGIN * @param vOrderBy Order by criteria * @param vIsConciliated Indicates whether it is reconciled or not * @param vHasEntries Indicates if future entries must be shown -* @return tmp.supplierStatement +* @return tmp.supplierStatement */ DECLARE vBalanceStartingDate DATETIME; SET @euroBalance:= 0; SET @currencyBalance:= 0; - SELECT balanceStartingDate + SELECT balanceStartingDate INTO vBalanceStartingDate FROM invoiceInConfig; @@ -64,14 +64,14 @@ BEGIN c.code, 'invoiceIn' statementType FROM invoiceIn ii - JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id + LEFT JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id JOIN currency c ON c.id = ii.currencyFk WHERE ii.issued >= vBalanceStartingDate - AND ii.supplierFk = vSupplierFk + AND ii.supplierFk = vSupplierFk AND vCurrencyFk IN (ii.currencyFk, 0) AND vCompanyFk IN (ii.companyFk, 0) AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated) - GROUP BY iid.id + GROUP BY iid.id, ii.id UNION ALL SELECT p.bankFk, p.companyFk, @@ -107,7 +107,7 @@ BEGIN AND vCurrencyFk IN (p.currencyFk, 0) AND vCompanyFk IN (p.companyFk, 0) AND (vIsConciliated = p.isConciliated OR NOT vIsConciliated) - UNION ALL + UNION ALL SELECT NULL, companyFk, NULL, @@ -134,7 +134,7 @@ BEGIN AND vCurrencyFk IN (se.currencyFk,0) AND vCompanyFk IN (se.companyFk,0) AND (vIsConciliated = se.isConciliated OR NOT vIsConciliated) - UNION ALL + UNION ALL SELECT NULL bankFk, e.companyFk, 'E' serial, @@ -150,7 +150,7 @@ BEGIN FALSE isBooked, c.code, 'order' - FROM entry e + FROM entry e JOIN travel tr ON tr.id = e.travelFk JOIN currency c ON c.id = e.currencyFk WHERE e.supplierFk = vSupplierFk