From 974c835fd1b4a818f8997daadc89755b40f54a3a Mon Sep 17 00:00:00 2001 From: Ana Elisa dos Santos Date: Fri, 22 Feb 2019 12:39:16 +0000 Subject: [PATCH] 2261 - Aplicar filtros nos indicadores Dentro do painel Faturamento x Despesas. --- ... Faturamento x Despesas Detalhes Placa.xml | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 03 - Painéis/TLK - Faturamento x Despesas Detalhes Placa.xml diff --git a/03 - Painéis/TLK - Faturamento x Despesas Detalhes Placa.xml b/03 - Painéis/TLK - Faturamento x Despesas Detalhes Placa.xml new file mode 100644 index 0000000..62886a1 --- /dev/null +++ b/03 - Painéis/TLK - Faturamento x Despesas Detalhes Placa.xml @@ -0,0 +1,179 @@ + + + +
+ Indicador Controle de Gastos + Indicadores Controle de Gastos + + + + + + + + + + + { + var texto = '

Despesas com Veículos

'; + texto += ''; + var total = 0; + var contador = 0; + + while(dsFaturamento.next()){ + var divisao = contador / 2; + /*console.log("divisao: "+divisao); + console.log("contador: "+contador); + console.log("divisao%2: "+divisao%2); + console.log("dsFaturamento: "+dsFaturamento);*/ + + if(contador%2 == 0){ + texto += ''; + }else{ + texto += ''; + } + + contador += 1; + + texto += ''; + texto += ''; + texto += ''; + total += dsFaturamento.getNumber("VALOR"); + /*console.log("textovalor: "+texto);*/ + console.log("total: "+total); + } + + /*TOTALIZADOR*/ + texto += ''; + texto += ''; + texto += ''; + texto += ''; + + texto += '
' + dsFaturamento.getString("DESCRICAO") + '' + 'R$ ' + accounting.formatMoney(dsFaturamento.getNumber("VALOR"), "", 2, ".", ",") + '
TOTAIS' + 'R$ ' + accounting.formatMoney(total, "", 2, ".", ",") + '
'; + + console.log("textototal: "+texto); + console.log("Fim Function"); + engine.getLabel('lblDespVeiculos').setValue(texto); + console.log("Atribui label Function"); + }).catch(error=>{ + }); + } + + function run() { + var paramrs = engine.getGlobalVariable('params'); + engine.getField('idCodigo').setValue(paramrs.idCodigo); + engine.getField('idNomeCliente').setValue(paramrs.idNomeCliente); + engine.getField('idDataInicio').setValue(paramrs.idDataInicio); + engine.getField('idDataFim').setValue(paramrs.idDataFim); + engine.getField('idFrotaTerceiro').setValue(paramrs.idFrotaTerceiro); + engine.getField('idCaminhaoCarreta').setValue(paramrs.idCaminhaoCarreta); + + engine.getWidgetController('btnApply').getButton().setIcon("APLICAR"); + + engine.setGlobalVariable('atualizaValores',atualizaValores); + atualizaValores(); + } + ]]> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file