From dec7fc2b91f5f55c8f0a20724eb17b4d926cba6e Mon Sep 17 00:00:00 2001 From: Ana Elisa dos Santos Date: Fri, 22 Feb 2019 12:29:21 +0000 Subject: [PATCH] 2253 - Remover o campo "Forma de recebimento" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Outras atividades também vinculadas a este painel: 2257 - Calcular automaticamente o valor do imposto ao definir o cliente 2258 - Criar opção para separar lançamentos do tipo Caminhão ou Carreta 2259 - Adicionar filtro por Caminhão ou Carreta no grid --- 03 - Painéis/LANÇAMENTO - Créditos.xml | 2555 +++++++++++---------- 1 file changed, 1380 insertions(+), 1175 deletions(-) diff --git a/03 - Painéis/LANÇAMENTO - Créditos.xml b/03 - Painéis/LANÇAMENTO - Créditos.xml index ab01022..caa2b51 100644 --- a/03 - Painéis/LANÇAMENTO - Créditos.xml +++ b/03 - Painéis/LANÇAMENTO - Créditos.xml @@ -1,1176 +1,1381 @@ - - -
- Lançar Valor - Regras Contábeis - - Subtotal Frete
R$ ' + r.total_frete + '
'); - } else { - engine.getLabel('sub').setValue('Subtotal Frete
R$ 0,00
'); - } - if (r.total_imposto) { - engine.getLabel('subImposto').setValue('Subtotal Impostos
R$ ' + r.total_imposto + '
'); - } else { - engine.getLabel('subImposto').setValue('Subtotal Impostos
R$ 0,00
'); - } - if (r.total_liquido) { - engine.getLabel('subLiquido').setValue('Subtotal (Frete - Impostos)
R$ ' + r.total_liquido + '
'); - } else { - engine.getLabel('subLiquido').setValue('Subtotal (Frete - Impostos)
R$ 0,00
'); - } - }); - } - - function run() { - engine.getField('valorImposto').setEnabled(false); - engine.getField('valorLiquido').setEnabled(false); - engine.setGlobalVariable('abertura',1); - engine.getField('frotaTerceiro').setValue('F'); - engine.getField('ftFrotaTerceiro').setValue('A'); - - var d = new java.util.Date(); - engine.setGlobalVariable('fncLimpaCampos', fncLimpaCampos); - engine.setGlobalVariable('fncSubTotal', fncSubTotal); - engine.getField('dataInicio').setValue(d); - engine.getField('dataFinal').setValue(d); - engine.getField('tbLancamentos').refresh(); - engine.getGlobalVariable('fncSubTotal')(); - - // Registrando icones - engine.getWidgetController('btnGravar').getButton().setIcon(IconFactory.instance().getIconAsResource(IconLibraryAPISmall.SALVAR)); - engine.getWidgetController('btnFiltrar').getButton().setIcon(IconFactory.instance().getIconAsResource(IconLibraryAPISmall.FILTRAR)); - engine.getWidgetController('btnLimparFiltro').getButton().setIcon(IconFactory.instance().getIconAsResource(IconLibraryAPISmall.LIMPAR)); - } - ]]> -
- - - - - - - - - - - - - - - - - - - - - - - - - CODIGO - PLACA - - - - - - - - - - - - - PLACA_CARRETA - PLACA_CARRETA - - - - - - - - CODIGO - NOME - - - - - - - - - CODIGO - NOME - - - - - - - - CODIGO - DESCRICAO - - - - - - - - - - - - - - - - - - - - - CHAVE_ESTADO - SIGLA - - - - - - - - CHAVE_ESTADO - SIGLA - - - - - - - - - - - - - - - - CODIGO - NOME - - - - - - - - - - - - - - - - - - - - - - - - CODIGO - NOME - - - - - - - - CODIGO - PLACA - - - - - - - - CODIGO - NOME - - - - - - - - - - - - - CHAVE_ESTADO - SIGLA - - - - - - - - - - - - - - - - - - - - - - - - chave_receita_frete - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + +
+ Lançar Valor + Créditos + + Subtotal Frete R$ ' + r.total_frete + ''); + } else { + engine.getLabel('sub').setValue('Subtotal Frete R$ 0,00'); + } + if (r.total_imposto) { + engine.getLabel('subImposto').setValue('Subtotal Impostos R$ ' + r.total_imposto + ''); + } else { + engine.getLabel('subImposto').setValue('Subtotal Impostos R$ 0,00'); + } + if (r.total_liquido) { + engine.getLabel('subLiquido').setValue('Subtotal (Frete - Impostos) R$ ' + r.total_liquido + ''); + } else { + engine.getLabel('subLiquido').setValue('Subtotal (Frete - Impostos) R$ 0,00'); + } + }); + } + + function fncLancFrete(){ + var funcionario = engine.getField('funcionario').getValue(); + var sql = "Select coalesce(nao_carregar_frete,false) as nao_carregar_frete from funcionario where codigo = :ParFuncionario"; + var db = libService.loadScript('db'); + var dbVitruvio = new db('vitruvio'); + var row = dbVitruvio.queryRow(sql, {ParFuncionario: funcionario}); + + if (row) { + //Enable/disable componente frete + if (row.nao_carregar_frete == false) { + engine.getField('valorFrete').setEnabled(false); + engine.getField('origemFrete').setRequired(true); + engine.getField('origemFrete').setVisible(true); + } else { + engine.getField('valorFrete').setEnabled(true); + engine.getField('origemFrete').setRequired(false); + engine.getField('origemFrete').setVisible(false); + } + } + } + + function run() { + engine.getField('valorImposto').setEnabled(false); + engine.getField('valorLiquido').setEnabled(false); + engine.setGlobalVariable('abertura',1); + engine.getField('frotaTerceiro').setValue('F'); + engine.getField('ftFrotaTerceiro').setValue('A'); + engine.getField('caminhaoCarreta').setValue('C'); + engine.getField('ftCaminhaoCarreta').setValue('A'); + + var d = new java.util.Date(); + engine.setGlobalVariable('fncLimpaCampos', fncLimpaCampos); + engine.setGlobalVariable('fncSubTotal', fncSubTotal); + engine.getField('dataInicio').setValue(d); + engine.getField('dataFinal').setValue(d); + engine.getField('tbLancamentos').refresh(); + engine.getGlobalVariable('fncSubTotal')(); + engine.setGlobalVariable('fncLancFrete', fncLancFrete); + + // Registrando icones + engine.getWidgetController('btnGravar').getButton().setIcon(IconFactory.instance().getIconAsResource(IconLibraryAPISmall.SALVAR)); + engine.getWidgetController('btnFiltrar').getButton().setIcon(IconFactory.instance().getIconAsResource(IconLibraryAPISmall.FILTRAR)); + engine.getWidgetController('btnLimparFiltro').getButton().setIcon(IconFactory.instance().getIconAsResource(IconLibraryAPISmall.LIMPAR)); + } + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CODIGO + PLACA + + + + + + + + + + + + + + PLACA_CARRETA + PLACA_CARRETA + + + + + + + + + CODIGO + NOME + + + + + + + + + + + + + + CODIGO + NOME + + + + + + + + + + + + + + + + + + CODIGO + DESCRICAO + + + + + + + + + CHAVE_FRETE + DESCRICAO + + + + + + + + + + + + + + + + + CHAVE_PRACA + PERCURSO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CODIGO + NOME + + + + + + + + + + + + CODIGO + PLACA + + + + + + + + + PLACA_CARRETA + PLACA_CARRETA + + + + + + + + + + + CODIGO + NOME + + + + + + + + + CHAVE_ESTADO + SIGLA + + + + + + + + + CHAVE_ESTADO + SIGLA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + chave_receita_frete + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file