1731 - Melhoria indicador "Gastos por caminhão"
This commit is contained in:
@@ -448,6 +448,8 @@
|
||||
" from controle_receitas_fretes ccf" +
|
||||
" where 1 = 2";
|
||||
if (engine) {
|
||||
var datainicio = engine.getField('dataInicio').getValue();
|
||||
var datafinal = engine.getField('dataFinal').getValue();
|
||||
sql = "Select ccf.chave_receita_frete, ccf.data, " +
|
||||
" (select co.nome from clientes co where co.codigo = ccf.chave_cliente) cliente," +
|
||||
" (select cv.placa from veiculo cv where cv.codigo = ccf.chave_veiculo) veiculo," +
|
||||
@@ -462,8 +464,10 @@
|
||||
" ccf.valor_imposto valor_imposto, " +
|
||||
" ccf.valor_liquido valor_liquido, " +
|
||||
" ccf.placa_carreta placa_carreta " +
|
||||
" from controle_receitas_fretes ccf" +
|
||||
" where ccf.data between '" + engine.getField('dataInicio') + "' and '" + engine.getField('dataFinal') + "'";
|
||||
" from controle_receitas_fretes ccf";
|
||||
if (datainicio && datafinal) {
|
||||
sql += " where ccf.data between '" + engine.getField('dataInicio') + "' and '" + engine.getField('dataFinal') + "'";
|
||||
}
|
||||
if (engine.getField('ftFuncionario').getValue()) {
|
||||
sql += " and ccf.chave_funcionario = " + engine.getField('ftFuncionario').getValue();
|
||||
}
|
||||
@@ -473,10 +477,10 @@
|
||||
if (engine.getField('ftCliente').getValue()) {
|
||||
sql += " and ccf.chave_cliente = " + engine.getField('ftCliente').getValue();
|
||||
}
|
||||
if (engine.getField('ftFrotaTerceiro').getValue() == 'F') {
|
||||
if (engine.getField('ftFrotaTerceiro').getValue() && engine.getField('ftFrotaTerceiro').getValue() == 'F') {
|
||||
sql += " and ccf.frota_terceiro = 'F'";
|
||||
}
|
||||
if (engine.getField('ftFrotaTerceiro').getValue() == 'T') {
|
||||
if (engine.getField('ftFrotaTerceiro').getValue() && engine.getField('ftFrotaTerceiro').getValue() == 'T') {
|
||||
sql += " and ccf.frota_terceiro = 'T'";
|
||||
}
|
||||
if (engine.getField('ftUfDestino').getValue()) {
|
||||
@@ -539,7 +543,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<column name="DATA" caption="Data" format="dd/MM/yyyy" expand-ratio="0.05" commitOnValueChange="true" editable="true" />
|
||||
<column name="DATA" caption="Data" format="dd/MM/yyyy" commitOnValueChange="true" editable="true" />
|
||||
<generated name="VEICULO" caption="Veículo" cache="false" expand-ratio="0.05" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
@@ -605,7 +609,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<generated name="PLACA_CARRETA" caption="Placa carreta" cache="false" expand-ratio="0.05" >
|
||||
<generated name="PLACA_CARRETA" caption="Placa carreta" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -670,7 +674,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<generated name="FUNCIONARIO" caption="Funcionário" cache="false" expand-ratio="0.1" >
|
||||
<generated name="FUNCIONARIO" caption="Funcionário" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -735,8 +739,8 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<column name="CTE" caption="CTE" expand-ratio="0.1" editable="true" commitOnValueChange="true"/>
|
||||
<generated name="CLIENTE" caption="Cliente" cache="false" expand-ratio="0.1" >
|
||||
<column name="CTE" caption="CTE" editable="true" commitOnValueChange="true"/>
|
||||
<generated name="CLIENTE" caption="Cliente" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -801,7 +805,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<generated name="TIPO_FRETE" caption="Tipo frete" cache="false" expand-ratio="0.1" >
|
||||
<generated name="TIPO_FRETE" caption="Tipo frete" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -867,7 +871,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<generated name="FROTA_TERCEIRO" caption="Frota" cache="false" expand-ratio="0.1" >
|
||||
<generated name="FROTA_TERCEIRO" caption="Frota" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -921,8 +925,8 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<column name="VALOR_FRETE" caption="Valor frete" align="RIGHT" format="#.##0,00" commitOnValueChange="true" editable="true" expand-ratio="0.05" decimalSeparator="," />
|
||||
<generated name="UF_ORIGEM" caption="Uf Origem" cache="false" expand-ratio="0.03" >
|
||||
<column name="VALOR_FRETE" caption="Valor frete" align="RIGHT" format="#.##0,00" commitOnValueChange="true" editable="true" decimalSeparator="," />
|
||||
<generated name="UF_ORIGEM" caption="Uf Origem" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -983,7 +987,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<generated name="UF_DESTINO" caption="Uf Destino" cache="false" expand-ratio="0.05" >
|
||||
<generated name="UF_DESTINO" caption="Uf Destino" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -1059,7 +1063,7 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<generated name="FORMA_PAGAMENTO" caption="Forma pagamento" cache="false" expand-ratio="0.1" >
|
||||
<generated name="FORMA_PAGAMENTO" caption="Forma pagamento" cache="false" >
|
||||
<scriptColumnGenerator language="JavaScript">
|
||||
<![CDATA[
|
||||
importClass(Packages.com.vaadin.ui.ComboBox);
|
||||
@@ -1125,8 +1129,8 @@
|
||||
]]>
|
||||
</scriptColumnGenerator>
|
||||
</generated>
|
||||
<column name="VALOR_IMPOSTO" caption="Valor impostos" format="###0.00" decimalSeparator="," expand-ratio="0.2"/>
|
||||
<column name="VALOR_LIQUIDO" caption="Lucro (Frete - Impostos)" format="###0.00" decimalSeparator="," expand-ratio="1"/>
|
||||
<column name="VALOR_IMPOSTO" caption="Valor impostos" format="###0.00" decimalSeparator="," />
|
||||
<column name="VALOR_LIQUIDO" caption="Lucro (Frete - Impostos)" format="###0.00" decimalSeparator="," />
|
||||
</columns>
|
||||
<events>
|
||||
<itemChange>
|
||||
|
||||
Reference in New Issue
Block a user