fixes bug#AL-3308
parent
09b794597a
commit
47c7a09c14
6
pom.xml
6
pom.xml
|
@ -4,12 +4,12 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.34.11</version>
|
<version>1.34.12</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<modelWeb.version>1.25.0</modelWeb.version>
|
<modelWeb.version>1.25.1</modelWeb.version>
|
||||||
<flyway.version>1.21.0</flyway.version>
|
<flyway.version>1.21.1</flyway.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.ingreso;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.ingreso;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -21,6 +22,7 @@ import org.zkoss.zk.ui.Executions;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Button;
|
import org.zkoss.zul.Button;
|
||||||
import org.zkoss.zul.Checkbox;
|
import org.zkoss.zul.Checkbox;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Messagebox;
|
import org.zkoss.zul.Messagebox;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
|
@ -29,14 +31,19 @@ import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra;
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa;
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraFormaPago;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraPtoVta;
|
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtraPtoVta;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
||||||
import com.rjconsultores.ventaboletos.service.TipoEventoExtraEmpresaService;
|
import com.rjconsultores.ventaboletos.service.TipoEventoExtraEmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.TipoEventoExtraFormaPagoService;
|
||||||
import com.rjconsultores.ventaboletos.service.TipoEventoExtraPtovtaService;
|
import com.rjconsultores.ventaboletos.service.TipoEventoExtraPtovtaService;
|
||||||
import com.rjconsultores.ventaboletos.service.TipoEventoExtraService;
|
import com.rjconsultores.ventaboletos.service.TipoEventoExtraService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
@ -45,7 +52,6 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
|
@ -63,6 +69,10 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
private EmpresaService empresaService;
|
private EmpresaService empresaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TipoEventoExtraPtovtaService tipoEventoExtraPtovtaService;
|
private TipoEventoExtraPtovtaService tipoEventoExtraPtovtaService;
|
||||||
|
@Autowired
|
||||||
|
private FormaPagoService formaPagoService;
|
||||||
|
@Autowired
|
||||||
|
private TipoEventoExtraFormaPagoService tipoEventoExtraFormaPagoService;
|
||||||
|
|
||||||
private TipoEventoExtra tipoEventoExtra;
|
private TipoEventoExtra tipoEventoExtra;
|
||||||
private MyListbox tipoEventoExtraList;
|
private MyListbox tipoEventoExtraList;
|
||||||
|
@ -78,10 +88,22 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
private Radio raTipo22;
|
private Radio raTipo22;
|
||||||
private MyComboboxEstandar cmbEmpresa;
|
private MyComboboxEstandar cmbEmpresa;
|
||||||
private MyComboboxPuntoVenta cmbPontoVenda;
|
private MyComboboxPuntoVenta cmbPontoVenda;
|
||||||
|
/*Forma de Pagamento*/
|
||||||
private List<Empresa> lsEmpresas;
|
private List<Empresa> lsEmpresas;
|
||||||
|
/*Forma de Pagamento*/
|
||||||
|
private List<Empresa> lsEmpresasFormapago;
|
||||||
|
private List<FormaPago> lsFormaPago;
|
||||||
|
private List<TipoEventoExtraFormaPago> lsTipoEventoExtraFormaPago;
|
||||||
private List<com.rjconsultores.ventaboletos.constantes.TipoEventoExtra> lsEventoExtrasConstantes;
|
private List<com.rjconsultores.ventaboletos.constantes.TipoEventoExtra> lsEventoExtrasConstantes;
|
||||||
private MyComboboxEstandar cmbCveTipoEvento;
|
private MyComboboxEstandar cmbCveTipoEvento;
|
||||||
private Row rowIndEnviaExcessoDeBagagemSefaz;
|
private Row rowIndEnviaExcessoDeBagagemSefaz;
|
||||||
|
/*Forma de Pagamento*/
|
||||||
|
private Combobox cmbFormaPago;
|
||||||
|
/*Forma de Pagamento*/
|
||||||
|
private Combobox cmbEmpresaFormaPago;
|
||||||
|
private MyListbox formaPagoList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static Logger log = Logger.getLogger(EditarTipoEventoExtraController.class);
|
private static Logger log = Logger.getLogger(EditarTipoEventoExtraController.class);
|
||||||
|
|
||||||
|
@ -138,6 +160,13 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
txtNome.focus();
|
txtNome.focus();
|
||||||
|
|
||||||
|
lsFormaPago = formaPagoService.obtenerTodos();
|
||||||
|
|
||||||
|
if (tipoEventoExtra.getTipoeventoextraId() != null) {
|
||||||
|
lsTipoEventoExtraFormaPago = tipoEventoExtraFormaPagoService.obtenerTodos();
|
||||||
|
formaPagoList.setData(lsTipoEventoExtraFormaPago);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverEmpresa(Event ev) throws InterruptedException {
|
public void onClick$btnRemoverEmpresa(Event ev) throws InterruptedException {
|
||||||
|
@ -306,6 +335,69 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onClick$btnSalvarFormaPago(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
|
cmbFormaPago.getValue();
|
||||||
|
|
||||||
|
try {
|
||||||
|
FormaPago formaPago = new FormaPago();
|
||||||
|
try {
|
||||||
|
formaPago = (FormaPago) cmbFormaPago.getSelectedItem().getValue();
|
||||||
|
Boolean achou = Boolean.FALSE;
|
||||||
|
if (formaPago != null) {
|
||||||
|
for (TipoEventoExtraFormaPago fpd : lsTipoEventoExtraFormaPago) {
|
||||||
|
if (fpd.getFormapago().equals(formaPago)) {
|
||||||
|
achou = Boolean.TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!achou&&getTipoEventoExtra()!=null){
|
||||||
|
TipoEventoExtraFormaPago fpd = new TipoEventoExtraFormaPago();
|
||||||
|
fpd.setTipoEventoExtra(getTipoEventoExtra());
|
||||||
|
fpd.setFormaPago(formaPago);
|
||||||
|
fpd.setActivo(Boolean.TRUE);
|
||||||
|
fpd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
fpd.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
lsTipoEventoExtraFormaPago.add(fpd);
|
||||||
|
formaPagoList.setData(lsTipoEventoExtraFormaPago);
|
||||||
|
formaPagoList.updateItem(fpd);
|
||||||
|
tipoEventoExtraFormaPagoService.actualizacion(fpd);
|
||||||
|
} else {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarPuntoVentaController.MSG.Achou.FormaPago"),
|
||||||
|
Labels.getLabel("editarTipoEventoExtraController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarPuntoVentaController.MSG.formaDePago"),
|
||||||
|
Labels.getLabel("editarTipoEventoExtraController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error(ex);
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarTipoEventoExtraController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnApagarFormaPago(Event ev) {
|
||||||
|
try {
|
||||||
|
TipoEventoExtraFormaPago fpd = (TipoEventoExtraFormaPago) formaPagoList.getSelected();
|
||||||
|
if (fpd != null) {
|
||||||
|
formaPagoList.removeItem(fpd);
|
||||||
|
lsTipoEventoExtraFormaPago.remove(fpd);
|
||||||
|
tipoEventoExtraFormaPagoService.borrar(fpd);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<Empresa> getLsEmpresas() {
|
public List<Empresa> getLsEmpresas() {
|
||||||
return lsEmpresas;
|
return lsEmpresas;
|
||||||
}
|
}
|
||||||
|
@ -330,4 +422,40 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
||||||
this.lsEventoExtrasConstantes = lsEventoExtrasConstantes;
|
this.lsEventoExtrasConstantes = lsEventoExtrasConstantes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Empresa> obterEmpresasUsuarioLogadoComOpcaoTodas() {
|
||||||
|
List<Empresa> listaEmpresas = new ArrayList<Empresa>();
|
||||||
|
listaEmpresas.add(empresaService.obtenerID(-1));
|
||||||
|
listaEmpresas.addAll(UsuarioLogado.getUsuarioLogado().getEmpresa());
|
||||||
|
return listaEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresasFormapago() {
|
||||||
|
return lsEmpresasFormapago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresasFormapago(List<Empresa> lsEmpresasFormapago) {
|
||||||
|
this.lsEmpresasFormapago = lsEmpresasFormapago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FormaPago> getLsFormaPago() {
|
||||||
|
return lsFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsFormaPago(List<FormaPago> lsFormaPago) {
|
||||||
|
this.lsFormaPago = lsFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbFormaPago() {
|
||||||
|
return cmbFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbFormaPago(Combobox cmbFormaPago) {
|
||||||
|
this.cmbFormaPago = cmbFormaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getFormaPagoList() {
|
||||||
|
return formaPagoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,6 +258,7 @@
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoEmpleado</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoEmpleado</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoEventoExtraEmpresa</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoEventoExtraPtoVta</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoEventoExtraPtoVta</value>
|
||||||
|
<value>com.rjconsultores.ventaboletos.entidad.TipoEventoExtraFormaPago</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoMovimiento</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoMovimiento</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoOcupacion</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoOcupacion</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.TipoParada</value>
|
<value>com.rjconsultores.ventaboletos.entidad.TipoParada</value>
|
||||||
|
|
|
@ -6632,6 +6632,7 @@ editarTipoEventoExtraController.lbCveTipoEvento = Tipo de Evento p/ comissão
|
||||||
editarTipoEventoExtraController.tab.label.agenciasAutorizadas = Agências Autorizadas
|
editarTipoEventoExtraController.tab.label.agenciasAutorizadas = Agências Autorizadas
|
||||||
editarTipoEventoExtraController.lbAgencia.value = Ponto de Venda
|
editarTipoEventoExtraController.lbAgencia.value = Ponto de Venda
|
||||||
editarTipoEventoExtraController.indEnviaExcessoDeBagagemSefaz.label = Envia o excesso de Bagagem para SEFAZ
|
editarTipoEventoExtraController.indEnviaExcessoDeBagagemSefaz.label = Envia o excesso de Bagagem para SEFAZ
|
||||||
|
editarTipoEventoExtraController.tab.label.formasPagamento = Forma Pagamento
|
||||||
|
|
||||||
#Pago Motorista
|
#Pago Motorista
|
||||||
indexController.mniPagoConductor.label = Pagamento Motorista
|
indexController.mniPagoConductor.label = Pagamento Motorista
|
||||||
|
|
|
@ -6674,6 +6674,7 @@ editarTipoEventoExtraController.lbCveTipoEvento = Tipo de Evento p/ comissão
|
||||||
editarTipoEventoExtraController.tab.label.agenciasAutorizadas = Agências Autorizadas
|
editarTipoEventoExtraController.tab.label.agenciasAutorizadas = Agências Autorizadas
|
||||||
editarTipoEventoExtraController.lbAgencia.value = Ponto de Venda
|
editarTipoEventoExtraController.lbAgencia.value = Ponto de Venda
|
||||||
editarTipoEventoExtraController.indEnviaExcessoDeBagagemSefaz.label = Envia o excesso de Bagagem para SEFAZ
|
editarTipoEventoExtraController.indEnviaExcessoDeBagagemSefaz.label = Envia o excesso de Bagagem para SEFAZ
|
||||||
|
editarTipoEventoExtraController.tab.label.formasPagamento = Forma Pagamento
|
||||||
|
|
||||||
#Pago Motorista
|
#Pago Motorista
|
||||||
indexController.mniPagoConductor.label = Pagamento Motorista
|
indexController.mniPagoConductor.label = Pagamento Motorista
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
<tab
|
<tab
|
||||||
label="${c:l('editarTipoEventoExtraController.tab.label.agenciasAutorizadas')}" />
|
label="${c:l('editarTipoEventoExtraController.tab.label.agenciasAutorizadas')}" />
|
||||||
|
|
||||||
|
<tab
|
||||||
|
label="${c:l('editarTipoEventoExtraController.tab.label.formasPagamento')}" />
|
||||||
|
|
||||||
</tabs>
|
</tabs>
|
||||||
<tabpanels>
|
<tabpanels>
|
||||||
<tabpanel style="overflow:auto;">
|
<tabpanel style="overflow:auto;">
|
||||||
|
@ -190,6 +193,40 @@
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
<tabpanel> <!-- formas de pagamento -->
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="80%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label id="lblFormaPago"
|
||||||
|
value="${c:l('editarFormaPagoController.lbNome.value')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox id="cmbFormaPago"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
width="80%" mold="rounded" buttonVisible="true"
|
||||||
|
constraint="no empty"
|
||||||
|
model="@{winEditarTipoEventoExtra$composer.lsFormaPago}" />
|
||||||
|
<button id="btnApagarFormaPago" height="20"
|
||||||
|
image="/gui/img/remove.png" width="35px"
|
||||||
|
tooltiptext="${c:l('editarConfiguracionFormaPagoController.btnApagar.tooltiptext')}" />
|
||||||
|
<button id="btnSalvarFormaPago" height="20"
|
||||||
|
image="/gui/img/add.png" width="35px"
|
||||||
|
tooltiptext="${c:l('editarConfiguracionFormaPagoController.btnSalvar.tooltiptext')}" />
|
||||||
|
</hbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<listbox id="formaPagoList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" vflex="true" multiple="false">
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader id="lhFormapago"
|
||||||
|
image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarConfiguracionFormaPagoController.lblFormaPago.value')}" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</tabpanel>
|
||||||
</tabpanels>
|
</tabpanels>
|
||||||
</tabbox>
|
</tabbox>
|
||||||
</window>
|
</window>
|
||||||
|
|
Loading…
Reference in New Issue