fixes bug#AL-4214

master
celio 2024-08-08 21:54:09 -03:00
parent 96c2e79418
commit f232dc6580
7 changed files with 18592 additions and 97194 deletions

View File

@ -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.119.3</version> <version>1.120.3</version>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>
<modelWeb.version>1.91.0</modelWeb.version> <modelWeb.version>1.92.0</modelWeb.version>
<flyway.version>1.78.1</flyway.version> <flyway.version>1.79.1</flyway.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties> </properties>

View File

@ -23,6 +23,7 @@ import org.zkoss.zul.Button;
import org.zkoss.zul.Checkbox; import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Combobox; import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem; import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Intbox;
import org.zkoss.zul.Messagebox; import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Radio; import org.zkoss.zul.Radio;
import org.zkoss.zul.Row; import org.zkoss.zul.Row;
@ -52,6 +53,8 @@ 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;
import jxl.biff.IntegerHelper;
/** /**
* *
* @author Rafius * @author Rafius
@ -103,6 +106,7 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
/*Forma de Pagamento*/ /*Forma de Pagamento*/
private Combobox cmbEmpresaFormaPago; private Combobox cmbEmpresaFormaPago;
private MyListbox formaPagoList; private MyListbox formaPagoList;
private Intbox intboxIndQuantViasImp;
private List<TipoEventoExtraEmpresa> lsTipoEventoExtraEmpresa; private List<TipoEventoExtraEmpresa> lsTipoEventoExtraEmpresa;
private static Logger log = LogManager.getLogger(EditarTipoEventoExtraController.class); private static Logger log = LogManager.getLogger(EditarTipoEventoExtraController.class);
@ -165,8 +169,36 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
lsFormaPago = formaPagoService.obtenerTodos(); lsFormaPago = formaPagoService.obtenerTodos();
lsTipoEventoExtraFormaPago = tipoEventoExtra.getTipoeventoextraId() == null ? new ArrayList<TipoEventoExtraFormaPago>() : tipoEventoExtraFormaPagoService.buscarPorTipoEventoExtra(tipoEventoExtra); lsTipoEventoExtraFormaPago = tipoEventoExtra.getTipoeventoextraId() == null ? new ArrayList<TipoEventoExtraFormaPago>() : tipoEventoExtraFormaPagoService.buscarPorTipoEventoExtra(tipoEventoExtra);
formaPagoList.setData(lsTipoEventoExtraFormaPago); formaPagoList.setData(lsTipoEventoExtraFormaPago);
intboxIndQuantViasImp.setValue(tipoEventoExtra.getIndQuantViasImp() == null ? 1 : tipoEventoExtra.getIndQuantViasImp());
intboxIndQuantViasImp.setConstraint(Labels.getLabel("editarFormaPagoController.lbvias.semVazio"));
} }
public void onChange$intboxIndQuantViasImp(Event event) throws InterruptedException {
validateIntbox();
}
private void validateIntbox() throws InterruptedException {
Integer value = intboxIndQuantViasImp.getValue();
if (value == null) {
Messagebox.show(Labels.getLabel("editarFormaPagoController.lbvias.semVazio"), "Erro", Messagebox.OK, Messagebox.INFORMATION);
intboxIndQuantViasImp.setValue(1);
return;
}
if (value <= 0) {
Messagebox.show(Labels.getLabel("editarFormaPagoController.lbvias.semNegativo"), "Erro", Messagebox.OK, Messagebox.INFORMATION);
intboxIndQuantViasImp.setValue(1);
return;
}
if (value > 5) {
Messagebox.show(Labels.getLabel("editarFormaPagoController.lbvias.maxCinco"), "Erro", Messagebox.OK, Messagebox.INFORMATION);
intboxIndQuantViasImp.setValue(1);
return;
}
}
public void onClick$btnRemoverEmpresa(Event ev) throws InterruptedException { public void onClick$btnRemoverEmpresa(Event ev) throws InterruptedException {
if (empresasList.getSelectedItem() == null){ if (empresasList.getSelectedItem() == null){
Messagebox.show(Labels.getLabel("editarTipoEventoExtraController.MSG.selecionarEmpresa"), Messagebox.show(Labels.getLabel("editarTipoEventoExtraController.MSG.selecionarEmpresa"),
@ -243,6 +275,9 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
tipoEventoExtra.setIndboleto(Boolean.FALSE);// não valida boleto tipoEventoExtra.setIndboleto(Boolean.FALSE);// não valida boleto
tipoEventoExtra.setPorciva(BigDecimal.ZERO); tipoEventoExtra.setPorciva(BigDecimal.ZERO);
tipoEventoExtra.setIndtipo(raTipo11.isChecked() ? "1" : "0"); tipoEventoExtra.setIndtipo(raTipo11.isChecked() ? "1" : "0");
tipoEventoExtra.setIndQuantViasImp(intboxIndQuantViasImp.getValue() == null
|| intboxIndQuantViasImp.getValue() <= 0
? 1 : intboxIndQuantViasImp.getValue());
Comboitem cbDescontoMonitrip = cmbCveTipoEvento.getSelectedItem(); Comboitem cbDescontoMonitrip = cmbCveTipoEvento.getSelectedItem();
tipoEventoExtra.setCvetipoevento(null); tipoEventoExtra.setCvetipoevento(null);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -120,6 +120,11 @@
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" /> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row> </row>
<row>
<label id="lbIndQuantViasImp" value="${c:l('editarFormaPagoController.lbvias.value')}" tooltiptext="${c:l('editarFormaPagoController.lbvias.mouseover')}"/>
<intbox id="intboxIndQuantViasImp" width="80px" value="@{winEditarTipoEventoExtra$composer.tipoEventoExtra.indQuantViasImp}" />
</row>
<row spans="2"> <row spans="2">
<checkbox id="chkValidarEstoque" <checkbox id="chkValidarEstoque"
checked="@{winEditarTipoEventoExtra$composer.tipoEventoExtra.indValidarEstoque}" checked="@{winEditarTipoEventoExtra$composer.tipoEventoExtra.indValidarEstoque}"