diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaFormapagoEmpresaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaFormapagoEmpresaController.java new file mode 100644 index 000000000..4ec52eee4 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaFormapagoEmpresaController.java @@ -0,0 +1,124 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Paging; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.FiscalFormapagoEmpresa; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; + +@Controller("busquedaFormapagoEmpresaController") +@Scope("prototype") +public class BusquedaFormapagoEmpresaController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + @Autowired + private transient PagedListWrapper plwFormapagoEmpresa; + private Paging pagingFormapagoEmpresa; + + private Combobox cmbEmpresa; + private List lsEmpresas; + + private MyListbox formapagoEmpresaList; + + @Override + public void doAfterCompose(Component comp) throws Exception { + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + + super.doAfterCompose(comp); + + formapagoEmpresaList.setItemRenderer(new FormapagoEmpresaListItemRenderer()); + formapagoEmpresaList.addEventListener("onDoubleClick", new EventListener() { + + @Override + public void onEvent(Event event) throws Exception { + FiscalFormapagoEmpresa formapagoEmpresa = (FiscalFormapagoEmpresa) formapagoEmpresaList.getSelected(); + visualizaFormapagoEmpresa(formapagoEmpresa); + } + }); + + actualizaFormapagoEmpresaList(); + } + + private void visualizaFormapagoEmpresa(FiscalFormapagoEmpresa formapagoEmpresa){ + + if (formapagoEmpresa == null) + return; + + Map args = new HashMap(); + args.put("formapagoEmpresa", formapagoEmpresa); + args.put("formapagoEmpresaList", formapagoEmpresaList); + + openWindow("/gui/impressaofiscal/editarFormapagoEmpresa.zul", + Labels.getLabel("editarFormapagoEmpresa.window.title"), args, MODAL); + + } + + public void onClick$btnPesquisa(Event ev) throws InterruptedException { + actualizaFormapagoEmpresaList(); + } + + public void onClick$btnRefresh(Event ev) { + actualizaFormapagoEmpresaList(); + } + + public void onClick$btnNovo(Event ev) { + visualizaFormapagoEmpresa(new FiscalFormapagoEmpresa()); + } + + private void actualizaFormapagoEmpresaList() { + HibernateSearchObject editarFormapagoEmpresaBusqueda = + new HibernateSearchObject(FiscalFormapagoEmpresa.class, pagingFormapagoEmpresa.getPageSize()); + + editarFormapagoEmpresaBusqueda.addFilterEqual("activo", true); + + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + editarFormapagoEmpresaBusqueda.addFilterEqual("empresa", empresa); + } else { + editarFormapagoEmpresaBusqueda.addFilterIn("empresa", lsEmpresas); + } + + plwFormapagoEmpresa.init(editarFormapagoEmpresaBusqueda, formapagoEmpresaList, pagingFormapagoEmpresa); + + if (formapagoEmpresaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("busquedaAidfController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + } + } + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List _lsEmpresas) { + lsEmpresas = _lsEmpresas; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaRelgerencialEmpresaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaRelgerencialEmpresaController.java new file mode 100644 index 000000000..ba969ff53 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaRelgerencialEmpresaController.java @@ -0,0 +1,124 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Paging; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.FiscalRelgerencialEmpresa; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; + +@Controller("busquedaRelgerencialEmpresaController") +@Scope("prototype") +public class BusquedaRelgerencialEmpresaController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + @Autowired + private transient PagedListWrapper plwRelgerencialEmpresa; + private Paging pagingRelgerencialEmpresa; + + private Combobox cmbEmpresa; + private List lsEmpresas; + + private MyListbox relgerencialEmpresaList; + + @Override + public void doAfterCompose(Component comp) throws Exception { + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + + super.doAfterCompose(comp); + + relgerencialEmpresaList.setItemRenderer(new RelgerencialEmpresaListItemRenderer()); + relgerencialEmpresaList.addEventListener("onDoubleClick", new EventListener() { + + @Override + public void onEvent(Event event) throws Exception { + FiscalRelgerencialEmpresa relgerencialEmpresa = (FiscalRelgerencialEmpresa) relgerencialEmpresaList.getSelected(); + visualizaRelgerencialEmpresa(relgerencialEmpresa); + } + }); + + actualizaRelgerencialEmpresaList(); + } + + private void visualizaRelgerencialEmpresa(FiscalRelgerencialEmpresa relgerencialEmpresa){ + + if (relgerencialEmpresa == null) + return; + + Map args = new HashMap(); + args.put("relgerencialEmpresa", relgerencialEmpresa); + args.put("relgerencialEmpresaList", relgerencialEmpresaList); + + openWindow("/gui/impressaofiscal/editarRelgerencialEmpresa.zul", + Labels.getLabel("editarRelgerencialEmpresa.window.title"), args, MODAL); + + } + + public void onClick$btnPesquisa(Event ev) throws InterruptedException { + actualizaRelgerencialEmpresaList(); + } + + public void onClick$btnRefresh(Event ev) { + actualizaRelgerencialEmpresaList(); + } + + public void onClick$btnNovo(Event ev) { + visualizaRelgerencialEmpresa(new FiscalRelgerencialEmpresa()); + } + + private void actualizaRelgerencialEmpresaList() { + HibernateSearchObject editarRelgerencialEmpresaBusqueda = + new HibernateSearchObject(FiscalRelgerencialEmpresa.class, pagingRelgerencialEmpresa.getPageSize()); + + editarRelgerencialEmpresaBusqueda.addFilterEqual("activo", true); + + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + editarRelgerencialEmpresaBusqueda.addFilterEqual("empresa", empresa); + } else { + editarRelgerencialEmpresaBusqueda.addFilterIn("empresa", lsEmpresas); + } + + plwRelgerencialEmpresa.init(editarRelgerencialEmpresaBusqueda, relgerencialEmpresaList, pagingRelgerencialEmpresa); + + if (relgerencialEmpresaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("busquedaAidfController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + } + } + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List _lsEmpresas) { + lsEmpresas = _lsEmpresas; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaTotnaofiscalEmpresaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaTotnaofiscalEmpresaController.java new file mode 100644 index 000000000..ed54602bd --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaTotnaofiscalEmpresaController.java @@ -0,0 +1,123 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Paging; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; + +@Controller("busquedaTotnaofiscalEmpresaController") +@Scope("prototype") +public class BusquedaTotnaofiscalEmpresaController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + @Autowired + private transient PagedListWrapper plwTotnaofiscalEmpresa; + private Paging pagingTotnaofiscalEmpresa; + + private Combobox cmbEmpresa; + private List lsEmpresas; + + private MyListbox totnaofiscalEmpresaList; + + @Override + public void doAfterCompose(Component comp) throws Exception { + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + + super.doAfterCompose(comp); + + totnaofiscalEmpresaList.setItemRenderer(new TotnaofiscalEmpresaListItemRenderer()); + totnaofiscalEmpresaList.addEventListener("onDoubleClick", new EventListener() { + + @Override + public void onEvent(Event event) throws Exception { + FiscalTotnaofiscalEmpresa totnaofiscalEmpresa = (FiscalTotnaofiscalEmpresa) totnaofiscalEmpresaList.getSelected(); + visualizaTotnaofiscalEmpresa(totnaofiscalEmpresa); + } + }); + + actualizaTotnaofiscalEmpresaList(); + } + + private void visualizaTotnaofiscalEmpresa(FiscalTotnaofiscalEmpresa totnaofiscalEmpresa){ + + if (totnaofiscalEmpresa == null) + return; + + Map args = new HashMap(); + args.put("totnaofiscalEmpresa", totnaofiscalEmpresa); + args.put("totnaofiscalEmpresaList", totnaofiscalEmpresaList); + + openWindow("/gui/impressaofiscal/editarTotnaofiscalEmpresa.zul", + Labels.getLabel("editarTotnaofiscalEmpresa.window.title"), args, MODAL); + + } + + public void onClick$btnPesquisa(Event ev) throws InterruptedException { + actualizaTotnaofiscalEmpresaList(); + } + + public void onClick$btnRefresh(Event ev) { + actualizaTotnaofiscalEmpresaList(); + } + + public void onClick$btnNovo(Event ev) { + visualizaTotnaofiscalEmpresa(new FiscalTotnaofiscalEmpresa()); + } + + private void actualizaTotnaofiscalEmpresaList() { + HibernateSearchObject editarTotnaofiscalEmpresaBusqueda = + new HibernateSearchObject(FiscalTotnaofiscalEmpresa.class, pagingTotnaofiscalEmpresa.getPageSize()); + + editarTotnaofiscalEmpresaBusqueda.addFilterEqual("activo", true); + + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + editarTotnaofiscalEmpresaBusqueda.addFilterEqual("empresa", empresa); + } else { + editarTotnaofiscalEmpresaBusqueda.addFilterIn("empresa", lsEmpresas); + } + + plwTotnaofiscalEmpresa.init(editarTotnaofiscalEmpresaBusqueda, totnaofiscalEmpresaList, pagingTotnaofiscalEmpresa); + + if (totnaofiscalEmpresaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("busquedaAidfController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + } + } + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List _lsEmpresas) { + lsEmpresas = _lsEmpresas; + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarFormapagoEmpresaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarFormapagoEmpresaController.java new file mode 100644 index 000000000..e856b5f5f --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarFormapagoEmpresaController.java @@ -0,0 +1,235 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +import org.apache.log4j.Logger; +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.Executions; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Button; +import org.zkoss.zul.Checkbox; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Textbox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.FiscalFormapagoEmpresa; +import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa; +import com.rjconsultores.ventaboletos.entidad.FormaPago; +import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra; +import com.rjconsultores.ventaboletos.service.FiscalImpressoraService; +import com.rjconsultores.ventaboletos.service.FormaPagoService; +import com.rjconsultores.ventaboletos.service.TipoEventoExtraService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal.EditarTotnaofiscalEmpresaController.TipoTotalizadorNaoFiscal; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; + +@Controller("editarFormapagoEmpresaController") +@Scope("prototype") +public class EditarFormapagoEmpresaController extends MyGenericForwardComposer { + + public enum TipoFormaPagamento { + TotalCartao, + PtaAtendido, + TrocaPassagem, + Gratuidade, + CUSTOM; + } + + /** + * + */ + private static final long serialVersionUID = 1L; + + + @Autowired + private FiscalImpressoraService fiscalImpressoraService; + + @Autowired + private FormaPagoService formaPagoService; + + private FiscalFormapagoEmpresa formapagoEmpresa; + private MyListbox formapagoEmpresaList; + + private Combobox cmbEmpresa; + private List lsEmpresas; + + private Combobox cmbTipoformapago; + private List lsTipoformapago = new ArrayList(); + + private Textbox txtDescricao; + + private Combobox cmbTipoformapagoTotalBus; + private List lsTipoformapagoTotalBus = new ArrayList(); + + private Button btnApagar; + + private static Logger log = Logger.getLogger(EditarFormapagoEmpresaController.class); + + + @Override + public void doAfterCompose(Component comp) throws Exception { + + for(TipoFormaPagamento tipo : TipoFormaPagamento.values()){ + lsTipoformapago.add(tipo.name()); + } + + for(FormaPago tipo : formaPagoService.obtenerTodos()){ + if(tipo.getImpfiscal() != null && tipo.getImpfiscal()){ + lsTipoformapagoTotalBus.add(tipo); + } + } + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + + + super.doAfterCompose(comp); + + formapagoEmpresa = (FiscalFormapagoEmpresa) Executions.getCurrent().getArg().get("formapagoEmpresa"); + formapagoEmpresaList = (MyListbox) Executions.getCurrent().getArg().get("formapagoEmpresaList"); + + if (formapagoEmpresa.getFiscalformapagoempresaId() == null) + btnApagar.setVisible(Boolean.FALSE); + + } + + public void onClick$btnSalvar(Event ev) throws InterruptedException { + + cmbEmpresa.getValue(); + cmbTipoformapago.getValue(); + cmbTipoformapagoTotalBus.getValue(); + + try{ + + Comboitem itemFormapagoTotalBus = cmbTipoformapagoTotalBus.getSelectedItem(); + if(itemFormapagoTotalBus != null){ + FormaPago fpTotalBus = (FormaPago) itemFormapagoTotalBus.getValue(); + formapagoEmpresa.setFormaPago(fpTotalBus); + } + + Comboitem itemTipoFormapago = cmbTipoformapago.getSelectedItem(); + if(itemTipoFormapago != null){ + String tipoFormapago = (String) itemTipoFormapago.getValue(); + formapagoEmpresa.setTipoformapago(tipoFormapago); + } + + formapagoEmpresa.setDescricao(txtDescricao.getText()); + + formapagoEmpresa.setActivo(true); + formapagoEmpresa.setFecmodif(Calendar.getInstance().getTime()); + formapagoEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + + if(formapagoEmpresa.getFiscalformapagoempresaId() == null){ + fiscalImpressoraService.suscribirFormapagoEmpresa(formapagoEmpresa); + formapagoEmpresaList.addItemNovo(formapagoEmpresa); + } else { + fiscalImpressoraService.actualizacionFormapagoEmpresa(formapagoEmpresa); + formapagoEmpresaList.updateItem(formapagoEmpresa); + } + + Messagebox.show( + Labels.getLabel("editarFormapagoEmpresaController.MSG.suscribirOK"), + Labels.getLabel("editarFormapagoEmpresaController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + + closeWindow(); + + }catch (Exception ex) { + log.error("editarFormapagoEmpresaController: " + ex); + Messagebox.show( + Labels.getLabel("MSG.Error"), + Labels.getLabel("editarFormapagoEmpresaController.window.title"), + Messagebox.OK, Messagebox.ERROR); + } + + } + + public FiscalFormapagoEmpresa getFormapagoEmpresa() { + return formapagoEmpresa; + } + + public void setFormapagoEmpresa(FiscalFormapagoEmpresa formapagoEmpresa) { + this.formapagoEmpresa = formapagoEmpresa; + } + + public MyListbox getFormapagoEmpresaList() { + return formapagoEmpresaList; + } + + public void setFormapagoEmpresaList(MyListbox formapagoEmpresaList) { + this.formapagoEmpresaList = formapagoEmpresaList; + } + + public Combobox getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(Combobox cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List lsEmpresas) { + this.lsEmpresas = lsEmpresas; + } + + public Combobox getCmbTipoformapago() { + return cmbTipoformapago; + } + + public void setCmbTipoformapago(Combobox cmbTipoformapago) { + this.cmbTipoformapago = cmbTipoformapago; + } + + public List getLsTipoformapago() { + return lsTipoformapago; + } + + public void setLsTipoformapago(List lsTipoformapago) { + this.lsTipoformapago = lsTipoformapago; + } + + public Textbox getTxtDescricao() { + return txtDescricao; + } + + public void setTxtDescricao(Textbox txtDescricao) { + this.txtDescricao = txtDescricao; + } + + public Combobox getCmbTipoformapagoTotalBus() { + return cmbTipoformapagoTotalBus; + } + + public void setCmbTipoformapagoTotalBus(Combobox cmbTipoformapagoTotalBus) { + this.cmbTipoformapagoTotalBus = cmbTipoformapagoTotalBus; + } + + public List getLsTipoformapagoTotalBus() { + return lsTipoformapagoTotalBus; + } + + public void setLsTipoformapagoTotalBus(List lsTipoformapagoTotalBus) { + this.lsTipoformapagoTotalBus = lsTipoformapagoTotalBus; + } + + public Button getBtnApagar() { + return btnApagar; + } + + public void setBtnApagar(Button btnApagar) { + this.btnApagar = btnApagar; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarRelgerencialEmpresaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarRelgerencialEmpresaController.java new file mode 100644 index 000000000..b4d747972 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarRelgerencialEmpresaController.java @@ -0,0 +1,204 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.Executions; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Button; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Textbox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.FiscalRelgerencialEmpresa; +import com.rjconsultores.ventaboletos.service.FiscalImpressoraService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; + +@Controller("editarRelgerencialEmpresaController") +@Scope("prototype") +public class EditarRelgerencialEmpresaController extends MyGenericForwardComposer { + + public enum TipoRelatorioGerencial { + RelatorioGeral, + CupomEmbarque, + CupomEmbGratuidade, + IdentificacaoPafECF, + ManifestoFiscal, + ParametrosConfiguracao, + IdentificacaoIdaVolta, + CUSTOM; + } + /** + * + */ + private static final long serialVersionUID = 1L; + + @Autowired + private FiscalImpressoraService fiscalImpressoraService; + + private FiscalRelgerencialEmpresa relgerencialEmpresa; + private MyListbox relgerencialEmpresaList; + + private Combobox cmbEmpresa; + private List lsEmpresas; + + private Combobox cmbTiporelgerencial; + private List lsTiporelgerencial = new ArrayList(); + + private Textbox txtIndice; + private Textbox txtDescricao; + + private Button btnApagar; + + private static Logger log = Logger.getLogger(EditarRelgerencialEmpresaController.class); + + @Override + public void doAfterCompose(Component comp) throws Exception { + + for(TipoRelatorioGerencial tipo : TipoRelatorioGerencial.values()){ + lsTiporelgerencial.add(tipo.name()); + } + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + + super.doAfterCompose(comp); + + relgerencialEmpresa = (FiscalRelgerencialEmpresa) Executions.getCurrent().getArg().get("relgerencialEmpresa"); + relgerencialEmpresaList = (MyListbox) Executions.getCurrent().getArg().get("relgerencialEmpresaList"); + + if (relgerencialEmpresa.getFiscalrelgerencialId() == null) + btnApagar.setVisible(Boolean.FALSE); + + } + + public void onClick$btnSalvar(Event ev) throws InterruptedException { + + cmbEmpresa.getValue(); + cmbTiporelgerencial.getValue(); + + try{ + + Comboitem itemTiporelgerencial = cmbTiporelgerencial.getSelectedItem(); + if(itemTiporelgerencial != null){ + String tipoRelgerencial = (String) itemTiporelgerencial.getValue(); + relgerencialEmpresa.setTiporelgerencial(tipoRelgerencial); + } + + relgerencialEmpresa.setDescricao(txtDescricao.getText()); + relgerencialEmpresa.setIndice(StringUtils.leftPad(txtIndice.getText(), 2, "0")); + + relgerencialEmpresa.setActivo(true); + relgerencialEmpresa.setFecmodif(Calendar.getInstance().getTime()); + relgerencialEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + + if(relgerencialEmpresa.getFiscalrelgerencialId() == null){ + fiscalImpressoraService.suscribirRelgerencialEmpresa(relgerencialEmpresa); + relgerencialEmpresaList.addItemNovo(relgerencialEmpresa); + } else { + fiscalImpressoraService.actualizacionRelgerencialEmpresa(relgerencialEmpresa); + relgerencialEmpresaList.updateItem(relgerencialEmpresa); + } + + Messagebox.show( + Labels.getLabel("editarRelgerencialEmpresaController.MSG.suscribirOK"), + Labels.getLabel("editarRelgerencialEmpresaController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + + closeWindow(); + + }catch (Exception ex) { + log.error("editarRelgerencialEmpresaController: " + ex); + Messagebox.show( + Labels.getLabel("MSG.Error"), + Labels.getLabel("editarRelgerencialEmpresaController.window.title"), + Messagebox.OK, Messagebox.ERROR); + } + + } + + public FiscalRelgerencialEmpresa getRelgerencialEmpresa() { + return relgerencialEmpresa; + } + + public void setRelgerencialEmpresa(FiscalRelgerencialEmpresa relgerencialEmpresa) { + this.relgerencialEmpresa = relgerencialEmpresa; + } + + public MyListbox getRelgerencialEmpresaList() { + return relgerencialEmpresaList; + } + + public void setRelgerencialEmpresaList(MyListbox relgerencialEmpresaList) { + this.relgerencialEmpresaList = relgerencialEmpresaList; + } + + public Combobox getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(Combobox cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List lsEmpresas) { + this.lsEmpresas = lsEmpresas; + } + + public Combobox getCmbTiporelgerencial() { + return cmbTiporelgerencial; + } + + public void setCmbTiporelgerencial(Combobox cmbTiporelgerencial) { + this.cmbTiporelgerencial = cmbTiporelgerencial; + } + + public List getLsTiporelgerencial() { + return lsTiporelgerencial; + } + + public void setLsTiporelgerencial(List lsTiporelgerencial) { + this.lsTiporelgerencial = lsTiporelgerencial; + } + + public Textbox getTxtIndice() { + return txtIndice; + } + + public void setTxtIndice(Textbox txtIndice) { + this.txtIndice = txtIndice; + } + + public Textbox getTxtDescricao() { + return txtDescricao; + } + + public void setTxtDescricao(Textbox txtDescricao) { + this.txtDescricao = txtDescricao; + } + + public Button getBtnApagar() { + return btnApagar; + } + + public void setBtnApagar(Button btnApagar) { + this.btnApagar = btnApagar; + } + + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarTotnaofiscalEmpresaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarTotnaofiscalEmpresaController.java new file mode 100644 index 000000000..ba9c55d3d --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/EditarTotnaofiscalEmpresaController.java @@ -0,0 +1,246 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.Executions; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Button; +import org.zkoss.zul.Checkbox; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Textbox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa; +import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra; +import com.rjconsultores.ventaboletos.service.FiscalImpressoraService; +import com.rjconsultores.ventaboletos.service.TipoEventoExtraService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; + +@Controller("editarTotnaofiscalEmpresaController") +@Scope("prototype") +public class EditarTotnaofiscalEmpresaController extends MyGenericForwardComposer { + + public enum TipoTotalizadorNaoFiscal { + + CancImpPost, + CartaoCredDeb, + CanPassagem, + VendaManual, + ImpressaoPost, + SeguroOpcional, + CancSeguroOpcional, + ExcessoBagagem, + TaxaEmbarque, + TaxaConveniencia, + Multa, + DiferencaMaior, + DiferencaMenor, + CUSTOM; + } + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Autowired + private FiscalImpressoraService fiscalImpressoraService; + + @Autowired + private TipoEventoExtraService tipoEventoExtraService; + + private FiscalTotnaofiscalEmpresa totnaofiscalEmpresa; + private MyListbox totnaofiscalEmpresaList; + + private Combobox cmbEmpresa; + private List lsEmpresas; + + private Combobox cmbTipototalizador; + private List lsTipototalizador = new ArrayList(); + + private Combobox cmbTipoEventoExtra; + private List lsTipoEventoExtra; + + private Textbox txtIndice; + private Textbox txtDescricao; + private Checkbox chkImportarImp; + + private Button btnApagar; + + private static Logger log = Logger.getLogger(EditarTotnaofiscalEmpresaController.class); + + @Override + public void doAfterCompose(Component comp) throws Exception { + + for(TipoTotalizadorNaoFiscal tipo : TipoTotalizadorNaoFiscal.values()){ + lsTipototalizador.add(tipo.name()); + } + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + lsTipoEventoExtra = tipoEventoExtraService.obtenerTodos(); + + super.doAfterCompose(comp); + + totnaofiscalEmpresa = (FiscalTotnaofiscalEmpresa) Executions.getCurrent().getArg().get("totnaofiscalEmpresa"); + totnaofiscalEmpresaList = (MyListbox) Executions.getCurrent().getArg().get("totnaofiscalEmpresaList"); + + if (totnaofiscalEmpresa.getFiscaltotnaofiscalId() == null) + btnApagar.setVisible(Boolean.FALSE); + + } + + public void onClick$btnSalvar(Event ev) throws InterruptedException { + + cmbEmpresa.getValue(); + cmbTipoEventoExtra.getValue(); + cmbTipototalizador.getValue(); + + try{ + + Comboitem itemTipoEventoExtra = cmbTipoEventoExtra.getSelectedItem(); + if(itemTipoEventoExtra != null){ + TipoEventoExtra tipoeventoextra = (TipoEventoExtra) itemTipoEventoExtra.getValue(); + totnaofiscalEmpresa.setTipoeventoextra(tipoeventoextra); + } + + Comboitem itemTipototalizador = cmbTipototalizador.getSelectedItem(); + if(itemTipototalizador != null){ + String tipoTotalizadorNaoFiscal = (String) itemTipototalizador.getValue(); + totnaofiscalEmpresa.setTipototalizador(tipoTotalizadorNaoFiscal); + } + + totnaofiscalEmpresa.setDescricao(txtDescricao.getText()); + totnaofiscalEmpresa.setIndice(StringUtils.leftPad(txtIndice.getText(), 2, "0")); + totnaofiscalEmpresa.setIndimportar(chkImportarImp.isChecked()); + + totnaofiscalEmpresa.setActivo(true); + totnaofiscalEmpresa.setFecmodif(Calendar.getInstance().getTime()); + totnaofiscalEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + + if(totnaofiscalEmpresa.getFiscaltotnaofiscalId() == null){ + fiscalImpressoraService.suscribirTotnaofiscalEmpresa(totnaofiscalEmpresa); + totnaofiscalEmpresaList.addItemNovo(totnaofiscalEmpresa); + } else { + fiscalImpressoraService.actualizacionTotnaofiscalEmpresa(totnaofiscalEmpresa); + totnaofiscalEmpresaList.updateItem(totnaofiscalEmpresa); + } + + Messagebox.show( + Labels.getLabel("editarTotnaofiscalEmpresaController.MSG.suscribirOK"), + Labels.getLabel("editarTotnaofiscalEmpresaController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + + closeWindow(); + + }catch (Exception ex) { + log.error("editarTotnaofiscalEmpresaController: " + ex); + Messagebox.show( + Labels.getLabel("MSG.Error"), + Labels.getLabel("editarTotnaofiscalEmpresaController.window.title"), + Messagebox.OK, Messagebox.ERROR); + } + + } + + public List getLsTipoEventoExtra() { + return lsTipoEventoExtra; + } + + public void setLsTipoEventoExtra(List lsTipoEventoExtra) { + this.lsTipoEventoExtra = lsTipoEventoExtra; + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List lsEmpresas) { + this.lsEmpresas = lsEmpresas; + } + + public FiscalTotnaofiscalEmpresa getTotnaofiscalEmpresa() { + return totnaofiscalEmpresa; + } + + public void setTotnaofiscalEmpresa(FiscalTotnaofiscalEmpresa totnaofiscalEmpresa) { + this.totnaofiscalEmpresa = totnaofiscalEmpresa; + } + + public MyListbox getTotnaofiscalEmpresaList() { + return totnaofiscalEmpresaList; + } + + public void setTotnaofiscalEmpresaList(MyListbox totnaofiscalEmpresaList) { + this.totnaofiscalEmpresaList = totnaofiscalEmpresaList; + } + + public Combobox getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(Combobox cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public Combobox getCmbTipototalizador() { + return cmbTipototalizador; + } + + public void setCmbTipototalizador(Combobox cmbTipototalizador) { + this.cmbTipototalizador = cmbTipototalizador; + } + + public List getLsTipototalizador() { + return lsTipototalizador; + } + + public void setLsTipototalizador(List lsTipototalizador) { + this.lsTipototalizador = lsTipototalizador; + } + + public Combobox getCmbTipoEventoExtra() { + return cmbTipoEventoExtra; + } + + public void setCmbTipoEventoExtra(Combobox cmbTipoEventoExtra) { + this.cmbTipoEventoExtra = cmbTipoEventoExtra; + } + + public Textbox getTxtIndice() { + return txtIndice; + } + + public void setTxtIndice(Textbox txtIndice) { + this.txtIndice = txtIndice; + } + + public Textbox getTxtDescricao() { + return txtDescricao; + } + + public void setTxtDescricao(Textbox txtDescricao) { + this.txtDescricao = txtDescricao; + } + + public Checkbox getChkImportarImp() { + return chkImportarImp; + } + + public void setChkImportarImp(Checkbox chkImportarImp) { + this.chkImportarImp = chkImportarImp; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/FormapagoEmpresaListItemRenderer.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/FormapagoEmpresaListItemRenderer.java new file mode 100644 index 000000000..17580c37b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/FormapagoEmpresaListItemRenderer.java @@ -0,0 +1,35 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.FiscalFormapagoEmpresa; +import com.rjconsultores.ventaboletos.entidad.FormaPago; + +public class FormapagoEmpresaListItemRenderer implements ListitemRenderer { + + @Override + public void render(Listitem listItem, Object obj) throws Exception { + FiscalFormapagoEmpresa formapagoEmpresa = (FiscalFormapagoEmpresa)obj; + + Listcell idCell = new Listcell(formapagoEmpresa.getFiscalformapagoempresaId().toString()); + idCell.setParent(listItem); + + Listcell empresaCell = new Listcell(formapagoEmpresa.getEmpresa().toString()); + empresaCell.setParent(listItem); + + Listcell tipoFormapagoCell = new Listcell(formapagoEmpresa.getTipoformapago()); + tipoFormapagoCell.setParent(listItem); + + Listcell descricaoCell = new Listcell(formapagoEmpresa.getDescricao()); + descricaoCell.setParent(listItem); + + FormaPago formaPagoTotalBus = formapagoEmpresa.getFormaPago(); + Listcell formaPagoTotalBusCell = new Listcell((formaPagoTotalBus != null)?formaPagoTotalBus.toString():""); + formaPagoTotalBusCell.setParent(listItem); + + listItem.setAttribute("data", formapagoEmpresa); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/RelgerencialEmpresaListItemRenderer.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/RelgerencialEmpresaListItemRenderer.java new file mode 100644 index 000000000..835623183 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/RelgerencialEmpresaListItemRenderer.java @@ -0,0 +1,35 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.FiscalRelgerencialEmpresa; +import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa; +import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra; + +public class RelgerencialEmpresaListItemRenderer implements ListitemRenderer { + + @Override + public void render(Listitem listItem, Object obj) throws Exception { + FiscalRelgerencialEmpresa relgerencialEmpresa = (FiscalRelgerencialEmpresa)obj; + + Listcell idCell = new Listcell(relgerencialEmpresa.getFiscalrelgerencialId().toString()); + idCell.setParent(listItem); + + Listcell empresaCell = new Listcell(relgerencialEmpresa.getEmpresa().toString()); + empresaCell.setParent(listItem); + + Listcell tipoRelatorioCell = new Listcell(relgerencialEmpresa.getTiporelgerencial()); + tipoRelatorioCell.setParent(listItem); + + Listcell indiceCell = new Listcell(relgerencialEmpresa.getIndice()); + indiceCell.setParent(listItem); + + Listcell descricaoCell = new Listcell(relgerencialEmpresa.getDescricao()); + descricaoCell.setParent(listItem); + + listItem.setAttribute("data", relgerencialEmpresa); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/TotnaofiscalEmpresaListItemRenderer.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/TotnaofiscalEmpresaListItemRenderer.java new file mode 100644 index 000000000..86b06ba68 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/TotnaofiscalEmpresaListItemRenderer.java @@ -0,0 +1,41 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.impressaofiscal; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa; +import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra; + +public class TotnaofiscalEmpresaListItemRenderer implements ListitemRenderer { + + @Override + public void render(Listitem listItem, Object obj) throws Exception { + FiscalTotnaofiscalEmpresa totnaofiscalEmpresa = (FiscalTotnaofiscalEmpresa)obj; + + Listcell idCell = new Listcell(totnaofiscalEmpresa.getFiscaltotnaofiscalId().toString()); + idCell.setParent(listItem); + + Listcell empresaCell = new Listcell(totnaofiscalEmpresa.getEmpresa().toString()); + empresaCell.setParent(listItem); + + Listcell tipoTotalizadorCell = new Listcell(totnaofiscalEmpresa.getTipototalizador()); + tipoTotalizadorCell.setParent(listItem); + + Listcell indiceCell = new Listcell(totnaofiscalEmpresa.getIndice()); + indiceCell.setParent(listItem); + + Listcell descricaoCell = new Listcell(totnaofiscalEmpresa.getDescricao()); + descricaoCell.setParent(listItem); + + Listcell indimportarCell = new Listcell((totnaofiscalEmpresa.getIndimportar())?"Sim":"Não"); + indimportarCell.setParent(listItem); + + TipoEventoExtra tipoEventoExtra = totnaofiscalEmpresa.getTipoeventoextra(); + Listcell tipoeventoextraCell = new Listcell((tipoEventoExtra != null)?tipoEventoExtra.toString():""); + tipoeventoextraCell.setParent(listItem); + + listItem.setAttribute("data", totnaofiscalEmpresa); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuFormapagoEmpresa.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuFormapagoEmpresa.java new file mode 100644 index 000000000..f613d8ebd --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuFormapagoEmpresa.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.impressaofiscal; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuFormapagoEmpresa extends DefaultItemMenuSistema { + public ItemMenuFormapagoEmpresa() { + super("indexController.mniFormapagoEmpresa.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.IMPRESSAOFISCAL.MENU.FORMAPAGOEMPRESA"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/impressaofiscal/busquedaFormapagoEmpresa.zul", + Labels.getLabel("busquedaFormapagoEmpresaController.window.title"), + getArgs() ,desktop); + } +} + diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuRelgerencialEmpresa.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuRelgerencialEmpresa.java new file mode 100644 index 000000000..e05aae376 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuRelgerencialEmpresa.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.impressaofiscal; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuRelgerencialEmpresa extends DefaultItemMenuSistema { + public ItemMenuRelgerencialEmpresa() { + super("indexController.mniRelgerencialEmpresa.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.IMPRESSAOFISCAL.MENU.RELGERENCIALEMPRESA"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/impressaofiscal/busquedaRelgerencialEmpresa.zul", + Labels.getLabel("busquedaRelgerencialEmpresaController.window.title"), + getArgs() ,desktop); + } +} + diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuTotnaofiscalEmpresa.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuTotnaofiscalEmpresa.java new file mode 100644 index 000000000..37c31e83e --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/ItemMenuTotnaofiscalEmpresa.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.impressaofiscal; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuTotnaofiscalEmpresa extends DefaultItemMenuSistema { + public ItemMenuTotnaofiscalEmpresa() { + super("indexController.mniTotnaofiscalEmpresa.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.IMPRESSAOFISCAL.MENU.TOTNAOFISCALEMPRESA"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/impressaofiscal/busquedaTotnaofiscalEmpresa.zul", + Labels.getLabel("busquedaTotnaofiscalEmpresaController.window.title"), + getArgs() ,desktop); + } +} + diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/SubMenuImpressaoFiscal.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/SubMenuImpressaoFiscal.java new file mode 100644 index 000000000..11462d787 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/impressaofiscal/SubMenuImpressaoFiscal.java @@ -0,0 +1,16 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.impressaofiscal; + +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class SubMenuImpressaoFiscal extends DefaultItemMenuSistema { + + public SubMenuImpressaoFiscal() { + super("indexController.mnSubMenuImpressaoFiscal.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.IMPRESSAOFISCAL"; + } + +} diff --git a/src/java/spring-config.xml b/src/java/spring-config.xml index 67bc7a516..681672db0 100644 --- a/src/java/spring-config.xml +++ b/src/java/spring-config.xml @@ -370,6 +370,10 @@ com.rjconsultores.ventaboletos.entidad.FechamentoParamgeral com.rjconsultores.ventaboletos.entidad.FechamentoParamptovta com.rjconsultores.ventaboletos.entidad.TipoIdentificacion + + com.rjconsultores.ventaboletos.entidad.FiscalTotnaofiscalEmpresa + com.rjconsultores.ventaboletos.entidad.FiscalFormapagoEmpresa + com.rjconsultores.ventaboletos.entidad.FiscalRelgerencialEmpresa diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 5d997b02d..de740cd30 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -243,6 +243,11 @@ indexController.mniRelatorioCorridas.label = Relatório de Serviços indexController.mniRelatorioCorridas.label = Relatório de Serviços indexController.mniRelatorioDemandas.label = Relatório de Demandas +indexController.mnSubMenuImpressaoFiscal.label=Impressão Fiscal +indexController.mniTotnaofiscalEmpresa.label=Totalizadoes Não-fiscais +indexController.mniFormapagoEmpresa.label=Formas de Pagamento +indexController.mniRelgerencialEmpresa.label=Relatorio Gerencial + #PARTE REALIZADA POR MANUEL indexController.mnCortesias.label = Cortesias Para Funcionários indexController.mniTipoCortesiaD.label = Desconto por Tipo de Cortesia @@ -5216,4 +5221,38 @@ relatorioGratuidadeController.lbDataFin.value = Data Final indexController.mniRelatorioAgenciaFechamento.label= Relatorio Agências Fechamento integracion.totvs = ERRO ao fazer integração com a TOTVS -integracion.totvs.ja.cadastrado = Está Agencia já possui cadastrado no sistema da TOTVS. Os dados de integração não seram enviados novamente \ No newline at end of file +integracion.totvs.ja.cadastrado = Está Agencia já possui cadastrado no sistema da TOTVS. Os dados de integração não seram enviados novamente + + +#Parametros Impressão Fiscal +busquedaTotnaofiscalEmpresaController.window.title=Impressão Fiscal :: Totalizadores não-fiscais +busquedaTotnaofiscalEmpresaController.empresa.label=Empresa +busquedaTotnaofiscalEmpresaController.tipototalizador.label=Tipo Totalizador +busquedaTotnaofiscalEmpresaController.indice.label=Indice imp. +busquedaTotnaofiscalEmpresaController.descricao.label=Descrição +busquedaTotnaofiscalEmpresaController.indimportar.label=Importa p/imp. +busquedaTotnaofiscalEmpresaController.tipoeventoextra.label=Tipo Evt. Extra +busquedaTotnaofiscalEmpresaController.btnPesquisa.label=Pesquisar + +editarTotnaofiscalEmpresaController.MSG.suscribirOK=Totalizador não-fiscal gravado com sucesso! +editarTotnaofiscalEmpresaController.window.title=Impressão Fiscal :: Editar Totalizador não-fiscal + +busquedaFormapagoEmpresaController.window.title=Impressão Fiscal :: Formas de Pagamento +busquedaFormapagoEmpresaController.empresa.label=Empresa +busquedaFormapagoEmpresaController.tipoformapago.label=Tipo Forma Pago +busquedaFormapagoEmpresaController.descricao.label=Descrição +busquedaFormapagoEmpresaController.formapagototalbus.label=Forma Pago TotalBus +busquedaFormapagoEmpresaController.btnPesquisa.label=Pesquisar + +editarFormapagoEmpresaController.MSG.suscribirOK=Forma de pagamento gravado com sucesso! +editarFormapagoEmpresaController.window.title=Impressão Fiscal :: Editar Forma de pagamento + +busquedaRelgerencialEmpresaController.window.title=Impressão Fiscal :: Relatório Gerencial +busquedaRelgerencialEmpresaController.empresa.label=Empresa +busquedaRelgerencialEmpresaController.tiporelgerencial.label=Tipo Rel.Gerencial +busquedaRelgerencialEmpresaController.indice.label=Indice +busquedaRelgerencialEmpresaController.descricao.label=Descrição +busquedaRelgerencialEmpresaController.btnPesquisa.label=Pesquisar + +editarRelgerencialEmpresaController.MSG.suscribirOK=Relatorio Gerencial gravado com sucesso! +editarRelgerencialEmpresaController.window.title=Impressão Fiscal :: Editar Relatorio Gerencial \ No newline at end of file diff --git a/web/gui/impressaofiscal/busquedaFormapagoEmpresa.zul b/web/gui/impressaofiscal/busquedaFormapagoEmpresa.zul new file mode 100644 index 000000000..2d07f7abc --- /dev/null +++ b/web/gui/impressaofiscal/busquedaFormapagoEmpresa.zul @@ -0,0 +1,73 @@ + + + + + + + + + +