Merge pull request 'fixes bug#AL-2890' (!243) from AL-2890 into master

Reviewed-on: adm/VentaBoletosAdm#243
Reviewed-by: Célio de Souza Ribeiro JR <celio@rjconsultores.com.br>
Reviewed-by: pinheiro <valdevir@rjconsultores.com.br>
master 1.11.7
Gleison da Cruz 2023-08-10 20:05:48 +00:00
commit 7217a3c3d0
3 changed files with 28 additions and 35 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.11.6</version>
<version>1.11.7</version>
<packaging>war</packaging>
<properties>

View File

@ -207,6 +207,7 @@ import com.rjconsultores.wsag.WSAGLog;
@Controller("editarPuntoVentaController")
@Scope("prototype")
public class EditarPuntoVentaController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarPuntoVentaController.class);
@ -1963,10 +1964,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
puntoVenta.setTitularId(null);
}
/*Comentanddo por que o cliente que pediu não existe mais
validarDiversos();
*/
validarDiversos();
String numagencia = txtNumAg.getValue() + (StringUtils.isBlank(txtDigitoAg.getValue()) ? "" : "-" + txtDigitoAg.getValue());
if (puntoVenta.getAgenciaId() != null) {
@ -2422,9 +2421,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
private void validarDiversos() {
if (puntoVenta.getDiversosId() != null ||
!txtResponEnergia.getValue().isEmpty()
|| cmbPosicao.getSelectedItem() != null
if (puntoVenta.getDiversosId() != null)
{
if(!txtResponEnergia.getValue().isEmpty()
|| checkInformatizada.isChecked()
|| checkBilheteInfo.isChecked()
|| checkVendaInternet.isChecked()
@ -2434,14 +2433,15 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|| checkOfpsPropria.isChecked()
|| checkOfpsTerceiros.isChecked()) {
txtResponAluguel.setConstraint(new ConstraintNoEmpty());
txtResponAluguel.getValue();
txtResponTel.setConstraint(new ConstraintNoEmpty());
txtResponTel.getValue();
puntoVenta.getDiversosId().setActivo(Boolean.TRUE);
puntoVenta.getDiversosId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
puntoVenta.getDiversosId().setFecmodif(Calendar.getInstance().getTime());
txtResponAluguel.setConstraint("no empty");
txtResponAluguel.getValue();
txtResponTel.setConstraint("no empty");
txtResponTel.getValue();
puntoVenta.getDiversosId().setActivo(Boolean.TRUE);
puntoVenta.getDiversosId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
puntoVenta.getDiversosId().setFecmodif(Calendar.getInstance().getTime());
}
} else {
puntoVenta.setDiversosId(null);
@ -4838,10 +4838,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
return value;
}
}
private Boolean isEdicaoDoPuntoVentaEisPermissaoMotivoFormaPago() {
if(puntoVenta.getPuntoventaId()!=null && isPermissaoMotivoFormaPago) {
return true;
}
return false;
if(puntoVenta.getPuntoventaId()!=null && isPermissaoMotivoFormaPago) {
return true;
}
return false;
}
}

View File

@ -50,8 +50,7 @@
<tab
id="tabDiversos"
label="${c:l('editarPuntoVentaController.tab.label.diversos')}"
visible="false" />
label="${c:l('editarPuntoVentaController.tab.label.diversos')}" />
<tab
label="${c:l('editarPuntoVentaController.tab.label.antecipa')}"
visible="false" />
@ -170,15 +169,11 @@
</row>
<row>
<hbox>
<label value="${c:l('editarPuntoVentaController.lblMaxCancelacion')}" />
<image src="/gui/img/Question_mark_1.png" tooltiptext="${c:l('editarPuntoVentaController.dicaMaxCancelacion.ajuda')}"
style="cursor: help" />
</hbox>
<hbox>
<label value="${c:l('editarPuntoVentaController.lblMaxCancelacion')}" />
<image src="/gui/img/Question_mark_1.png" tooltiptext="${c:l('editarPuntoVentaController.dicaMaxCancelacion.ajuda')}"
style="cursor: help" />
</hbox>
<intbox id="txtMaxCancelacion"
constraint="no empty"
maxlength="5"
@ -1088,7 +1083,6 @@
value="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.responEnergia}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row>
<label
value="${c:l('editarConfiguracionDiversosController.lbPosicao.value')}" />
@ -1096,9 +1090,7 @@
mold="rounded" buttonVisible="true"
selectedItem="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.posicao}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
</row>
<row>
<label
value="${c:l('editarConfiguracionDiversosController.lbInformatizada.value')}" />
@ -1189,7 +1181,7 @@
tooltiptext="${c:l('editarConfiguracionAntecipaController.btnApagar.tooltiptext')}" />
<button id="btnSalvarAntecipa" height="20"
image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('editarConfiguracionAntecipaController.btnSalvar.tooltiptext')}" />
tooltiptext="${c:l('editarConfiguracionAntecipaController.btnSalvar.tooltiptext')}" />
</hbox>
</toolbar>