Merge pull request 'fixes bug#AL-4214' (!637) from AL-4214 into master
Reviewed-on: adm/VentaBoletosAdm#637 Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>master 1.120.3
commit
d3b8238b47
6
pom.xml
6
pom.xml
|
@ -4,12 +4,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.119.3</version>
|
||||
<version>1.120.3</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<modelWeb.version>1.91.0</modelWeb.version>
|
||||
<flyway.version>1.78.1</flyway.version>
|
||||
<modelWeb.version>1.92.0</modelWeb.version>
|
||||
<flyway.version>1.79.1</flyway.version>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.zkoss.zul.Button;
|
|||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Messagebox;
|
||||
import org.zkoss.zul.Radio;
|
||||
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.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||
|
||||
import jxl.biff.IntegerHelper;
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
|
@ -103,6 +106,7 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
|||
/*Forma de Pagamento*/
|
||||
private Combobox cmbEmpresaFormaPago;
|
||||
private MyListbox formaPagoList;
|
||||
private Intbox intboxIndQuantViasImp;
|
||||
private List<TipoEventoExtraEmpresa> lsTipoEventoExtraEmpresa;
|
||||
|
||||
private static Logger log = LogManager.getLogger(EditarTipoEventoExtraController.class);
|
||||
|
@ -165,8 +169,36 @@ public class EditarTipoEventoExtraController extends MyGenericForwardComposer {
|
|||
lsFormaPago = formaPagoService.obtenerTodos();
|
||||
lsTipoEventoExtraFormaPago = tipoEventoExtra.getTipoeventoextraId() == null ? new ArrayList<TipoEventoExtraFormaPago>() : tipoEventoExtraFormaPagoService.buscarPorTipoEventoExtra(tipoEventoExtra);
|
||||
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 {
|
||||
if (empresasList.getSelectedItem() == null){
|
||||
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.setPorciva(BigDecimal.ZERO);
|
||||
tipoEventoExtra.setIndtipo(raTipo11.isChecked() ? "1" : "0");
|
||||
tipoEventoExtra.setIndQuantViasImp(intboxIndQuantViasImp.getValue() == null
|
||||
|| intboxIndQuantViasImp.getValue() <= 0
|
||||
? 1 : intboxIndQuantViasImp.getValue());
|
||||
|
||||
Comboitem cbDescontoMonitrip = cmbCveTipoEvento.getSelectedItem();
|
||||
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
|
@ -119,7 +119,12 @@
|
|||
value="@{winEditarTipoEventoExtra$composer.tipoEventoExtra.contaContabil}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</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">
|
||||
<checkbox id="chkValidarEstoque"
|
||||
checked="@{winEditarTipoEventoExtra$composer.tipoEventoExtra.indValidarEstoque}"
|
||||
|
|
Loading…
Reference in New Issue