diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioKmProgramada_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioKmProgramada_pt_BR.properties
new file mode 100644
index 000000000..01f6ecc2b
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioKmProgramada_pt_BR.properties
@@ -0,0 +1,13 @@
+#geral
+msg.noData=Não foi possivel obter dados com os parâmetros informados.
+
+
+#Labels cabeçalho
+cabecalho.relatorio=Relatório:
+cabecalho.periodo=Período:
+cabecalho.periodoA=à
+cabecalho.dataHora=Data/Hora:
+cabecalho.impressorPor=Impressor por:
+cabecalho.pagina=Página
+cabecalho.de=de
+cabecalho.filtros=Filtros:
\ No newline at end of file
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKMProgramadaa.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKMProgramadaa.jrxml
new file mode 100644
index 000000000..3d6911ab5
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKMProgramadaa.jrxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada.jasper
new file mode 100644
index 000000000..fdb4e1ab3
Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada.jasper differ
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada.jrxml
new file mode 100644
index 000000000..b0da223f0
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada.jrxml
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada1.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada1.jasper
new file mode 100644
index 000000000..d248ca4ce
Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada1.jasper differ
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada1.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada1.jrxml
new file mode 100644
index 000000000..7332125ca
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioKmProgramada1.jrxml
@@ -0,0 +1,465 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java
index 64dcbe7bc..1f125a353 100644
--- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java
+++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarFechamentoParamgeralController.java
@@ -30,6 +30,7 @@ public class EditarFechamentoParamgeralController extends MyGenericForwardCompos
private enum BancosSuportados {
ITAU("341", "Itaú"),
+ SANTANDER("033", "Santander"),
BRADESCO("237", "Bradesco");
private String codBanco;
diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioKmProgramadaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioKmProgramadaController.java
new file mode 100644
index 000000000..d0d2df1ef
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioKmProgramadaController.java
@@ -0,0 +1,167 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
+
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Controller;
+import org.zkoss.util.resource.Labels;
+import org.zkoss.zk.ui.Component;
+import org.zkoss.zk.ui.event.Event;
+import org.zkoss.zul.Comboitem;
+import org.zkoss.zul.Datebox;
+
+import com.rjconsultores.ventaboletos.entidad.Empresa;
+import com.rjconsultores.ventaboletos.entidad.GrupoRuta;
+import com.rjconsultores.ventaboletos.entidad.Ruta;
+import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioKmProgramada;
+import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
+import com.rjconsultores.ventaboletos.service.ConstanteService;
+import com.rjconsultores.ventaboletos.service.EmpresaService;
+import com.rjconsultores.ventaboletos.service.GrupoRutaService;
+import com.rjconsultores.ventaboletos.service.RutaService;
+import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
+import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
+import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
+
+/**
+ *
+ * @author Administrador
+ */
+@Controller("relatorioKmProgramadaController")
+@Scope("prototype")
+public class RelatorioKmProgramadaController extends MyGenericForwardComposer {
+
+ private static final long serialVersionUID = 1L;
+
+ @Autowired
+ private DataSource dataSourceRead;
+ @Autowired
+ private EmpresaService empresaService;
+ @Autowired
+ private RutaService rutaService;
+ @Autowired
+ private GrupoRutaService grupoRutaService;
+ @Autowired
+ private ConstanteService constanteService;
+
+ private List lsRuta;
+ private List lsEmpresa;
+ private List lsGrupoRuta;
+
+ private Datebox fecCorridaIni;
+ private Datebox fecCorridaFin;
+ private MyComboboxEstandar cmbRuta;
+ private MyComboboxEstandar cmbEmpresa;
+
+
+ public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
+ executarRelatorio();
+ }
+
+ /**
+ * @throws Exception
+ *
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ private void executarRelatorio() throws Exception {
+
+ Relatorio relatorio;
+ Map parametros = new HashMap();
+ StringBuilder filtro = new StringBuilder();
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+
+ parametros.put("DATA_INICIAL", sdf.format((java.util.Date) this.fecCorridaIni.getValue()));
+ parametros.put("DATA_FINAL", sdf.format((java.util.Date) this.fecCorridaFin.getValue()));
+ parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioResumoLinhasController.window.title"));
+ parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
+
+ Comboitem itemRuta = cmbRuta.getSelectedItem();
+
+ filtro.append("Linha: ");
+ if (itemRuta != null) {
+ Ruta ruta = (Ruta) itemRuta.getValue();
+ parametros.put("RUTA_ID", ruta.getRutaId());
+ filtro.append(ruta.getDescruta() + ";");
+ }
+ else
+ filtro.append("Todas;");
+
+
+
+ Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
+ filtro.append(" Empresa: ");
+ if (itemEmpresa != null) {
+ Empresa empresa = (Empresa) itemEmpresa.getValue();
+ parametros.put("EMPRESA_ID", empresa.getEmpresaId());
+ parametros.put("EMPRESA", empresa.getNombempresa());
+ filtro.append(empresa.getNombempresa());
+ }else{
+ parametros.put("EMPRESA_ID", null);
+ filtro.append("Todas;");
+ }
+
+ parametros.put("FILTROS", filtro.toString());
+
+ relatorio = new RelatorioKmProgramada(parametros, dataSourceRead.getConnection(), constanteService);
+
+
+ Map args = new HashMap();
+ args.put("relatorio", relatorio);
+
+ openWindow("/component/reportView.zul",
+ Labels.getLabel("relatorioKmProgramadaController.window.title"), args, MODAL);
+
+ }
+
+ @Override
+ public void doAfterCompose(Component comp) throws Exception {
+ setLsRuta(rutaService.obtenerTodos());
+ lsEmpresa = empresaService.obtenerTodos();
+ lsGrupoRuta = grupoRutaService.obtenerTodos();
+
+ super.doAfterCompose(comp);
+ }
+
+ public List getLsRuta() {
+ return lsRuta;
+ }
+
+ public void setLsRuta(List lsRuta) {
+ this.lsRuta = lsRuta;
+ }
+
+ public MyComboboxEstandar getCmbRuta() {
+ return cmbRuta;
+ }
+
+ public void setCmbRuta(MyComboboxEstandar cmbRuta) {
+ this.cmbRuta = cmbRuta;
+ }
+
+ public List getLsEmpresa() {
+ return lsEmpresa;
+ }
+
+ public void setLsEmpresa(List lsEmpresa) {
+ this.lsEmpresa = lsEmpresa;
+ }
+
+ public List getLsGrupoRuta() {
+ return lsGrupoRuta;
+ }
+
+ public void setLsGrupoRuta(List lsGrupoRuta) {
+ this.lsGrupoRuta = lsGrupoRuta;
+ }
+
+}
diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioKmProgramada.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioKmProgramada.java
new file mode 100644
index 000000000..e54a50a6c
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioKmProgramada.java
@@ -0,0 +1,25 @@
+package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
+
+import org.zkoss.util.resource.Labels;
+
+import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
+import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
+
+public class ItemMenuRelatorioKmProgramada extends DefaultItemMenuSistema {
+
+ public ItemMenuRelatorioKmProgramada() {
+ super("indexController.mniRelatorioKmProgramada.label");
+ }
+
+ @Override
+ public String getClaveMenu() {
+ return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOKMPROGRAMADA";
+ }
+
+ @Override
+ public void ejecutar() {
+ PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioKmProgramada.zul",
+ Labels.getLabel("relatorioKmProgramadaController.window.title"), getArgs(), desktop);
+
+ }
+}
diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties
index 4dc1538df..3a4695a43 100644
--- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties
+++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties
@@ -133,6 +133,7 @@ analitico.gerenciais.trip=com.rjconsultores.ventaboletos.web.utilerias.menu.item
analitico.gerenciais.operacionais=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.operacionais.SubMenuRelatorioOperacionais
analitico.gerenciais.operacionais.aproveitamento=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAproveitamento
analitico.gerenciais.operacionais.resumoLinhas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioResumoLinhas
+analitico.gerenciais.operacionais.kmProgramada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioKmProgramada
analitico.gerenciais.operacionais.acompanhamentoEquivalentes=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAcompanhamentoEquivalentes
analitico.gerenciais.operacionais.linhasHorario=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioLinhasHorario
analitico.gerenciais.operacionais.demandas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDemandas