From 9318e734a5e7ae2ac05f1b2a5083a9b7ddba415e Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 6 Mar 2026 14:01:58 -0300 Subject: [PATCH] bump version --- package-lock.json | 6 +-- package.json | 2 +- src/products/products.module.ts | 71 ++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd02195..c9b4680 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,15 +9,15 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.5" + "@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.6" }, "devDependencies": { "tsx": "^4.21.0" } }, "node_modules/@davinti/jeff": { - "version": "1.0.5", - "resolved": "git+https://git.davinti.com.br/davinTI/jeff.git#de72040736f1459809722c87d602185ae470fb76", + "version": "1.0.6", + "resolved": "git+https://git.davinti.com.br/davinTI/jeff.git#c61edd0051b14b11f02fcb569b48f043c43180cf", "license": "ISC", "dependencies": { "@types/glob": "^8.1.0", diff --git a/package.json b/package.json index 38e5cfc..ceff69f 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "ISC", "description": "", "dependencies": { - "@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.5" + "@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.6" }, "devDependencies": { "tsx": "^4.21.0" diff --git a/src/products/products.module.ts b/src/products/products.module.ts index a0d2b38..b1b57e0 100644 --- a/src/products/products.module.ts +++ b/src/products/products.module.ts @@ -74,6 +74,7 @@ export default moduleFactory label: "Quantidade Embalagem", column: "quantidadeembalagem", format: "number", + entrypoint: "detalhe_preco_embalagem" }, { label: "Estoque Disponível", @@ -228,9 +229,50 @@ export default moduleFactory ], }, ], - }, + }, params: ["codproduto"], }, + detalhe_preco_embalagem: { + name: "Detalhe Preço Embalagem", + display: { + type: "table", + table: { + header: [ + { + label: "Embalagem", + }, + { + label: "Preço Embalagem", + }, + { + label: "Preço Unidade", + }, + { + label: "Margem", + }, + ], + cell: [ + { + field: "EMBALAGEM", + format: "string", + }, + { + field: "PRECO_EMBALAGEM", + format: "currency", + }, + { + field: "PRECO_UNIDADE", + format: "currency", + }, + { + field: "MARGEM", + format: "percentage", + }, + ], + }, + }, + params: ["nrempresa", "codproduto"], + }, }, entrypoint: "consulta", }) @@ -667,6 +709,33 @@ and pes2.qtdembalagem = (select nvl(max(pes3.qtdembalagem), 1) and pes3.seqproduto = pes.seqproduto and pes3.nrosegmento = pes.nrosegmento and pes3.statusvenda = 'A') + `, + }; + }, + detalhe_preco_embalagem: (args) => { + return { + sql: /*sql*/ ` + select ora_hash(mgmp.SEQPRODUTO||mgmp.NROEMPRESA||mgmp.QTDEMBALAGEM||mgmp.NROSEGMENTO) chave, + mgmp.SEQPRODUTO, + mgmp.NROEMPRESA, + mgmp.NROSEGMENTO, + mgmp.QTDEMBALAGEM || ' ' || mgmp.EMBVENDA embalagem, + mgmp.PRECOVALIDNORMAL preco_embalagem, + mgmp.PRECOVALIDNORMAL / mgmp.QTDEMBALAGEM preco_unidade, + trunc(mgmp.MGMPRECOVALIDO,2) margem + from maxv_mgmbaseprodseg mgmp + inner join max_empresa me + on me.nroempresa = mgmp.NROEMPRESA + and me.status = 'A' + and me.dtainiciomovestoque <= trunc(sysdate)-1 + and me.nrodivisao in (2,4) + and me.nroempresa not in (291,298,910,911,920,930,931,940,980) + AND mgmp.NROSEGMENTO IN (2,7) + where 1=1 + and mgmp.seqproduto = ${args.codproduto} + and mgmp.nroempresa = ${args.nrempresa} + AND mgmp.NROSEGMENTO NOT IN (22,23,26) + and mgmp.STATUSVENDA = 'A' ` } }