closes 4732 etiquetas con QR para previa y item #1163
|
@ -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),
|
(7, NULL, 'Ancho de la base', 1, 1, NULL, 'mm',NULL, NULL),
|
||||||
(23, 'stems', 'Tallos', 1, 1, NULL, NULL, NULL, 'stems'),
|
(23, 'stems', 'Tallos', 1, 1, NULL, NULL, NULL, 'stems'),
|
||||||
(27, NULL, 'Longitud(cm)', 1, 1, NULL, 'cm', NULL, NULL),
|
(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),
|
(56, NULL, 'Genero', 1, 0, NULL, NULL, NULL, NULL),
|
||||||
(58, NULL, 'Variedad', 1, 0, NULL, NULL, NULL, NULL),
|
(58, NULL, 'Variedad', 1, 0, NULL, NULL, NULL, NULL),
|
||||||
(67, 'category', 'Categoria', 1, 0, NULL, NULL, NULL, NULL),
|
(67, 'category', 'Categoria', 1, 0, NULL, NULL, NULL, NULL),
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
const stmt = new ParameterizedSQL(
|
const stmt = new ParameterizedSQL(
|
||||||
`SELECT
|
`SELECT DISTINCT
|
||||||
t.id,
|
t.id,
|
||||||
t.packages,
|
t.packages,
|
||||||
t.warehouseFk,
|
t.warehouseFk,
|
||||||
|
|
|
@ -3,9 +3,12 @@ SELECT
|
||||||
i.name,
|
i.name,
|
||||||
i.stems,
|
i.stems,
|
||||||
i.size,
|
i.size,
|
||||||
b.packing
|
b.packing,
|
||||||
|
p.name as 'producer'
|
||||||
FROM vn.item i
|
FROM vn.item i
|
||||||
JOIN cache.last_buy clb ON clb.item_id = i.id
|
JOIN cache.last_buy clb ON clb.item_id = i.id
|
||||||
JOIN vn.buy b ON b.id = clb.buy_id
|
JOIN vn.buy b ON b.id = clb.buy_id
|
||||||
JOIN vn.entry e ON e.id = b.entryFk
|
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 = ?
|
WHERE i.id = ? AND clb.warehouse_id = ?
|
Loading…
Reference in New Issue