From 74a5d1f2173b7c4d7f924d1cf3dcc8590ef389cb Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 12:23:01 +0200 Subject: [PATCH 01/22] fix: ticket #216260 buy_recalcPrices --- .../vn/procedures/buy_recalcPrices.sql | 75 ++++++++++--------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index 35eb00cf1..c63e7c55c 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -2,51 +2,56 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`() BEGIN /** - * Recalcula los precios para las compras insertadas en tmp.buyRecalc + * Recalcula los precios para las compras insertadas en tmp.buyRecalc. * * @param tmp.buyRecalc (id) */ DECLARE vLanded DATE; DECLARE vWarehouseFk INT; - DECLARE vHasNotPrice BOOL; - DECLARE vBuyingValue DECIMAL(10,4); - DECLARE vPackagingFk VARCHAR(10); DECLARE vIsWarehouseFloramondo BOOL; + DECLARE vDone BOOL; + DECLARE vTravels CURSOR FOR + SELECT t.landed, t.warehouseInFk, (w.code = 'flm') + FROM tmp.buyRecalc br + JOIN buy b ON b.id = br.id + JOIN entry e ON e.id = b.entryFk + JOIN travel t ON t.id = e.travelFk + JOIN warehouse w ON w.id = t.warehouseInFk + GROUP BY t.landed, t.warehouseInFk, (w.code = 'flm'); - SELECT t.landed, t.warehouseInFk, (w.`name` = 'Floramondo') - INTO vLanded, vWarehouseFk, vIsWarehouseFloramondo - FROM tmp.buyRecalc br - JOIN buy b ON b.id = br.id - JOIN entry e ON e.id = b.entryFk - JOIN travel t ON t.id = e.travelFk - JOIN warehouse w ON w.id = t.warehouseInFk - LIMIT 1; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - CALL rate_getPrices(vLanded, vWarehouseFk); + OPEN vTravels; + l: LOOP + SET vDone = FALSE; + FETCH vTravels INTO vLanded, vWarehouseFk, vIsWarehouseFloramondo; - UPDATE buy b - JOIN tmp.buyRecalc br ON br.id = b.id AND (@buyId := b.id) - LEFT JOIN packaging p ON p.id = b.packagingFk - JOIN item i ON i.id = b.itemFk - JOIN entry e ON e.id = b.entryFk - JOIN itemType it ON it.id = i.typeFk - JOIN travel tr ON tr.id = e.travelFk - JOIN agencyMode am ON am.id = tr.agencyModeFk - JOIN tmp.rate r - JOIN volumeConfig vc - SET b.freightValue = @PF:= IFNULL(((am.m3 * @m3:= item_getVolume(b.itemFk, b.packagingFk) / 1000000) - / b.packing) * IF(am.hasWeightVolumetric, GREATEST(b.weight / @m3 / vc.aerealVolumetricDensity, 1), 1), 0), - b.comissionValue = @CF:= ROUND(IFNULL(e.commission * b.buyingValue / 100, 0), 3), - b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)), - b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 - b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), - b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2); + IF vDone THEN + LEAVE l; + END IF; - SELECT (b.buyingValue = b.price2), b.buyingValue, b.packagingFk - INTO vHasNotPrice, vBuyingValue, vPackagingFk - FROM vn.buy b - WHERE b.id = @buyId AND b.buyingValue <> 0.01; + CALL rate_getPrices(vLanded, vWarehouseFk); - DROP TEMPORARY TABLE tmp.rate; + UPDATE buy b + JOIN tmp.buyRecalc br ON br.id = b.id AND (@buyId := b.id) + LEFT JOIN packaging p ON p.id = b.packagingFk + JOIN item i ON i.id = b.itemFk + JOIN entry e ON e.id = b.entryFk + JOIN itemType it ON it.id = i.typeFk + JOIN travel tr ON tr.id = e.travelFk + JOIN agencyMode am ON am.id = tr.agencyModeFk + JOIN tmp.rate r + JOIN volumeConfig vc + SET b.freightValue = @PF:= IFNULL(((am.m3 * @m3:= item_getVolume(b.itemFk, b.packagingFk) / 1000000) + / b.packing) * IF(am.hasWeightVolumetric, GREATEST(b.weight / @m3 / vc.aerealVolumetricDensity, 1), 1), 0), + b.comissionValue = @CF:= ROUND(IFNULL(e.commission * b.buyingValue / 100, 0), 3), + b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)), + b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 + b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), + b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2); + + DROP TEMPORARY TABLE tmp.rate; + END LOOP; + CLOSE vTravels; END$$ DELIMITER ; From 297eb30395cbfc1d4202b67f5ee6bb823cce24b1 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 12:41:44 +0200 Subject: [PATCH 02/22] fix: ticket #216260 buy_recalcPrices --- db/routines/vn/procedures/buy_recalcPrices.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index c63e7c55c..d4f205595 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -17,7 +17,7 @@ BEGIN JOIN entry e ON e.id = b.entryFk JOIN travel t ON t.id = e.travelFk JOIN warehouse w ON w.id = t.warehouseInFk - GROUP BY t.landed, t.warehouseInFk, (w.code = 'flm'); + GROUP BY t.landed, t.warehouseInFk; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; @@ -48,7 +48,9 @@ BEGIN b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)), b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), - b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2); + b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2) + WHERE t.landed = vLanded + AND t.warehouseInFk = vWarehouseFk; DROP TEMPORARY TABLE tmp.rate; END LOOP; From afcb590a9e790ecac64bb72926ef40ab89a4d32f Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 4 Sep 2024 12:45:33 +0200 Subject: [PATCH 03/22] fix: ticket #216260 buy_recalcPrices --- db/routines/vn/procedures/buy_recalcPrices.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/buy_recalcPrices.sql b/db/routines/vn/procedures/buy_recalcPrices.sql index d4f205595..b05a9bfa9 100644 --- a/db/routines/vn/procedures/buy_recalcPrices.sql +++ b/db/routines/vn/procedures/buy_recalcPrices.sql @@ -49,8 +49,8 @@ BEGIN b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0 b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2), b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2) - WHERE t.landed = vLanded - AND t.warehouseInFk = vWarehouseFk; + WHERE tr.landed = vLanded + AND tr.warehouseInFk = vWarehouseFk; DROP TEMPORARY TABLE tmp.rate; END LOOP; From 75be124e1f9e600d74b509cb3d22e7f417c79681 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 4 Sep 2024 14:14:12 +0200 Subject: [PATCH 04/22] feat: refs #7929 create table material --- .../11213-aquaCarnation/00-firstScript.sql | 253 ++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 db/versions/11213-aquaCarnation/00-firstScript.sql diff --git a/db/versions/11213-aquaCarnation/00-firstScript.sql b/db/versions/11213-aquaCarnation/00-firstScript.sql new file mode 100644 index 000000000..3067ce06e --- /dev/null +++ b/db/versions/11213-aquaCarnation/00-firstScript.sql @@ -0,0 +1,253 @@ + +use vn; + +CREATE TABLE IF NOT EXISTS `material` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_UNIQUE` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +INSERT IGNORE INTO `material` (`name`) VALUES ('Abedul'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acacia'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acero'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acero Galvanizado'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acetato'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Acrílico'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Alambre'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Algodón'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Aluminio'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Antracita'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Arcilla'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Bambú'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Banano'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Canneté'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cartón'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cartulina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Celofán'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cemento'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cera'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cerámica'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Chapa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Chenilla'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cloruro de polivinilo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cobre'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Corcho'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cordel'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cotton'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cotton Chess'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cristal'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cubo Asa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cuerda'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Cuero'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Doble Raso'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Doble Velvet'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Eco Glass'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Encaje'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Esparto'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Espuma'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Felpa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra de Coco'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra de Vidrio y Resina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Fieltro'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Foam'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Gamuza'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Gasa'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Glass'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Goma'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Grafito'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hierro'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hoja Carbono'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hoja de Mirto'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Hormigón'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Jute'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Kraft'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lana'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Látex'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Latrix'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lienzo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lino'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Lurex'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Madera'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Metacrilato'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Metal'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Mimbre'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Musgo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Nonwoven'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Nylon'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Organza'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Paja'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Pana'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Papel'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Paperweb'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Paulownia'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Peluche'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Piedra'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Pizarra'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Plástico'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Poliestireno'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Polipropileno'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Poliresina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Polyester'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Porcelana'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Puntilla'); +INSERT IGNORE INTO `material` (`name`) VALUES ('PVC'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rafia'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rama'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Raso'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rattan'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rayon'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Reciclable'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Red'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Resina'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Roca'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Rope'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Saco'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Salim'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Seagrass'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Silicona'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Sisal'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Tejido'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Tela'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Terciopelo'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Terracota'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Textil'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Titanio'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Tul'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Velvet'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Vidrio'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Yute'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Zinc'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Base de goma'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Base de madera'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Plumas'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Protección Uva'); +INSERT IGNORE INTO `material` (`name`) VALUES ('Purpurina'); + +CREATE TABLE IF NOT EXISTS `secondaryMaterial` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_UNIQUE` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Abedul'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acacia'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero Galvanizado'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acetato'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acrílico'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Alambre'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Algodón'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Aluminio'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Antracita'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Arcilla'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Bambú'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Banano'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Canneté'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartón'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartulina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Celofán'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cemento'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cera'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cerámica'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chapa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chenilla'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cloruro de polivinilo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cobre'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Corcho'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cordel'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton Chess'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cristal'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cubo Asa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuerda'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuero'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Raso'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Velvet'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Eco Glass'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Encaje'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Esparto'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Espuma'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Felpa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Coco'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Vidrio y Resina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fieltro'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Foam'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gamuza'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gasa'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Glass'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Goma'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Grafito'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hierro'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja Carbono'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja de Mirto'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hormigón'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Jute'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Kraft'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lana'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Látex'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Latrix'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lienzo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lino'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lurex'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Madera'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metacrilato'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metal'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Mimbre'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Musgo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nonwoven'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nylon'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Organza'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paja'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pana'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Papel'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paperweb'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paulownia'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Peluche'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Piedra'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pizarra'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plástico'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliestireno'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polipropileno'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliresina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polyester'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Porcelana'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Puntilla'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('PVC'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rafia'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rama'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Raso'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rattan'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rayon'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Reciclable'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Red'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Resina'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Roca'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rope'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Saco'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Salim'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Seagrass'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Silicona'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Sisal'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tejido'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tela'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terciopelo'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terracota'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Textil'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Titanio'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tul'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Velvet'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Vidrio'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Yute'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Zinc'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de goma'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de madera'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plumas'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Protección Uva'); +INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Purpurina'); + +UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name= 'Material'; +UPDATE vn.tag SET isFree=0,sourceTable='secondaryMaterial' WHERE name='Material secundario'; \ No newline at end of file From 95d4c706d49497a31cc77bc27ed14faffa08faee Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 5 Sep 2024 09:23:58 +0200 Subject: [PATCH 05/22] fix: refs #7346 multiple to quick in closure.js --- modules/ticket/back/methods/ticket/closure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/closure.js b/modules/ticket/back/methods/ticket/closure.js index c39d51c02..89343b193 100644 --- a/modules/ticket/back/methods/ticket/closure.js +++ b/modules/ticket/back/methods/ticket/closure.js @@ -13,7 +13,7 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) { const failedtickets = []; for (const ticket of tickets) { try { - await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'multiple'); + await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'quick'); await Self.rawSql( `CALL vn.ticket_closeByTicket(?)`, [ticket.id], From 684658bb966766ad0a3d7bd5175a3ab7709e38a2 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 5 Sep 2024 14:25:50 +0200 Subject: [PATCH 06/22] feat: refs #7929 quitar codigo --- .../11213-aquaCarnation/00-firstScript.sql | 126 +----------------- 1 file changed, 1 insertion(+), 125 deletions(-) diff --git a/db/versions/11213-aquaCarnation/00-firstScript.sql b/db/versions/11213-aquaCarnation/00-firstScript.sql index 3067ce06e..b23a6c782 100644 --- a/db/versions/11213-aquaCarnation/00-firstScript.sql +++ b/db/versions/11213-aquaCarnation/00-firstScript.sql @@ -125,129 +125,5 @@ INSERT IGNORE INTO `material` (`name`) VALUES ('Plumas'); INSERT IGNORE INTO `material` (`name`) VALUES ('Protección Uva'); INSERT IGNORE INTO `material` (`name`) VALUES ('Purpurina'); -CREATE TABLE IF NOT EXISTS `secondaryMaterial` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; - -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Abedul'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acacia'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acero Galvanizado'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acetato'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Acrílico'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Alambre'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Algodón'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Aluminio'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Antracita'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Arcilla'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Bambú'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Banano'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Canneté'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartón'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cartulina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Celofán'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cemento'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cera'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cerámica'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chapa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Chenilla'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cloruro de polivinilo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cobre'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Corcho'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cordel'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cotton Chess'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cristal'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cubo Asa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuerda'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Cuero'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Raso'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Doble Velvet'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Eco Glass'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Encaje'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Esparto'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Espuma'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Felpa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Coco'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fibra de Vidrio y Resina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Fieltro'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Foam'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gamuza'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Gasa'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Glass'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Goma'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Grafito'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hierro'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja Carbono'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hoja de Mirto'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Hormigón'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Jute'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Kraft'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lana'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Látex'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Latrix'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lienzo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lino'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Lurex'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Madera'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metacrilato'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Metal'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Mimbre'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Musgo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nonwoven'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Nylon'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Organza'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paja'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pana'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Papel'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paperweb'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Paulownia'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Peluche'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Piedra'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Pizarra'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plástico'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliestireno'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polipropileno'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Poliresina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Polyester'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Porcelana'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Puntilla'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('PVC'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rafia'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rama'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Raso'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rattan'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rayon'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Reciclable'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Red'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Resina'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Roca'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Rope'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Saco'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Salim'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Seagrass'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Silicona'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Sisal'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tejido'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tela'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terciopelo'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Terracota'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Textil'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Titanio'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Tul'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Velvet'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Vidrio'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Yute'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Zinc'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de goma'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Base de madera'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Plumas'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Protección Uva'); -INSERT IGNORE INTO `secondaryMaterial` (`name`) VALUES ('Purpurina'); - UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name= 'Material'; -UPDATE vn.tag SET isFree=0,sourceTable='secondaryMaterial' WHERE name='Material secundario'; \ No newline at end of file +UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name='Material secundario'; \ No newline at end of file From 3e4caa8edf5f4633aedaa7bb591bb15549113d26 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 5 Sep 2024 14:38:55 +0200 Subject: [PATCH 07/22] feat: refs #7929 autoincrement 1 --- db/versions/11213-aquaCarnation/00-firstScript.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/versions/11213-aquaCarnation/00-firstScript.sql b/db/versions/11213-aquaCarnation/00-firstScript.sql index b23a6c782..9e744b66c 100644 --- a/db/versions/11213-aquaCarnation/00-firstScript.sql +++ b/db/versions/11213-aquaCarnation/00-firstScript.sql @@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS `material` ( `name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; INSERT IGNORE INTO `material` (`name`) VALUES ('Abedul'); INSERT IGNORE INTO `material` (`name`) VALUES ('Acacia'); From a7bc58a5bc6374e9c9227ff9ab376a7ea0e332dd Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 5 Sep 2024 14:45:17 +0200 Subject: [PATCH 08/22] fix: refs #7931 Immediately discount order lines from available --- .../cache/procedures/available_refresh.sql | 7 +++++- .../cache/procedures/available_updateItem.sql | 23 +++++++++++++++++++ .../hedera/procedures/order_addItem.sql | 10 ++++---- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 db/routines/cache/procedures/available_updateItem.sql diff --git a/db/routines/cache/procedures/available_refresh.sql b/db/routines/cache/procedures/available_refresh.sql index abf023a41..87c003648 100644 --- a/db/routines/cache/procedures/available_refresh.sql +++ b/db/routines/cache/procedures/available_refresh.sql @@ -1,5 +1,10 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_refresh`( + OUT `vCalc` INT, + `vRefresh` INT, + `vWarehouse` INT, + `vDated` DATE +) proc: BEGIN DECLARE vStartDate DATE; DECLARE vReserveDate DATETIME; diff --git a/db/routines/cache/procedures/available_updateItem.sql b/db/routines/cache/procedures/available_updateItem.sql new file mode 100644 index 000000000..347eaa137 --- /dev/null +++ b/db/routines/cache/procedures/available_updateItem.sql @@ -0,0 +1,23 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_updateItem`( + `vItem` INT, + `vWarehouse` INT, + `vDated` DATE, + `vQuantity` INT +) +BEGIN + DECLARE vCalc INT; + + SELECT id INTO vCalc FROM cache_calc + WHERE cacheName = 'available' + AND params = CONCAT_WS('/', vWarehouse, vDated) + AND last_refresh <= NOW(); + + IF vCalc IS NOT NULL THEN + UPDATE available + SET available = available - vQuantity + WHERE calc_id = vCalc + AND item_id = vItem; + END IF; +END$$ +DELIMITER ; diff --git a/db/routines/hedera/procedures/order_addItem.sql b/db/routines/hedera/procedures/order_addItem.sql index f690f9aa6..204dcb6bf 100644 --- a/db/routines/hedera/procedures/order_addItem.sql +++ b/db/routines/hedera/procedures/order_addItem.sql @@ -1,8 +1,8 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_addItem`( vSelf INT, - vWarehouse INT, - vItem INT, + vWarehouse INT, + vItem INT, vAmount INT) BEGIN /** @@ -37,7 +37,7 @@ BEGIN ROLLBACK; RESIGNAL; END; - + CALL order_calcCatalogFromItem(vSelf, vItem); START TRANSACTION; @@ -102,6 +102,8 @@ BEGIN amount = vAdd, price = vPrice; + CALL cache.available_updateItem(vItem, vWarehouse, vShipment, vAdd); + SET vRow = LAST_INSERT_ID(); INSERT INTO orderRowComponent (rowFk, componentFk, price) @@ -121,6 +123,6 @@ BEGIN END IF; COMMIT; - CALL vn.ticketCalculatePurge; + CALL vn.ticketCalculatePurge; END$$ DELIMITER ; From c1e086072b7c95addf1d40f08321444f386f1868 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 5 Sep 2024 14:50:36 +0200 Subject: [PATCH 09/22] fix: refs #7524 load after get client --- modules/client/front/balance/create/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index 9113d7605..f4ff0e3aa 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -23,6 +23,7 @@ class Controller extends Dialog { } set clientFk(value) { + if (!value) return; this.receipt.clientFk = value; const filter = { @@ -32,6 +33,7 @@ class Controller extends Dialog { } }; + this.getAmountPaid(); this.$http.get(`Clients/findOne`, {filter}) .then(res => { this.receipt.email = res.data.email; @@ -50,7 +52,6 @@ class Controller extends Dialog { set companyFk(value) { this.receipt.companyFk = value; - this.getAmountPaid(); } set description(value) { @@ -152,7 +153,7 @@ class Controller extends Dialog { getAmountPaid() { const filter = { where: { - clientFk: this.$params.id, + clientFk: this.$params.id ?? this.clientFk, companyFk: this.receipt.companyFk } }; @@ -210,8 +211,8 @@ ngModule.vnComponent('vnClientBalanceCreate', { payed: ' Date: Thu, 5 Sep 2024 15:47:45 +0200 Subject: [PATCH 10/22] fix: refs #7524 add fixture orm config --- db/dump/fixtures.before.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 769c081c5..9f590233f 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3953,3 +3953,7 @@ VALUES (4, 'Referencia Transferencias', 'trnRef'), (5, 'Referencia Nominas', 'payRef'), (6, 'ABA', 'aba'); + +INSERT INTO vn.ormConfig SET + id = 1, + selectLimit = 1000; \ No newline at end of file From 640b45ed995a3e75fadcf3f3931438553f55d7bc Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 09:06:00 +0200 Subject: [PATCH 11/22] fix: refs #7931 Apply PR change requests --- .../cache/procedures/available_updateItem.sql | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/db/routines/cache/procedures/available_updateItem.sql b/db/routines/cache/procedures/available_updateItem.sql index 347eaa137..8e94a9d75 100644 --- a/db/routines/cache/procedures/available_updateItem.sql +++ b/db/routines/cache/procedures/available_updateItem.sql @@ -6,12 +6,20 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `cache`.`available_update `vQuantity` INT ) BEGIN +/** + * Immediately deduct/add an amount from the available cache (if exists). + * + * @param vItem The item id + * @param vWarehouse The warehouse id + * @param vDated Available cache date + * @param vQuantity The amount to be deducted from the cache + */ DECLARE vCalc INT; - SELECT id INTO vCalc FROM cache_calc + SELECT id INTO vCalc + FROM cache_calc WHERE cacheName = 'available' - AND params = CONCAT_WS('/', vWarehouse, vDated) - AND last_refresh <= NOW(); + AND params = CONCAT_WS('/', vWarehouse, vDated); IF vCalc IS NOT NULL THEN UPDATE available From 48f94140e265cadc274833ef0004dfae66b73273 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 09:16:22 +0200 Subject: [PATCH 12/22] fix: refs #7931 Back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index 61bf6b3e7..f068a3a32 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -12,7 +12,7 @@ describe('item getVisibleAvailable()', () => { const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(185); + expect(result.available).toEqual(175); expect(result.visible).toEqual(92); await tx.rollback(); From d44dec3703dca6f6182ce9cdbf20dfdc07a5a52c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 11:25:49 +0200 Subject: [PATCH 13/22] fix: refs #7931 Back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index f068a3a32..61bf6b3e7 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -12,7 +12,7 @@ describe('item getVisibleAvailable()', () => { const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(175); + expect(result.available).toEqual(185); expect(result.visible).toEqual(92); await tx.rollback(); From 382e54b57220c36c2e29065986cb3fbf0f78999f Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 11:30:43 +0200 Subject: [PATCH 14/22] fix: refs #7931 Back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index 61bf6b3e7..f068a3a32 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -12,7 +12,7 @@ describe('item getVisibleAvailable()', () => { const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(185); + expect(result.available).toEqual(175); expect(result.visible).toEqual(92); await tx.rollback(); From d10db686e536df72cb982b8d811702f5425c4b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Fri, 6 Sep 2024 12:52:24 +0200 Subject: [PATCH 15/22] fix: refs #7346 ticket_close serial --- db/routines/vn/procedures/ticket_close.sql | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 97da5057c..f8bbe239b 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -17,6 +17,7 @@ BEGIN DECLARE vHasDailyInvoice BOOL; DECLARE vWithPackage BOOL; DECLARE vHasToInvoice BOOL; + DECLARE vSerial VARCHAR(2); DECLARE cur CURSOR FOR SELECT ticketFk FROM tmp.ticket_close; @@ -83,14 +84,17 @@ BEGIN GROUP BY e.freightItemFk); IF(vHasDailyInvoice) AND vHasToInvoice THEN + SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial; + IF NOT vSerial THEN + CALL util.throw('Cannot booking without a serial'); + END IF; - -- Facturacion rapida CALL ticket_setState(vCurTicketFk, 'DELIVERED'); - -- Facturar si está contabilizado + IF vIsTaxDataChecked THEN CALL invoiceOut_newFromClient( vClientFk, - (SELECT invoiceSerial(vClientFk, vCompanyFk, 'multiple')), + vSerial, vShipped, vCompanyFk, NULL, From e2c6a4575610e89c29cc32e9e6718af45189befb Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 12:57:57 +0200 Subject: [PATCH 16/22] fix: refs #7931 Available back test fix --- .../item/back/methods/item/specs/getVisibleAvailable.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js index f068a3a32..adf9b7f76 100644 --- a/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js +++ b/modules/item/back/methods/item/specs/getVisibleAvailable.spec.js @@ -1,7 +1,7 @@ const models = require('vn-loopback/server/server').models; describe('item getVisibleAvailable()', () => { - it('should check available visible for today', async() => { + it('should check available visible for tomorrow', async() => { const tx = await models.Item.beginTransaction({}); const options = {transaction: tx}; @@ -9,10 +9,11 @@ describe('item getVisibleAvailable()', () => { const itemFk = 1; const warehouseFk = 1; const dated = Date.vnNew(); + dated.setDate(dated.getDate() + 1); const result = await models.Item.getVisibleAvailable(itemFk, warehouseFk, dated, options); - expect(result.available).toEqual(175); + expect(result.available).toEqual(185); expect(result.visible).toEqual(92); await tx.rollback(); From 0ad4d3a9592dcb8283b3f25ffd39f8c2bcfbdc3b Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 6 Sep 2024 13:50:49 +0200 Subject: [PATCH 17/22] feat: refs #7905 getBuysCsv --- loopback/util/flatten.js | 42 ++++++++++++++++++ .../entry/back/methods/entry/getBuysCsv.js | 44 +++++++++++++++++++ modules/entry/back/models/entry.js | 1 + 3 files changed, 87 insertions(+) create mode 100644 loopback/util/flatten.js create mode 100644 modules/entry/back/methods/entry/getBuysCsv.js diff --git a/loopback/util/flatten.js b/loopback/util/flatten.js new file mode 100644 index 000000000..18d682d1f --- /dev/null +++ b/loopback/util/flatten.js @@ -0,0 +1,42 @@ +/** + * Flattens an array of objects by converting each object into a flat structure. + * + * @param {Array} dataArray Array of objects to be flattened + * @return {Array} Array of flattened objects + */ +function flatten(dataArray) { + return dataArray.map(item => flattenObj(item.__data)); +} + +/** + * Recursively flattens an object, converting nested properties into a single level object + * with keys representing the original nested structure. + * + * @param {Object} data The object to be flattened + * @param {String} [prefix=''] Optional prefix for nested keys + * @return {Object} Flattened object + */ +function flattenObj(data, prefix = '') { + let result = {}; + try { + for (let key in data) { + if (!data[key]) continue; + + const newKey = prefix ? `${prefix}_${key}` : key; + const value = data[key]; + + if (typeof value === 'object' && value !== null && !Array.isArray(value)) + Object.assign(result, flattenObj(value.__data, newKey)); + else + result[newKey] = value; + } + } catch (error) { + console.error(error); + } + + return result; +} +module.exports = { + flatten, + flattenObj, +}; diff --git a/modules/entry/back/methods/entry/getBuysCsv.js b/modules/entry/back/methods/entry/getBuysCsv.js new file mode 100644 index 000000000..4bd246fa0 --- /dev/null +++ b/modules/entry/back/methods/entry/getBuysCsv.js @@ -0,0 +1,44 @@ +const {toCSV} = require('vn-loopback/util/csv'); +const {flatten} = require('vn-loopback/util/flatten'); +const UserError = require('vn-loopback/util/user-error'); + +module.exports = Self => { + Self.remoteMethodCtx('getBuysCsv', { + description: 'Returns buys for one entry in CSV file format', + accessType: 'READ', + accepts: [{ + arg: 'id', + type: 'number', + required: true, + description: 'The entry id', + http: {source: 'path'} + } + ], + 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/getBuysCsv`, + verb: 'GET' + } + }); + + Self.getBuysCsv = async(ctx, id, options) => { + const data = await Self.getBuys(ctx, id, null, options); + if (!data.length) throw new UserError('The entry has no lines or does not exist'); + const dataFlatted = flatten(data); + return [toCSV(dataFlatted), 'text/csv', `inline; filename="buys-${id}.csv"`]; + }; +}; diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js index b11d64415..8ca79f531 100644 --- a/modules/entry/back/models/entry.js +++ b/modules/entry/back/models/entry.js @@ -3,6 +3,7 @@ module.exports = Self => { require('../methods/entry/filter')(Self); require('../methods/entry/getEntry')(Self); require('../methods/entry/getBuys')(Self); + require('../methods/entry/getBuysCsv')(Self); require('../methods/entry/importBuys')(Self); require('../methods/entry/importBuysPreview')(Self); require('../methods/entry/lastItemBuys')(Self); From 37fabc38bd99da9b6d8755fc59306424586b1cb2 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 6 Sep 2024 14:56:14 +0200 Subject: [PATCH 18/22] fix(hedera): refs #7931 PROC order_addItem NULL available fix, translations added --- .../hedera/procedures/order_addItem.sql | 6 +++++- .../11217-greenDracena/00-hederaMessages.sql | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 db/versions/11217-greenDracena/00-hederaMessages.sql diff --git a/db/routines/hedera/procedures/order_addItem.sql b/db/routines/hedera/procedures/order_addItem.sql index 204dcb6bf..1470ddf35 100644 --- a/db/routines/hedera/procedures/order_addItem.sql +++ b/db/routines/hedera/procedures/order_addItem.sql @@ -47,11 +47,15 @@ BEGIN FROM tmp.zoneGetShipped WHERE warehouseFk = vWarehouse; - SELECT IFNULL(available, 0) INTO vAvailable + SELECT available INTO vAvailable FROM tmp.ticketLot WHERE warehouseFk = vWarehouse AND itemFk = vItem; + IF vAvailable IS NULL THEN + SET vAvailable = 0; + END IF; + IF vAmount > vAvailable THEN CALL util.throw ('ORDER_ROW_UNAVAILABLE'); END IF; diff --git a/db/versions/11217-greenDracena/00-hederaMessages.sql b/db/versions/11217-greenDracena/00-hederaMessages.sql new file mode 100644 index 000000000..f6c9bdce3 --- /dev/null +++ b/db/versions/11217-greenDracena/00-hederaMessages.sql @@ -0,0 +1,19 @@ +INSERT INTO hedera.message (code,description) + VALUES ('ORDER_ROW_UNAVAILABLE','The ordered quantity exceeds the available'); +INSERT INTO hedera.message (code,description) + VALUES ('AMOUNT_NOT_MATCH_GROUPING','The quantity ordered does not match the grouping'); + +INSERT INTO hedera.messageI18n (code,lang,description) + VALUES ('ORDER_ROW_UNAVAILABLE','es','La cantidad pedida excede el disponible'); +INSERT INTO hedera.messageI18n (code,lang,description) + VALUES ('AMOUNT_NOT_MATCH_GROUPING','es','La cantidad pedida no coincide con el agrupado'); + +INSERT INTO hedera.messageI18n (code,lang,description) + VALUES ('ORDER_ROW_UNAVAILABLE','fr','La quantité demandée dépasse ce qui est disponible'); +INSERT INTO hedera.messageI18n (code,lang,description) + VALUES ('AMOUNT_NOT_MATCH_GROUPING','fr','La quantité commandée ne correspond pas au regroupement'); + +INSERT INTO hedera.messageI18n (code,lang,description) + VALUES ('ORDER_ROW_UNAVAILABLE','pt','A quantidade de entrega excede a disponibilidade'); +INSERT INTO hedera.messageI18n (code,lang,description) + VALUES ('AMOUNT_NOT_MATCH_GROUPING','pt','A quantidade solicitada não corresponde ao agrupamento'); From 723ec2b453b16562ab2868044506ddeb0981a408 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 9 Sep 2024 11:34:42 +0200 Subject: [PATCH 19/22] fix: refs #7844 Filter monitor --- modules/monitor/back/methods/sales-monitor/salesFilter.js | 4 ++-- modules/ticket/back/methods/ticket/filter.js | 2 +- modules/ticket/back/methods/ticket/getTicketsFuture.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 8ef51a0d1..927f49999 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -285,7 +285,7 @@ module.exports = Self => { if (hasProblems === true) { whereProblems = {or: [ {'tp.isFreezed': true}, - {'tp.risk': {lt: 0}}, + {'tp.hasRisk': true}, {'tp.hasTicketRequest': true}, {'tp.hasComponentLack': true}, {'tp.isTaxDataChecked': false}, @@ -295,7 +295,7 @@ module.exports = Self => { } else if (hasProblems === false) { whereProblems = {and: [ {'tp.isFreezed': false}, - {'tp.risk': 0}, + {'tp.hasRisk': false}, {'tp.hasTicketRequest': false}, {'tp.hasComponentLack': false}, {'tp.isTaxDataChecked': true}, diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 2209c8df4..c98ddaab6 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -343,7 +343,7 @@ module.exports = Self => { const problems = {[condition]: [ {'tp.isFreezed': hasProblem}, - {'tp.risk': hasProblem}, + {'tp.hasRisk': hasProblem}, {'tp.hasTicketRequest': hasProblem}, {'tp.itemShortage': range}, {'tp.hasRounding': hasProblem} diff --git a/modules/ticket/back/methods/ticket/getTicketsFuture.js b/modules/ticket/back/methods/ticket/getTicketsFuture.js index 9f455ec03..abd269e5e 100644 --- a/modules/ticket/back/methods/ticket/getTicketsFuture.js +++ b/modules/ticket/back/methods/ticket/getTicketsFuture.js @@ -196,7 +196,7 @@ module.exports = Self => { const problems = { [condition]: [ {'tp.isFreezed': hasProblem}, - {'tp.risk': hasProblem}, + {'tp.hasRisk': hasProblem}, {'tp.hasTicketRequest': hasProblem}, {'tp.itemShortage': range}, {'tp.hasComponentLack': hasProblem}, From 88a8b4975bd9118f1c7a306b964a69f7c731ef5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 9 Sep 2024 12:37:49 +0200 Subject: [PATCH 20/22] fix: ticket 218504 ticket_close --- db/routines/vn/procedures/ticket_close.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index f8bbe239b..639b6b505 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -85,7 +85,7 @@ BEGIN IF(vHasDailyInvoice) AND vHasToInvoice THEN SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial; - IF NOT vSerial THEN + IF vSerial IS NULL THEN CALL util.throw('Cannot booking without a serial'); END IF; From d9a4b3e6fb7b689a644499ca205b3e3c54c57226 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 9 Sep 2024 12:42:19 +0200 Subject: [PATCH 21/22] fix: refs #7346 Global invoice --- modules/invoiceOut/front/global-invoicing/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index 9a936611a..b9a5ffe91 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -105,7 +105,8 @@ class Controller extends Section { addressId: address.id, invoiceDate: this.invoiceDate, maxShipped: this.maxShipped, - companyFk: this.companyFk + companyFk: this.companyFk, + serialType: 'quick' }; this.$http.post(`InvoiceOuts/invoiceClient`, params) From 52f368e4f7d96d91598ec0917f796915d86336c7 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 9 Sep 2024 14:25:13 +0200 Subject: [PATCH 22/22] fix: refs #7346 Global invoice --- modules/invoiceOut/front/global-invoicing/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/invoiceOut/front/global-invoicing/index.js b/modules/invoiceOut/front/global-invoicing/index.js index b9a5ffe91..5ea8c2c28 100644 --- a/modules/invoiceOut/front/global-invoicing/index.js +++ b/modules/invoiceOut/front/global-invoicing/index.js @@ -106,7 +106,7 @@ class Controller extends Section { invoiceDate: this.invoiceDate, maxShipped: this.maxShipped, companyFk: this.companyFk, - serialType: 'quick' + serialType: 'global' }; this.$http.post(`InvoiceOuts/invoiceClient`, params)