Adicionando query de consulta produtos vdm
davinTI/app-dono-modulos/pipeline/head This commit looks good
davinTI/app-dono-modulos/pipeline/head This commit looks good
This commit is contained in:
@@ -2626,7 +2626,39 @@ and pes2.qtdembalagem = (select nvl(max(pes3.qtdembalagem), 1)
|
|||||||
Verdemar: {
|
Verdemar: {
|
||||||
consulta: (args) => {
|
consulta: (args) => {
|
||||||
return {
|
return {
|
||||||
sql: /*sql*/ ``
|
sql: /*sql*/ `
|
||||||
|
SELECT
|
||||||
|
CAST(p.codigo AS NUMBER(15)) AS code,
|
||||||
|
p.nome AS title
|
||||||
|
FROM produtos p
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND p.inativo = 'N'
|
||||||
|
AND (
|
||||||
|
(
|
||||||
|
${args.filtro} IS NOT NULL
|
||||||
|
AND (
|
||||||
|
CAST(p.codigo AS VARCHAR2(15)) LIKE '%' || ${args.filtro} || '%'
|
||||||
|
OR UPPER(p.nome) LIKE UPPER('%' || ${args.filtro} || '%')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
OR (
|
||||||
|
${args.ean} IS NOT NULL
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM produtos_ean ean
|
||||||
|
WHERE ean.codigo = p.codigo
|
||||||
|
AND ean.codacesso = ${args.ean}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
OR (
|
||||||
|
${args.filtro} IS NULL
|
||||||
|
AND ${args.ean} IS NULL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
ORDER BY p.nome
|
||||||
|
|
||||||
|
|
||||||
|
`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
detalhe: (args) => {
|
detalhe: (args) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user