rodrigo 2012-08-20 19:49:48 +00:00
parent 34ccd46f32
commit d7810bfbf2
19 changed files with 888 additions and 1143 deletions

View File

@ -44,7 +44,6 @@ public class BusquedaEmpresaController extends MyGenericForwardComposer {
private Textbox txtNombre;
private Textbox txtEquivalencia;
private Textbox txtRFC;
private Combobox cmbExterna;
private Combobox cmbIndTipo;
private Row rowEquivalencia;
private Listheader headerEquivalencia;
@ -91,18 +90,6 @@ public class BusquedaEmpresaController extends MyGenericForwardComposer {
HibernateSearchObject<Empresa> empresaBusqueda =
new HibernateSearchObject<Empresa>(Empresa.class, pagingEmpresa.getPageSize());
Comboitem ci = cmbExterna.getSelectedItem();
String value;
if (ci != null) {
value = (String) ci.getValue();
if (value.equals("1")) {
empresaBusqueda.addFilterEqual("indExterna", Boolean.TRUE);
} else {
empresaBusqueda.addFilterEqual("indExterna", Boolean.FALSE);
}
}
Comboitem cbiTipo = cmbIndTipo.getSelectedItem();
Short tipo = null;
if (cbiTipo != null) {

View File

@ -27,144 +27,98 @@ import org.zkoss.zul.Row;
import org.zkoss.zul.Textbox;
/**
*
*
* @author Administrador
*/
@Controller("busquedaFormaPagoController")
@Scope("prototype")
public class BusquedaFormaPagoController extends MyGenericForwardComposer {
@Autowired
private transient PagedListWrapper<FormaPago> plwFormaPago;
private MyListbox formaPagoList;
private Paging pagingFormaPago;
private Textbox txtNome;
private Textbox txtEquivalencia;
private Row rowEquivalencia;
private Listheader headerEquivalencia;
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<FormaPago> plwFormaPago;
private MyListbox formaPagoList;
private Paging pagingFormaPago;
private Textbox txtNome;
private Textbox txtEquivalencia;
private Row rowEquivalencia;
private Listheader headerEquivalencia;
public MyListbox getFormaPagoList() {
return formaPagoList;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
public void setFormaPagoList(MyListbox formaPagoList) {
this.formaPagoList = formaPagoList;
}
formaPagoList.setItemRenderer(new RenderFormaPago());
formaPagoList.addEventListener("onDoubleClick", new EventListener() {
public Paging getPagingFormaPago() {
return pagingFormaPago;
}
@Override
public void onEvent(Event event) throws Exception {
FormaPago c = (FormaPago) formaPagoList.getSelected();
verFormaPago(c);
}
});
public void setPagingFormaPago(Paging pagingFormaPago) {
this.pagingFormaPago = pagingFormaPago;
}
refreshLista();
public Textbox getTxtNome() {
return txtNome;
}
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
rowEquivalencia.setVisible(Boolean.FALSE);
headerEquivalencia.setVisible(Boolean.FALSE);
}
public void setTxtNome(Textbox txtNome) {
this.txtNome = txtNome;
}
txtNome.focus();
}
public Textbox getTxtEquivalencia() {
return txtEquivalencia;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verFormaPago(FormaPago f) {
if (f == null) {
return;
}
public void setTxtEquivalencia(Textbox txtEquivalencia) {
this.txtEquivalencia = txtEquivalencia;
}
Map args = new HashMap();
args.put("formaPago", f);
args.put("busquedaFormaPagoController", this);
args.put("formaPagoList", formaPagoList);
public Listheader getHeaderEquivalencia() {
return headerEquivalencia;
}
openWindow("/gui/catalogos/editarFormaPago.zul",
Labels.getLabel("editarFormaPagoController.window.title"), args, MODAL);
}
public void setHeaderEquivalencia(Listheader headerEquivalencia) {
this.headerEquivalencia = headerEquivalencia;
}
public void refreshLista() {
HibernateSearchObject<FormaPago> formaPagoBusqueda =
new HibernateSearchObject<FormaPago>(FormaPago.class,
pagingFormaPago.getPageSize());
public Row getRowEquivalencia() {
return rowEquivalencia;
}
formaPagoBusqueda.addFilterLike("descpago", "%" + txtNome.getText().trim().concat("%"));
public void setRowEquivalencia(Row rowEquivalencia) {
this.rowEquivalencia = rowEquivalencia;
}
if (!txtEquivalencia.getText().isEmpty()) {
formaPagoBusqueda.addFilterLike("equivalenciaId", txtEquivalencia.getText().trim().concat("%"));
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
formaPagoBusqueda.addFilterNotEqual("formapagoId", -1);
formaPagoBusqueda.addSortAsc("descpago");
formaPagoBusqueda.addFilterEqual("activo", Boolean.TRUE);
formaPagoList.setItemRenderer(new RenderFormaPago());
formaPagoList.addEventListener("onDoubleClick", new EventListener() {
plwFormaPago.init(formaPagoBusqueda, formaPagoList, pagingFormaPago);
@Override
public void onEvent(Event event) throws Exception {
FormaPago c = (FormaPago) formaPagoList.getSelected();
verFormaPago(c);
}
});
if (formaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
refreshLista();
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
rowEquivalencia.setVisible(Boolean.FALSE);
headerEquivalencia.setVisible(Boolean.FALSE);
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
txtNome.focus();
}
private void verFormaPago(FormaPago f) {
if (f == null) {
return;
}
Map args = new HashMap();
args.put("formaPago", f);
args.put("busquedaFormaPagoController", this);
args.put("formaPagoList", formaPagoList);
openWindow("/gui/catalogos/editarFormaPago.zul",
Labels.getLabel("editarFormaPagoController.window.title"), args, MODAL);
}
public void refreshLista() {
HibernateSearchObject<FormaPago> formaPagoBusqueda =
new HibernateSearchObject<FormaPago>(FormaPago.class,
pagingFormaPago.getPageSize());
formaPagoBusqueda.addFilterLike("descpago", "%" + txtNome.getText().trim().concat("%"));
if (!txtEquivalencia.getText().isEmpty()) {
formaPagoBusqueda.addFilterLike("equivalenciaId", txtEquivalencia.getText().trim().concat("%"));
}
formaPagoBusqueda.addFilterNotEqual("formapagoId", -1);
formaPagoBusqueda.addSortAsc("descpago");
formaPagoBusqueda.addFilterEqual("activo", Boolean.TRUE);
plwFormaPago.init(formaPagoBusqueda, formaPagoList, pagingFormaPago);
if (formaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnNovo(Event ev) {
verFormaPago(new FormaPago());
}
public void onClick$btnNovo(Event ev) {
verFormaPago(new FormaPago());
}
}

View File

@ -24,113 +24,83 @@ import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
/**
*
*
* @author Rafius
*/
@Controller("busquedaTipoVentaController")
@Scope("prototype")
public class BusquedaTipoVentaController extends MyGenericForwardComposer {
@Autowired
private transient PagedListWrapper<TipoVenta> plwTipoVenta;
private MyListbox tipoVentaList;
private Paging pagingTipoVenta;
private Textbox txtNombre;
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<TipoVenta> plwTipoVenta;
private MyListbox tipoVentaList;
private Paging pagingTipoVenta;
private Textbox txtNombre;
public Textbox getTxtNombre() {
return txtNombre;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
public void setTxtNombre(Textbox txtNombre) {
this.txtNombre = txtNombre;
}
tipoVentaList.setItemRenderer(new RenderTipoVenta());
tipoVentaList.addEventListener("onDoubleClick", new EventListener() {
public Paging getPagingTipoVenta() {
return pagingTipoVenta;
}
@Override
public void onEvent(Event event) throws Exception {
TipoVenta ts = (TipoVenta) tipoVentaList.getSelected();
verPeriodo(ts);
}
});
public void setPagingTipoVenta(Paging pagingTipoVenta) {
this.pagingTipoVenta = pagingTipoVenta;
}
refreshLista();
public MyListbox getTipoVentaList() {
return tipoVentaList;
}
txtNombre.focus();
}
public void setTipoVentaList(MyListbox tipoVentaList) {
this.tipoVentaList = tipoVentaList;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verPeriodo(TipoVenta ts) {
if (ts == null) {
return;
}
public PagedListWrapper<TipoVenta> getPlwTipoVenta() {
return plwTipoVenta;
}
Map args = new HashMap();
args.put("tipoVenta", ts);
args.put("tipoVentaList", tipoVentaList);
public void setPlwTipoVenta(PagedListWrapper<TipoVenta> plwTipoVenta) {
this.plwTipoVenta = plwTipoVenta;
}
openWindow("/gui/catalogos/editarTipoVenta.zul",
Labels.getLabel("editarTipoVentaController.window.title"), args, MODAL);
}
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
refreshLista();
}
private void refreshLista() {
HibernateSearchObject<TipoVenta> claseVentaBusqueda =
new HibernateSearchObject<TipoVenta>(TipoVenta.class, pagingTipoVenta.getPageSize());
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
claseVentaBusqueda.addFilterLike("desctipoventa", "%" + txtNombre.getText().trim().concat("%"));
claseVentaBusqueda.addFilterEqual("activo", Boolean.TRUE);
claseVentaBusqueda.addSortAsc("desctipoventa");
claseVentaBusqueda.addFilterNotEqual("tipoventaId", -1);
public void onClick$btnNovo(Event ev) {
verPeriodo(new TipoVenta());
}
plwTipoVenta.init(claseVentaBusqueda, tipoVentaList, pagingTipoVenta);
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
if (tipoVentaList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
tipoVentaList.setItemRenderer(new RenderTipoVenta());
tipoVentaList.addEventListener("onDoubleClick", new EventListener() {
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
refreshLista();
}
@Override
public void onEvent(Event event) throws Exception {
TipoVenta ts = (TipoVenta) tipoVentaList.getSelected();
verPeriodo(ts);
}
});
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
refreshLista();
txtNombre.focus();
}
private void verPeriodo(TipoVenta ts) {
if (ts == null) {
return;
}
Map args = new HashMap();
args.put("tipoVenta", ts);
args.put("tipoVentaList", tipoVentaList);
openWindow("/gui/catalogos/editarTipoVenta.zul",
Labels.getLabel("editarTipoVentaController.window.title"), args, MODAL);
}
private void refreshLista() {
HibernateSearchObject<TipoVenta> claseVentaBusqueda =
new HibernateSearchObject<TipoVenta>(TipoVenta.class, pagingTipoVenta.getPageSize());
claseVentaBusqueda.addFilterLike("desctipoventa", "%" + txtNombre.getText().trim().concat("%"));
claseVentaBusqueda.addFilterEqual("activo", Boolean.TRUE);
claseVentaBusqueda.addSortAsc("desctipoventa");
claseVentaBusqueda.addFilterNotEqual("tipoventaId", -1);
plwTipoVenta.init(claseVentaBusqueda, tipoVentaList, pagingTipoVenta);
if (tipoVentaList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public void onClick$btnNovo(Event ev) {
verPeriodo(new TipoVenta());
}
}

View File

@ -19,7 +19,6 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zkplus.databind.BindingListModel;
import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zul.Button;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Messagebox;
@ -59,7 +58,6 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
private MyTextbox txtCNPJ;
private Button btnApagar;
private Combobox cmbIndTipo;
private Checkbox chkExterna;
private Combobox cmbEstado;
private Combobox cmbCidade;
private Row rowEquivalencia;
@ -104,10 +102,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
if (empresa.getEmpresaId() == null) {
btnApagar.setVisible(Boolean.FALSE);
chkExterna.setChecked(true);
} else {
chkExterna.setChecked(empresa.getIndExterna() == null ? false : empresa.getIndExterna());
Ciudad cidade = empresa.getCidade();
if (cidade != null) {
cmbCidade.setText(cidade.getNombciudad());
@ -144,7 +139,6 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
empresa.setActivo(Boolean.TRUE);
empresa.setFecmodif(Calendar.getInstance().getTime());
empresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
empresa.setIndExterna(chkExterna.isChecked());
if (empresa.getEmpresaId() == null) {
List<Empresa> lsEmpresa =
@ -183,14 +177,6 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
}
}
public void onClick$chkExterna(Event ev) {
if (!chkExterna.isChecked()) {
chkExterna.setChecked(false);
} else {
chkExterna.setChecked(true);
}
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(

View File

@ -4,15 +4,9 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
import com.rjconsultores.ventaboletos.service.FormaPagoService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
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;
@ -23,191 +17,166 @@ 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.Comboitem;
import org.zkoss.zul.Radio;
import org.zkoss.zul.Row;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
import com.rjconsultores.ventaboletos.service.FormaPagoService;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
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.MyTextbox;
/**
*
*
* @author Administrador
*/
@Controller("editarFormaPagoController")
@Scope("prototype")
public class EditarFormaPagoController extends MyGenericForwardComposer {
@Autowired
private FormaPagoService formaPagoService;
private FormaPago formaPago;
private MyListbox formaPagoList;
private MyTextbox txtNome;
private Button btnApagar;
private BusquedaFormaPagoController busquedaFormaPagoController;
private Button btnSalvar;
private Radio rd1;
private Radio rd2;
private Radio rd3;
private Radio rd4;
private static Logger log = Logger.getLogger(EditarFormaPagoController.class);
private Row rowEquivalencia;
private static final long serialVersionUID = 1L;
@Autowired
private FormaPagoService formaPagoService;
private FormaPago formaPago;
private MyListbox formaPagoList;
private MyTextbox txtNome;
private Button btnApagar;
private BusquedaFormaPagoController busquedaFormaPagoController;
private Button btnSalvar;
private Radio rd1;
private Radio rd2;
private Radio rd3;
private Radio rd4;
private static Logger log = Logger.getLogger(EditarFormaPagoController.class);
private Row rowEquivalencia;
public FormaPago getFormaPago() {
return formaPago;
}
public FormaPago getFormaPago() {
return formaPago;
}
public void setFormaPago(FormaPago formaPago) {
this.formaPago = formaPago;
}
public void setFormaPago(FormaPago formaPago) {
this.formaPago = formaPago;
}
public MyTextbox getTxtNome() {
return txtNome;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
busquedaFormaPagoController = (BusquedaFormaPagoController) Executions.getCurrent().getArg().get("busquedaFormaPagoController");
formaPago = (FormaPago) Executions.getCurrent().getArg().get("formaPago");
formaPagoList = (MyListbox) Executions.getCurrent().getArg().get("formaPagoList");
public void setTxtNome(MyTextbox txtNome) {
this.txtNome = txtNome;
}
if (formaPago.getFormapagoId() == null) {
btnApagar.setVisible(Boolean.FALSE);
} else {
public Button getBtnApagar() {
return btnApagar;
}
if (formaPago.getIndoperacion() == null) {
rd4.setChecked(true);
} else if (formaPago.getIndoperacion() == 1) {
rd1.setChecked(true);
} else if (formaPago.getIndoperacion() == 2) {
rd2.setChecked(true);
} else if (formaPago.getIndoperacion() == 3) {
rd3.setChecked(true);
}
public void setBtnApagar(Button btnApagar) {
this.btnApagar = btnApagar;
}
if (formaPago.getFormapagoId() <= 11 || (formaPago.getFormapagoId() >= 96 && formaPago.getFormapagoId() <= 99)) {
btnApagar.setVisible(Boolean.FALSE);
btnSalvar.setVisible(Boolean.FALSE);
txtNome.setDisabled(Boolean.TRUE);
public Button getBtnSalvar() {
return btnSalvar;
}
Messagebox.show(
Labels.getLabel("MSG.noEditabled"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
public void setBtnSalvar(Button btnSalvar) {
this.btnSalvar = btnSalvar;
}
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
rowEquivalencia.setVisible(Boolean.FALSE);
}
public Row getRowEquivalencia() {
return rowEquivalencia;
}
txtNome.focus();
}
public void setRowEquivalencia(Row rowEquivalencia) {
this.rowEquivalencia = rowEquivalencia;
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getText();
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
busquedaFormaPagoController = (BusquedaFormaPagoController) Executions.getCurrent().getArg().get("busquedaFormaPagoController");
formaPago = (FormaPago) Executions.getCurrent().getArg().get("formaPago");
formaPagoList = (MyListbox) Executions.getCurrent().getArg().get("formaPagoList");
try {
formaPago.setActivo(Boolean.TRUE);
formaPago.setFecmodif(Calendar.getInstance().getTime());
formaPago.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
if (formaPago.getFormapagoId() == null) {
btnApagar.setVisible(Boolean.FALSE);
} else {
if (rd4.isChecked()) {
formaPago.setIndoperacion(null);
} else if (rd1.isChecked()) {
formaPago.setIndoperacion(new Short("1"));
} else if (rd2.isChecked()) {
formaPago.setIndoperacion(new Short("2"));
} else if (rd3.isChecked()) {
formaPago.setIndoperacion(new Short("3"));
}
if (formaPago.getIndoperacion() == null) {
rd4.setChecked(true);
} else if (formaPago.getIndoperacion() == 1) {
rd1.setChecked(true);
} else if (formaPago.getIndoperacion() == 2) {
rd2.setChecked(true);
} else if (formaPago.getIndoperacion() == 3) {
rd3.setChecked(true);
}
if (formaPago.getFormapagoId() == null) {
List<FormaPago> lsFP =
formaPagoService.buscarPorDescricao(formaPago.getDescpago());
if (lsFP.isEmpty()) {
formaPagoService.suscribir(formaPago);
formaPagoList.addItem(formaPago);
if (formaPago.getFormapagoId() <= 11 || (formaPago.getFormapagoId() >= 96 && formaPago.getFormapagoId() <= 99)) {
btnApagar.setVisible(Boolean.FALSE);
btnSalvar.setVisible(Boolean.FALSE);
txtNome.setDisabled(Boolean.TRUE);
Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} else {
formaPagoService.actualizacion(formaPago);
formaPagoList.updateItem(formaPago);
Messagebox.show(
Labels.getLabel("MSG.noEditabled"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
busquedaFormaPagoController.refreshLista();
closeWindow();
} catch (Exception ex) {
log.error("editarFormaPagoController: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
rowEquivalencia.setVisible(Boolean.FALSE);
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.borrarPergunta"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
txtNome.focus();
}
if (resp == Messagebox.YES) {
formaPagoService.borrar(formaPago);
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getText();
Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.borrarOK"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
try {
formaPago.setActivo(Boolean.TRUE);
formaPago.setFecmodif(Calendar.getInstance().getTime());
formaPago.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
formaPagoList.removeItem(formaPago);
if (rd4.isChecked()) {
formaPago.setIndoperacion(null);
} else if (rd1.isChecked()) {
formaPago.setIndoperacion(new Short("1"));
} else if (rd2.isChecked()) {
formaPago.setIndoperacion(new Short("2"));
} else if (rd3.isChecked()) {
formaPago.setIndoperacion(new Short("3"));
}
if (formaPago.getFormapagoId() == null) {
List<FormaPago> lsFP =
formaPagoService.buscarPorDescricao(formaPago.getDescpago());
if (lsFP.isEmpty()) {
formaPagoService.suscribir(formaPago);
formaPagoList.addItem(formaPago);
Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} else {
formaPagoService.actualizacion(formaPago);
formaPagoList.updateItem(formaPago);
Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
busquedaFormaPagoController.refreshLista();
closeWindow();
} catch (Exception ex) {
log.error("editarFormaPagoController: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.borrarPergunta"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
formaPagoService.borrar(formaPago);
Messagebox.show(
Labels.getLabel("editarFormaPagoController.MSG.borrarOK"),
Labels.getLabel("editarFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
formaPagoList.removeItem(formaPago);
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
}

View File

@ -4,186 +4,150 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
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.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.TipoVenta;
import com.rjconsultores.ventaboletos.service.TipoVentaService;
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.MyTextbox;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.util.Calendar;
import java.util.List;
import org.zkoss.util.resource.Labels;
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.Messagebox;
import org.zkoss.zul.Textbox;
/**
*
*
* @author Rafius
*/
@Controller("editarTipoVentaController")
@Scope("prototype")
public class EditarTipoVentaController extends MyGenericForwardComposer {
@Autowired
private TipoVentaService tipoVentaService;
private TipoVenta tipoVenta;
private MyListbox tipoVentaList;
private static Logger log = Logger.getLogger(EditarTipoVentaController.class);
private MyTextbox txtNome;
private Button btnApagar;
private Button btnSalvar;
private static final long serialVersionUID = 1L;
@Autowired
private TipoVentaService tipoVentaService;
private TipoVenta tipoVenta;
private MyListbox tipoVentaList;
private static Logger log = Logger.getLogger(EditarTipoVentaController.class);
private MyTextbox txtNome;
public Button getBtnApagar() {
return btnApagar;
}
public TipoVenta getTipoVenta() {
return tipoVenta;
}
public void setBtnApagar(Button btnApagar) {
this.btnApagar = btnApagar;
}
public void setTipoVenta(TipoVenta tipoVenta) {
this.tipoVenta = tipoVenta;
}
public Textbox getTxtNome() {
return txtNome;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
public void setTxtNome(MyTextbox txtNome) {
this.txtNome = txtNome;
}
TipoVenta tp = (TipoVenta) Executions.getCurrent().getArg().get("tipoVenta");
tipoVenta = (tp.getTipoventaId() == null) ? tp : tipoVentaService.obtenerID(tp.getTipoventaId());
tipoVentaList = (MyListbox) Executions.getCurrent().getArg().get("tipoVentaList");
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
if (tipoVenta.getDesctipoventa() != null) {
txtNome.setValue(tipoVenta.getDesctipoventa());
}
TipoVenta tp = (TipoVenta) Executions.getCurrent().getArg().get("tipoVenta");
tipoVenta = (tp.getTipoventaId() == null) ? tp : tipoVentaService.obtenerID(tp.getTipoventaId());
tipoVentaList = (MyListbox) Executions.getCurrent().getArg().get("tipoVentaList");
if (tipoVenta.getTipoventaId() != null) {
if (tipoVenta.getTipoventaId() <= 12) {
txtNome.setDisabled(Boolean.TRUE);
if (tipoVenta.getDesctipoventa() != null) {
txtNome.setValue(tipoVenta.getDesctipoventa());
}
if (tipoVenta.getTipoventaId() == null) {
btnApagar.setVisible(Boolean.FALSE);
} else {
if (tipoVenta.getTipoventaId() <= 12) {
btnApagar.setVisible(Boolean.FALSE);
btnSalvar.setVisible(Boolean.FALSE);
txtNome.setDisabled(Boolean.TRUE);
Messagebox.show(
Labels.getLabel("MSG.noEditabled"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
Messagebox.show(
Labels.getLabel("MSG.noEditabled"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
txtNome.focus();
}
txtNome.focus();
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
try {
tipoVenta.setDesctipoventa(txtNome.getValue());
tipoVenta.setActivo(Boolean.TRUE);
tipoVenta.setFecmodif(Calendar.getInstance().getTime());
tipoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
try {
tipoVenta.setDesctipoventa(txtNome.getValue());
tipoVenta.setActivo(Boolean.TRUE);
tipoVenta.setFecmodif(Calendar.getInstance().getTime());
tipoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
List<TipoVenta> lsTipoVenta = tipoVentaService.buscar(tipoVenta.getDesctipoventa());
List<TipoVenta> lsTipoVenta = tipoVentaService.buscar(tipoVenta.getDesctipoventa());
boolean podeSalvar = false;
if (lsTipoVenta.isEmpty()) {
podeSalvar = true;
} else {
for (TipoVenta m : lsTipoVenta) {
if (m.getTipoventaId().equals(tipoVenta.getTipoventaId())) {
podeSalvar = true;
}
}
}
boolean podeSalvar = false;
if (lsTipoVenta.isEmpty()) {
podeSalvar = true;
} else {
for (TipoVenta m : lsTipoVenta) {
if (m.getTipoventaId().equals(tipoVenta.getTipoventaId())) {
podeSalvar = true;
}
}
}
if (!podeSalvar) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (!podeSalvar) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (tipoVenta.getTipoventaId() == null) {
tipoVentaService.suscribir(tipoVenta);
tipoVentaList.addItem(tipoVenta);
} else {
tipoVentaService.actualizacion(tipoVenta);
tipoVentaList.updateItem(tipoVenta);
}
if (tipoVenta.getTipoventaId() == null) {
tipoVentaService.suscribir(tipoVenta);
tipoVentaList.addItem(tipoVenta);
} else {
tipoVentaService.actualizacion(tipoVenta);
tipoVentaList.updateItem(tipoVenta);
}
Messagebox.show(
Labels.getLabel("editarTipoVentaController.MSG.suscribirOK"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
Messagebox.show(
Labels.getLabel("editarTipoVentaController.MSG.suscribirOK"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
}
} catch (Exception ex) {
log.error("Suscribir TipoVenta: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
closeWindow();
}
} catch (Exception ex) {
log.error("Suscribir TipoVenta: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarTipoVentaController.MSG.borrarPergunta"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarTipoVentaController.MSG.borrarPergunta"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
if (resp == Messagebox.YES) {
tipoVentaService.borrar(tipoVenta);
tipoVentaService.borrar(tipoVenta);
Messagebox.show(
Labels.getLabel("editarTipoVentaController.MSG.borrarOK"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
Messagebox.show(
Labels.getLabel("editarTipoVentaController.MSG.borrarOK"),
Labels.getLabel("editarTipoVentaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
tipoVentaList.removeItem(tipoVenta);
tipoVentaList.removeItem(tipoVenta);
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
public TipoVenta getTipoVenta() {
return tipoVenta;
}
public void setTipoVenta(TipoVenta tipoVenta) {
this.tipoVenta = tipoVenta;
}
public MyListbox getTipoVentaList() {
return tipoVentaList;
}
public void setTipoVentaList(MyListbox tipoVentaList) {
this.tipoVentaList = tipoVentaList;
}
public TipoVentaService getTipoVentaService() {
return tipoVentaService;
}
public void setTipoVentaService(TipoVentaService tipoVentaService) {
this.tipoVentaService = tipoVentaService;
}
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
}

View File

@ -24,107 +24,83 @@ import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
/**
*
*
* @author Administrador
*/
@Controller("busquedaConfiguracionFormaPagoController")
@Scope("prototype")
public class BusquedaConfiguracionFormaPagoController extends MyGenericForwardComposer {
@Autowired
private transient PagedListWrapper<FormaPagoDet> plwConfigFormaPago;
private MyListbox configFormaPagoList;
private Paging pagingConfigFormaPago;
private Textbox txtNome;
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<FormaPagoDet> plwConfigFormaPago;
private MyListbox configFormaPagoList;
private Paging pagingConfigFormaPago;
private Textbox txtNome;
public MyListbox getConfigFormaPagoList() {
return configFormaPagoList;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
public void setConfigFormaPagoList(MyListbox configFormaPagoList) {
this.configFormaPagoList = configFormaPagoList;
}
configFormaPagoList.setItemRenderer(new RenderConfiguracionFormasPago());
configFormaPagoList.addEventListener("onDoubleClick", new EventListener() {
public Paging getPagingConfigFormaPago() {
return pagingConfigFormaPago;
}
@Override
public void onEvent(Event event) throws Exception {
FormaPagoDet fpd = (FormaPagoDet) configFormaPagoList.getSelected();
verConfigFormaPago(fpd);
}
});
public void setPagingConfigFormaPago(Paging pagingConfigFormaPago) {
this.pagingConfigFormaPago = pagingConfigFormaPago;
}
refreshLista();
public Textbox getTxtNome() {
return txtNome;
}
txtNome.focus();
}
public void setTxtNome(Textbox txtNome) {
this.txtNome = txtNome;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verConfigFormaPago(FormaPagoDet fpd) {
if (fpd == null) {
return;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
Map args = new HashMap();
args.put("formaPagoDet", fpd);
args.put("configFormaPagoList", configFormaPagoList);
configFormaPagoList.setItemRenderer(new RenderConfiguracionFormasPago());
configFormaPagoList.addEventListener("onDoubleClick", new EventListener() {
openWindow("/gui/configuraciones_comerciales/editarConfiguracionFormaPago.zul",
Labels.getLabel("editarConfiguracionFormaPagoController.window.title"), args, MODAL);
}
@Override
public void onEvent(Event event) throws Exception {
FormaPagoDet fpd = (FormaPagoDet) configFormaPagoList.getSelected();
verConfigFormaPago(fpd);
}
});
private void refreshLista() {
HibernateSearchObject<FormaPagoDet> configFormaPagoBusqueda =
new HibernateSearchObject<FormaPagoDet>(FormaPagoDet.class, pagingConfigFormaPago.getPageSize());
refreshLista();
configFormaPagoBusqueda.addFilterLike("formaPago.descpago", "%" + txtNome.getText().trim().concat("%"));
txtNome.focus();
}
configFormaPagoBusqueda.addSortAsc("formaPago.descpago");
configFormaPagoBusqueda.addFilterEqual("activo", Boolean.TRUE);
private void verConfigFormaPago(FormaPagoDet fpd) {
if (fpd == null) {
return;
}
plwConfigFormaPago.init(configFormaPagoBusqueda, configFormaPagoList, pagingConfigFormaPago);
Map args = new HashMap();
args.put("formaPagoDet", fpd);
args.put("configFormaPagoList", configFormaPagoList);
if (configFormaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaConfiguracionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
openWindow("/gui/configuraciones_comerciales/editarConfiguracionFormaPago.zul",
Labels.getLabel("editarConfiguracionFormaPagoController.window.title"), args, MODAL);
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
private void refreshLista() {
HibernateSearchObject<FormaPagoDet> configFormaPagoBusqueda =
new HibernateSearchObject<FormaPagoDet>(FormaPagoDet.class,
pagingConfigFormaPago.getPageSize());
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
configFormaPagoBusqueda.addFilterLike("formaPago.descpago",
"%" + txtNome.getText().trim().concat("%"));
configFormaPagoBusqueda.addSortAsc("formaPago.descpago");
configFormaPagoBusqueda.addFilterEqual("activo", Boolean.TRUE);
plwConfigFormaPago.init(configFormaPagoBusqueda, configFormaPagoList, pagingConfigFormaPago);
if (configFormaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaConfiguracionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnNovo(Event ev) {
verConfigFormaPago(new FormaPagoDet());
}
public void onClick$btnNovo(Event ev) {
verConfigFormaPago(new FormaPagoDet());
}
}

View File

@ -24,112 +24,90 @@ import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
/**
*
*
* @author Administrador
*/
@Controller("busquedaRestriccionFormaPagoController")
@Scope("prototype")
public class BusquedaRestriccionFormaPagoController extends MyGenericForwardComposer {
@Autowired
private transient PagedListWrapper<ConfigRestriccionPago> plwRestriccionFormaPago;
private MyListbox restriccionFormaPagoList;
private Paging pagingrestriccionFormaPago;
private Textbox txtNome;
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<ConfigRestriccionPago> plwRestriccionFormaPago;
private MyListbox restriccionFormaPagoList;
private Paging pagingrestriccionFormaPago;
private Textbox txtNome;
public Paging getPagingrestriccionFormaPago() {
return pagingrestriccionFormaPago;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
public void setPagingrestriccionFormaPago(Paging pagingrestriccionFormaPago) {
this.pagingrestriccionFormaPago = pagingrestriccionFormaPago;
}
restriccionFormaPagoList.setItemRenderer(new RenderRestriccionFormaPago());
restriccionFormaPagoList.addEventListener("onDoubleClick",
new EventListener() {
public MyListbox getRestriccionFormaPagoList() {
return restriccionFormaPagoList;
}
@Override
public void onEvent(Event event) throws Exception {
ConfigRestriccionPago c =
(ConfigRestriccionPago) restriccionFormaPagoList.getSelected();
verConfigRestriccionPago(c);
}
});
public void setRestriccionFormaPagoList(MyListbox restriccionFormaPagoList) {
this.restriccionFormaPagoList = restriccionFormaPagoList;
}
refreshLista();
public Textbox getTxtNome() {
return txtNome;
}
txtNome.focus();
}
public void setTxtNome(Textbox txtNome) {
this.txtNome = txtNome;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verConfigRestriccionPago(ConfigRestriccionPago c) {
if (c == null) {
return;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
Map args = new HashMap();
args.put("configRestriccionPago", c);
args.put("configRestriccionFormaPagoList", restriccionFormaPagoList);
restriccionFormaPagoList.setItemRenderer(new RenderRestriccionFormaPago());
restriccionFormaPagoList.addEventListener("onDoubleClick",
new EventListener() {
openWindow("/gui/configuraciones_comerciales/editarRestriccionFormaPago.zul",
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
args, MODAL);
}
@Override
public void onEvent(Event event) throws Exception {
ConfigRestriccionPago c =
(ConfigRestriccionPago) restriccionFormaPagoList.getSelected();
verConfigRestriccionPago(c);
}
});
private void refreshLista() {
HibernateSearchObject<ConfigRestriccionPago> configRestriccionPagoBusqueda =
new HibernateSearchObject<ConfigRestriccionPago>(
ConfigRestriccionPago.class,
pagingrestriccionFormaPago.getPageSize());
refreshLista();
configRestriccionPagoBusqueda.addFilterLike("formaPago.descpago",
"%" + txtNome.getText().trim().concat("%"));
txtNome.focus();
}
configRestriccionPagoBusqueda.addSortAsc("formaPago.descpago");
configRestriccionPagoBusqueda.addFilterEqual("activo", Boolean.TRUE);
private void verConfigRestriccionPago(ConfigRestriccionPago c) {
if (c == null) {
return;
}
plwRestriccionFormaPago.init(configRestriccionPagoBusqueda,
restriccionFormaPagoList, pagingrestriccionFormaPago);
Map args = new HashMap();
args.put("configRestriccionPago", c);
args.put("configRestriccionFormaPagoList", restriccionFormaPagoList);
if (restriccionFormaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
openWindow("/gui/configuraciones_comerciales/editarRestriccionFormaPago.zul",
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
args, MODAL);
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
private void refreshLista() {
HibernateSearchObject<ConfigRestriccionPago> configRestriccionPagoBusqueda =
new HibernateSearchObject<ConfigRestriccionPago>(
ConfigRestriccionPago.class,
pagingrestriccionFormaPago.getPageSize());
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
configRestriccionPagoBusqueda.addFilterLike("formaPago.descpago",
"%" + txtNome.getText().trim().concat("%"));
configRestriccionPagoBusqueda.addSortAsc("formaPago.descpago");
configRestriccionPagoBusqueda.addFilterEqual("activo", Boolean.TRUE);
plwRestriccionFormaPago.init(configRestriccionPagoBusqueda,
restriccionFormaPagoList, pagingrestriccionFormaPago);
if (restriccionFormaPagoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnNovo(Event ev) {
verConfigRestriccionPago(new ConfigRestriccionPago());
}
public void onClick$btnNovo(Event ev) {
verConfigRestriccionPago(new ConfigRestriccionPago());
}
}

View File

@ -4,6 +4,20 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
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.Combobox;
import com.rjconsultores.ventaboletos.entidad.ConfigRestriccionPago;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
import com.rjconsultores.ventaboletos.entidad.RestriccionPago;
@ -13,209 +27,159 @@ import com.rjconsultores.ventaboletos.service.RestriccionPagoService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
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.Combobox;
/**
*
*
* @author Administrador
*/
@Controller("editarRestriccionFormaPagoController")
@Scope("prototype")
public class EditarRestriccionFormaPagoController extends MyGenericForwardComposer {
@Autowired
private FormaPagoService formaPagoService;
@Autowired
private RestriccionPagoService restriccionPagoService;
@Autowired
private ConfigRestriccionPagoService configRestriccionPagoService;
private ConfigRestriccionPago configRestriccionPago;
private MyListbox restriccionFormaPagoList;
private List<FormaPago> lsFormaPago;
private List<RestriccionPago> lsRestriccionPago;
private Combobox cmbFormaPago;
private Combobox cmbRestriccionFormaPago;
private Button btnApagar;
private static Logger log = Logger.getLogger(EditarRestriccionFormaPagoController.class);
private static final long serialVersionUID = 1L;
@Autowired
private FormaPagoService formaPagoService;
@Autowired
private RestriccionPagoService restriccionPagoService;
@Autowired
private ConfigRestriccionPagoService configRestriccionPagoService;
private ConfigRestriccionPago configRestriccionPago;
private MyListbox restriccionFormaPagoList;
private List<FormaPago> lsFormaPago;
private List<RestriccionPago> lsRestriccionPago;
private Combobox cmbFormaPago;
private Combobox cmbRestriccionFormaPago;
private static Logger log = Logger.getLogger(EditarRestriccionFormaPagoController.class);
public Button getBtnApagar() {
return btnApagar;
}
public List<FormaPago> getLsFormaPago() {
return lsFormaPago;
}
public void setBtnApagar(Button btnApagar) {
this.btnApagar = btnApagar;
}
public void setLsFormaPago(List<FormaPago> lsFormaPago) {
this.lsFormaPago = lsFormaPago;
}
public FormaPagoService getFormaPagoService() {
return formaPagoService;
}
public List<RestriccionPago> getLsRestriccionPago() {
return lsRestriccionPago;
}
public void setFormaPagoService(FormaPagoService formaPagoService) {
this.formaPagoService = formaPagoService;
}
public void setLsRestriccionPago(List<RestriccionPago> lsRestriccionPago) {
this.lsRestriccionPago = lsRestriccionPago;
}
public List<FormaPago> getLsFormaPago() {
return lsFormaPago;
}
public ConfigRestriccionPago getConfigRestriccionPago() {
return configRestriccionPago;
}
public void setLsFormaPago(List<FormaPago> lsFormaPago) {
this.lsFormaPago = lsFormaPago;
}
public void setConfigRestriccionPago(ConfigRestriccionPago configRestriccionPago) {
this.configRestriccionPago = configRestriccionPago;
}
public List<RestriccionPago> getLsRestriccionPago() {
return lsRestriccionPago;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
lsFormaPago = formaPagoService.obtenerTodos();
lsRestriccionPago = restriccionPagoService.obtenerTodos();
public void setLsRestriccionPago(List<RestriccionPago> lsRestriccionPago) {
this.lsRestriccionPago = lsRestriccionPago;
}
super.doAfterCompose(comp);
public ConfigRestriccionPago getConfigRestriccionPago() {
return configRestriccionPago;
}
configRestriccionPago = (ConfigRestriccionPago) Executions.getCurrent().getArg().get("configRestriccionPago");
restriccionFormaPagoList = (MyListbox) Executions.getCurrent().getArg().get("configRestriccionFormaPagoList");
public void setConfigRestriccionPago(ConfigRestriccionPago configRestriccionPago) {
this.configRestriccionPago = configRestriccionPago;
}
cmbFormaPago.focus();
}
public Combobox getCmbFormaPago() {
return cmbFormaPago;
}
public void onClick$btnSalvar(Event ev) {
cmbFormaPago.getValue();
cmbRestriccionFormaPago.getValue();
public void setCmbFormaPago(Combobox cmbFormaPago) {
this.cmbFormaPago = cmbFormaPago;
}
try {
boolean puedoDarDeAlta = configRestriccionPagoService.puedoDarDeAlta(configRestriccionPago);
public Combobox getCmbRestriccionFormaPago() {
return cmbRestriccionFormaPago;
}
List<ConfigRestriccionPago> lsConfig = configRestriccionPagoService.buscar(configRestriccionPago.getFormaPago(), configRestriccionPago.getRestriccion());
public void setCmbRestriccionFormaPago(Combobox cmbRestriccionFormaPago) {
this.cmbRestriccionFormaPago = cmbRestriccionFormaPago;
}
boolean podeSalvar = false;
if (lsConfig.isEmpty()) {
podeSalvar = true;
} else {
for (ConfigRestriccionPago m : lsConfig) {
if (m.getConfigrestriccionId().equals(configRestriccionPago.getConfigrestriccionId())) {
podeSalvar = true;
}
}
}
@Override
public void doAfterCompose(Component comp) throws Exception {
lsFormaPago = formaPagoService.obtenerTodos();
lsRestriccionPago = restriccionPagoService.obtenerTodos();
if (!puedoDarDeAlta) {
super.doAfterCompose(comp);
Integer idRestricion = (configRestriccionPago.getRestriccion().getRestriccionId() == 1)
? 4
: (configRestriccionPago.getRestriccion().getRestriccionId() == 2)
? 5
: (configRestriccionPago.getRestriccion().getRestriccionId() == 3)
? 6 : 0;
RestriccionPago restriContraria = restriccionPagoService.obtenerID(idRestricion.shortValue());
String msg = "";
if (restriContraria != null) {
msg = restriContraria.getDescrestriccion();
}
configRestriccionPago = (ConfigRestriccionPago) Executions.getCurrent().getArg().get("configRestriccionPago");
restriccionFormaPagoList = (MyListbox) Executions.getCurrent().getArg().get("configRestriccionFormaPagoList");
Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.puedoDarDeAlta", new Object[] { msg }),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if (configRestriccionPago.getConfigrestriccionId() == null) {
btnApagar.setVisible(Boolean.FALSE);
}
if (podeSalvar) {
configRestriccionPago.setActivo(Boolean.TRUE);
configRestriccionPago.setFecmodif(Calendar.getInstance().getTime());
configRestriccionPago.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
cmbFormaPago.focus();
}
if (configRestriccionPago.getConfigrestriccionId() == null) {
configRestriccionPagoService.suscribir(configRestriccionPago);
restriccionFormaPagoList.addItem(configRestriccionPago);
} else {
configRestriccionPagoService.actualizacion(configRestriccionPago);
restriccionFormaPagoList.updateItem(configRestriccionPago);
}
public void onClick$btnSalvar(Event ev) {
cmbFormaPago.getValue();
cmbRestriccionFormaPago.getValue();
Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} catch (Exception ex) {
log.error(ex);
}
}
try {
boolean puedoDarDeAlta = configRestriccionPagoService.puedoDarDeAlta(configRestriccionPago);
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.borrarPergunta"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
List<ConfigRestriccionPago> lsConfig = configRestriccionPagoService.buscar(configRestriccionPago.getFormaPago(), configRestriccionPago.getRestriccion());
if (resp == Messagebox.YES) {
configRestriccionPagoService.borrar(configRestriccionPago);
boolean podeSalvar = false;
if (lsConfig.isEmpty()) {
podeSalvar = true;
} else {
for (ConfigRestriccionPago m : lsConfig) {
if (m.getConfigrestriccionId().equals(configRestriccionPago.getConfigrestriccionId())) {
podeSalvar = true;
}
}
}
Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.borrarOK"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
if (!puedoDarDeAlta) {
restriccionFormaPagoList.removeItem(configRestriccionPago);
Integer idRestricion = (configRestriccionPago.getRestriccion().getRestriccionId() == 1)
? 4
: (configRestriccionPago.getRestriccion().getRestriccionId() == 2)
? 5
: (configRestriccionPago.getRestriccion().getRestriccionId() == 3)
? 6 : 0;
RestriccionPago restriContraria = restriccionPagoService.obtenerID(idRestricion.shortValue());
String msg = "";
if (restriContraria != null) {
msg = restriContraria.getDescrestriccion();
}
Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.puedoDarDeAlta", new Object[]{msg}),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if (podeSalvar) {
configRestriccionPago.setActivo(Boolean.TRUE);
configRestriccionPago.setFecmodif(Calendar.getInstance().getTime());
configRestriccionPago.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
if (configRestriccionPago.getConfigrestriccionId() == null) {
configRestriccionPagoService.suscribir(configRestriccionPago);
restriccionFormaPagoList.addItem(configRestriccionPago);
} else {
configRestriccionPagoService.actualizacion(configRestriccionPago);
restriccionFormaPagoList.updateItem(configRestriccionPago);
}
Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.suscribirOK"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} catch (Exception ex) {
log.error(ex);
}
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.borrarPergunta"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
configRestriccionPagoService.borrar(configRestriccionPago);
Messagebox.show(
Labels.getLabel("editarRestriccionFormaPagoController.MSG.borrarOK"),
Labels.getLabel("editarRestriccionFormaPagoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
restriccionFormaPagoList.removeItem(configRestriccionPago);
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
}

View File

@ -26,17 +26,6 @@ public class RenderEmpresa implements ListitemRenderer {
lc = new Listcell(empresa.getNombempresa());
lc.setParent(lstm);
Boolean externa = empresa.getIndExterna();
if (externa != null) {
if (externa) {
lc = new Listcell(Labels.getLabel("MSG.SI"));
lc.setParent(lstm);
} else {
lc = new Listcell(Labels.getLabel("MSG.NO"));
lc.setParent(lstm);
}
}
Short tipo = empresa.getIndTipo();
Short short1 = 1;
Short short2 = 2;
@ -59,7 +48,7 @@ public class RenderEmpresa implements ListitemRenderer {
lc = new Listcell(empresa.getCnpj());
lc.setParent(lstm);
if (!ApplicationProperties.getInstance().mostrarEquivalencia()) {
lc = new Listcell(empresa.getEquivalenciaId());
lc.setParent(lstm);

View File

@ -286,19 +286,19 @@
class="com.rjconsultores.ventaboletos.web.utilerias.spring.ApplicationContextProvider">
</bean>
<!-- <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> -->
<!-- <property name="resourceRef" value="true" /> -->
<!-- <property name="jndiName" value="${database.jndi.name}" /> -->
<!-- </bean> -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${database.driver}" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.username}" />
<property name="password" value="${database.password}" />
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="resourceRef" value="true" />
<property name="jndiName" value="${database.jndi.name}" />
</bean>
<!-- <bean id="dataSource" -->
<!-- class="org.springframework.jdbc.datasource.DriverManagerDataSource"> -->
<!-- <property name="driverClassName" value="${database.driver}" /> -->
<!-- <property name="url" value="${database.url}" /> -->
<!-- <property name="username" value="${database.username}" /> -->
<!-- <property name="password" value="${database.password}" /> -->
<!-- </bean> -->
<!-- ====================================================== -->
<!-- Search class from Hibernate-Generic-DAO framework -->
<!-- ====================================================== -->

View File

@ -7,7 +7,7 @@
# <controler>. <id>. <propiedade> = XXX
#Versao do VentaBoleto:
versao = ADM_20120817_1RC47
versao = ADM_20120820_1RC48
# MSG Defaut:
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100

View File

@ -5,89 +5,94 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaEmpresa" title="${c:l('busquedaEmpresaController.window.title')}"
apply="${busquedaEmpresaController}" contentStyle="overflow:auto"
height="450px" width="850px" border="normal" >
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
tooltiptext="${c:l('busquedaEmpresaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaEmpresaController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar" onClick="winBusquedaEmpresa.detach()" image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaEmpresaController.btnCerrar.tooltiptext')}"/>
</toolbar>
<window id="winBusquedaEmpresa"
title="${c:l('busquedaEmpresaController.window.title')}"
apply="${busquedaEmpresaController}" contentStyle="overflow:auto"
height="450px" width="850px" border="normal">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('busquedaEmpresaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaEmpresaController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar" onClick="winBusquedaEmpresa.detach()"
image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaEmpresaController.btnCerrar.tooltiptext')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label value="${c:l('busquedaEmpresaController.txtNombre.label')}"/>
<textbox id="txtNombre" width="300px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row>
<label value="${c:l('editarEmpresaController.IndTipo.label')}"/>
<combobox id="cmbIndTipo" width="90%" mold="rounded" buttonVisible="true" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar">
<comboitem value="1" label="${c:l('editarEmpresaController.IndTipo.1')}" />
<comboitem value="2" label="${c:l('editarEmpresaController.IndTipo.2')}" />
<comboitem value="3" label="${c:l('editarEmpresaController.IndTipo.3')}" />
</combobox>
</row>
<row>
<label value="${c:l('editarEmpresaController.externa.label')}"/>
<combobox id="cmbExterna" width="90%" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" mold="rounded" buttonVisible="true">
<comboitem value="1" label="${c:l('MSG.SI')}" />
<comboitem value="0" label="${c:l('MSG.NO')}" />
</combobox>
</row>
<row>
<label value="${c:l('editarEmpresaController.rfc.label')}"/>
<textbox id="txtRFC" width="100px" maxlength="13"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}"/>
<textbox id="txtEquivalencia" width="100px" maxlength="10"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaEmpresaController.btnPesquisa.label')}"/>
</toolbar>
<paging id="pagingEmpresa" pageSize="20"/>
<listbox id="empresaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false">
<listhead sizable="true">
<listheader id="lhId" width="70px" image="/gui/img/builder.gif"
label="${c:l('busquedaEmpresaController.lhId.label')}"
sort="auto(empresaId)"/>
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaEmpresaController.lhDesc.label')}"
sort="auto(nombempresa)"/>
<listheader image="/gui/img/create_doc.gif" width="100px"
label="${c:l('editarEmpresaController.externa.label')}"
sort="auto(indExterna)"/>
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEmpresaController.IndTipo.label')}"
sort="auto(indTipo)"/>
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEmpresaController.rfc.label')}"
sort="auto(rfc)"/>
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEmpresaController.cnpj.label')}"
sort="auto(cnpj)"/>
<listheader id="headerEquivalencia" image="/gui/img/create_doc.gif"
label="${c:l('lb.Equivalencia')}"
sort="auto(equivalenciaId)"/>
</listhead>
</listbox>
</window>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label
value="${c:l('busquedaEmpresaController.txtNombre.label')}" />
<textbox id="txtNombre" width="300px"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row>
<label
value="${c:l('editarEmpresaController.IndTipo.label')}" />
<combobox id="cmbIndTipo" width="90%" mold="rounded"
buttonVisible="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar">
<comboitem value="1"
label="${c:l('editarEmpresaController.IndTipo.1')}" />
<comboitem value="2"
label="${c:l('editarEmpresaController.IndTipo.2')}" />
<comboitem value="3"
label="${c:l('editarEmpresaController.IndTipo.3')}" />
</combobox>
</row>
<row>
<label
value="${c:l('editarEmpresaController.rfc.label')}" />
<textbox id="txtRFC" width="100px" maxlength="13"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}" />
<textbox id="txtEquivalencia" width="100px"
maxlength="10"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaEmpresaController.btnPesquisa.label')}" />
</toolbar>
<paging id="pagingEmpresa" pageSize="20" />
<listbox id="empresaList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false">
<listhead sizable="true">
<listheader id="lhId" width="70px"
image="/gui/img/builder.gif"
label="${c:l('busquedaEmpresaController.lhId.label')}"
sort="auto(empresaId)" />
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaEmpresaController.lhDesc.label')}"
sort="auto(nombempresa)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEmpresaController.IndTipo.label')}"
sort="auto(indTipo)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEmpresaController.rfc.label')}"
sort="auto(rfc)" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEmpresaController.cnpj.label')}"
sort="auto(cnpj)" />
<listheader id="headerEquivalencia"
image="/gui/img/create_doc.gif" label="${c:l('lb.Equivalencia')}"
sort="auto(equivalenciaId)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -5,58 +5,65 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaFormaPago" title="${c:l('busquedaFormaPagoController.window.title')}"
apply="${busquedaFormaPagoController}" contentStyle="overflow:auto"
height="350px" width="600px" border="normal" >
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
tooltiptext="${c:l('busquedaFormaPagoController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaFormaPagoController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar" onClick="winBusquedaFormaPago.detach()" image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaFormaPagoController.btnCerrar.tooltiptext')}"/>
</toolbar>
<window id="winBusquedaFormaPago"
title="${c:l('busquedaFormaPagoController.window.title')}"
apply="${busquedaFormaPagoController}" contentStyle="overflow:auto"
height="350px" width="600px" border="normal">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('busquedaFormaPagoController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaFormaPagoController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winBusquedaFormaPago.detach()" image="/gui/img/exit.png"
width="35px"
tooltiptext="${c:l('busquedaFormaPagoController.btnCerrar.tooltiptext')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label value="${c:l('busquedaFormaPagoController.txtNome.label')}"/>
<textbox id="txtNome" width="300px"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}"/>
<textbox id="txtEquivalencia" width="100px" maxlength="10"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
</rows>
</grid>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row>
<label
value="${c:l('busquedaFormaPagoController.txtNome.label')}" />
<textbox id="txtNome" width="300px"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}" />
<textbox id="txtEquivalencia" width="100px"
maxlength="10"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaFormaPagoController.btnPesquisa.label')}"/>
</toolbar>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaFormaPagoController.btnPesquisa.label')}" />
</toolbar>
<paging id="pagingFormaPago" pageSize="15"/>
<listbox id="formaPagoList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false">
<listhead sizable="true">
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaFormaPagoController.lhId.label')}" width="70px"
sort="auto(formapagoId)"/>
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaFormaPagoController.lhDesc.label')}"
sort="auto(descpago)"/>
<listheader id="headerEquivalencia" image="/gui/img/create_doc.gif"
label="${c:l('lb.Equivalencia')}"
sort="auto(equivalenciaId)"/>
</listhead>
</listbox>
</window>
<paging id="pagingFormaPago" pageSize="15" />
<listbox id="formaPagoList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false">
<listhead sizable="true">
<listheader image="/gui/img/create_doc.gif"
label="${c:l('busquedaFormaPagoController.lhId.label')}"
width="70px" sort="auto(formapagoId)" />
<listheader id="lhDesc" image="/gui/img/create_doc.gif"
label="${c:l('busquedaFormaPagoController.lhDesc.label')}"
sort="auto(descpago)" />
<listheader id="headerEquivalencia"
image="/gui/img/create_doc.gif" label="${c:l('lb.Equivalencia')}"
sort="auto(equivalenciaId)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -14,9 +14,6 @@
width="35px"
tooltiptext="${c:l('busquedaTipoVentaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaTipoVentaController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winBusquedaTipoVenta.detach()" image="/gui/img/exit.png"
width="35px"

View File

@ -64,11 +64,6 @@
label="${c:l('editarEmpresaController.IndTipo.3')}" />
</combobox>
</row>
<row>
<label id="lbExterna"
value="${c:l('editarEmpresaController.externa.label')}" />
<checkbox id="chkExterna" />
</row>
<row>
<label
value="${c:l('editarEmpresaController.rfc.label')}" />

View File

@ -5,56 +5,65 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarFormaPago" border="normal"
apply="${editarFormaPagoController}"
width="400px" height="457x" contentStyle="overflow:auto"
title="${c:l('editarFormaPagoController.window.title')}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarFormaPagoController.btnApagar.tooltiptext')}"/>
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarFormaPagoController.btnSalvar.tooltiptext')}"/>
<button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px"
onClick="winEditarFormaPago.detach()"
tooltiptext="${c:l('editarFormaPagoController.btnFechar.tooltiptext')}"/>
</hbox>
</toolbar>
<window id="winEditarFormaPago" border="normal"
apply="${editarFormaPagoController}" width="400px" height="457x"
contentStyle="overflow:auto"
title="${c:l('editarFormaPagoController.window.title')}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarFormaPagoController.btnApagar.tooltiptext')}" />
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarFormaPagoController.btnSalvar.tooltiptext')}" />
<button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px"
onClick="winEditarFormaPago.detach()"
tooltiptext="${c:l('editarFormaPagoController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="40%" />
<column width="60%" />
</columns>
<rows>
<row>
<label id="lbNome" value="${c:l('editarFormaPagoController.lbNome.value')}"/>
<textbox id="txtNome" constraint="no empty" width="90%" maxlength="30"
value="@{winEditarFormaPago$composer.formaPago.descpago}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}"/>
<textbox id="txtEquivalencia" width="100px" maxlength="10"
value="@{winEditarFormaPago$composer.formaPago.equivalenciaId}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row>
<label value="${c:l('editarFormaPagoController.lbOperacion.value')}"/>
<radiogroup id="radioIndOperacion">
<vbox>
<radio value="1" id="rd1" label="${c:l('editarFormaPagoController.lbOperacion1.value')}" />
<radio value="2" id="rd2" label="${c:l('editarFormaPagoController.lbOperacion2.value')}" />
<radio value="3" id="rd3" label="${c:l('editarFormaPagoController.lbOperacion3.value')}" />
<radio value="4" id="rd4" label="${c:l('editarFormaPagoController.lbOperacion4.value')}" checked="true"/>
</vbox>
</radiogroup>
</row>
</rows>
</grid>
<grid fixedLayout="true">
<columns>
<column width="40%" />
<column width="60%" />
</columns>
<rows>
<row>
<label id="lbNome"
value="${c:l('editarFormaPagoController.lbNome.value')}" />
<textbox id="txtNome" constraint="no empty"
width="90%" maxlength="30"
value="@{winEditarFormaPago$composer.formaPago.descpago}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row id="rowEquivalencia">
<label value="${c:l('lb.Equivalencia')}" />
<textbox id="txtEquivalencia" width="100px"
maxlength="10"
value="@{winEditarFormaPago$composer.formaPago.equivalenciaId}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row visible="false"><!-- Adaptacao Brasil -->
<label
value="${c:l('editarFormaPagoController.lbOperacion.value')}" />
<radiogroup id="radioIndOperacion">
<vbox>
<radio value="1" id="rd1"
label="${c:l('editarFormaPagoController.lbOperacion1.value')}" />
<radio value="2" id="rd2"
label="${c:l('editarFormaPagoController.lbOperacion2.value')}" />
<radio value="3" id="rd3"
label="${c:l('editarFormaPagoController.lbOperacion3.value')}" />
<radio value="4" id="rd4"
label="${c:l('editarFormaPagoController.lbOperacion4.value')}"
checked="true" />
</vbox>
</radiogroup>
</row>
</rows>
</grid>
</window>
</window>
</zk>

View File

@ -7,22 +7,19 @@
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaRestriccionFormaPago" title="${c:l('busquedaRestriccionFormaPagoController.window.title')}"
apply="${busquedaRestriccionFormaPagoController}" contentStyle="overflow:auto"
height="500px" width="600px" border="normal" >
height="450px" width="650px" border="normal" >
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
tooltiptext="${c:l('busquedaRestriccionFormaPagoController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaRestriccionFormaPagoController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar" onClick="winBusquedaRestriccionFormaPago.detach()" image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaRestriccionFormaPagoController.btnCerrar.tooltiptext')}"/>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row>

View File

@ -5,48 +5,46 @@
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarRestriccionFormaPago" border="normal"
apply="${editarRestriccionFormaPagoController}"
width="400px" height="400x" contentStyle="overflow:auto"
title="${c:l('editarRestriccionFormaPagoController.window.title')}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarRestriccionFormaPagoController.btnApagar.tooltiptext')}"/>
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarRestriccionFormaPagoController.btnSalvar.tooltiptext')}"/>
<button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px"
onClick="winEditarRestriccionFormaPago.detach()"
tooltiptext="${c:l('editarRestriccionFormaPagoController.btnFechar.tooltiptext')}"/>
</hbox>
</toolbar>
<window id="winEditarRestriccionFormaPago" border="normal"
apply="${editarRestriccionFormaPagoController}" width="400px"
height="400x" contentStyle="overflow:auto"
title="${c:l('editarRestriccionFormaPagoController.window.title')}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px"
onClick="winEditarRestriccionFormaPago.detach()"
tooltiptext="${c:l('editarRestriccionFormaPagoController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="40%" />
<column width="60%" />
</columns>
<rows>
<row>
<label id="lblFormaPago" value="${c:l('busquedaRestriccionFormaPagoController.FormaPago')}"/>
<combobox id="cmbFormaPago" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
mold="rounded" buttonVisible="true"
model="@{winEditarRestriccionFormaPago$composer.lsFormaPago}"
selectedItem="@{winEditarRestriccionFormaPago$composer.configRestriccionPago.formaPago}"/>
</row>
<row>
<label id="lblRestricionFormaPago" value="${c:l('editarRestriccionFormaPagoController.lblRestricionFormaPago.value')}"/>
<combobox id="cmbRestriccionFormaPago" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
mold="rounded" buttonVisible="true"
model="@{winEditarRestriccionFormaPago$composer.lsRestriccionPago}"
selectedItem="@{winEditarRestriccionFormaPago$composer.configRestriccionPago.restriccion}"/>
</row>
</rows>
</grid>
<grid fixedLayout="true">
<columns>
<column width="40%" />
<column width="60%" />
</columns>
<rows>
<row>
<label id="lblFormaPago"
value="${c:l('busquedaRestriccionFormaPagoController.FormaPago')}" />
<combobox id="cmbFormaPago"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" buttonVisible="true"
model="@{winEditarRestriccionFormaPago$composer.lsFormaPago}"
selectedItem="@{winEditarRestriccionFormaPago$composer.configRestriccionPago.formaPago}" />
</row>
<row>
<label id="lblRestricionFormaPago"
value="${c:l('editarRestriccionFormaPagoController.lblRestricionFormaPago.value')}" />
<combobox id="cmbRestriccionFormaPago"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" buttonVisible="true"
model="@{winEditarRestriccionFormaPago$composer.lsRestriccionPago}"
selectedItem="@{winEditarRestriccionFormaPago$composer.configRestriccionPago.restriccion}" />
</row>
</rows>
</grid>
</window>
</window>
</zk>