diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 49cf639ef..d6f102f21 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1206,7 +1206,7 @@ INSERT INTO `vn`.`tag`(`id`, `code`, `name`, `isFree`, `isQuantitatif`, `sourceT (7, NULL, 'Ancho de la base', 1, 1, NULL, 'mm',NULL, NULL), (23, 'stems', 'Tallos', 1, 1, NULL, NULL, NULL, 'stems'), (27, NULL, 'Longitud(cm)', 1, 1, NULL, 'cm', NULL, NULL), - (36, NULL, 'Proveedor', 1, 0, NULL, NULL, NULL, NULL), + (36, 'producer', 'Proveedor', 1, 0, NULL, NULL, NULL, 'producer'), (56, NULL, 'Genero', 1, 0, NULL, NULL, NULL, NULL), (58, NULL, 'Variedad', 1, 0, NULL, NULL, NULL, NULL), (67, 'category', 'Categoria', 1, 0, NULL, NULL, NULL, NULL), diff --git a/modules/route/back/methods/route/getTickets.js b/modules/route/back/methods/route/getTickets.js index 18e5abaf2..72df91158 100644 --- a/modules/route/back/methods/route/getTickets.js +++ b/modules/route/back/methods/route/getTickets.js @@ -32,7 +32,7 @@ module.exports = Self => { Object.assign(myOptions, options); const stmt = new ParameterizedSQL( - `SELECT + `SELECT DISTINCT t.id, t.packages, t.warehouseFk, diff --git a/print/templates/reports/item-label/sql/item.sql b/print/templates/reports/item-label/sql/item.sql index 4b042c320..46aacc2fa 100644 --- a/print/templates/reports/item-label/sql/item.sql +++ b/print/templates/reports/item-label/sql/item.sql @@ -3,9 +3,12 @@ SELECT i.name, i.stems, i.size, - b.packing + b.packing, + p.name as 'producer' FROM vn.item i JOIN cache.last_buy clb ON clb.item_id = i.id JOIN vn.buy b ON b.id = clb.buy_id JOIN vn.entry e ON e.id = b.entryFk + JOIN vn.producer p ON p.id = i.producerFk + WHERE i.id = ? AND clb.warehouse_id = ? \ No newline at end of file