- ajuste: validação de traslapa no pricing ocupação
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32129 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9638dac7c8
commit
739fe0198a
|
@ -1,7 +1,6 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -16,6 +15,7 @@ import org.zkoss.zul.Intbox;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
|
@ -68,13 +68,7 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
|
|||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
|
||||
List<PricingOcupaAntecipa> lsPricingOcupacion = pricingOcupaAntecipaService.obtenerPorPricing(pricingOcupaAntecipa.getPricing());
|
||||
|
||||
if (pricingOcupaAntecipa != null) {
|
||||
lsPricingOcupacion.remove(pricingOcupaAntecipa);
|
||||
}
|
||||
|
||||
try {
|
||||
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
|
||||
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
|
||||
|
@ -83,6 +77,11 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
|
|||
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
|
||||
}
|
||||
closeWindow();
|
||||
} catch (BusinessException e) {
|
||||
Messagebox.show(e.getLocalizedMessage(),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4522,3 +4522,6 @@ editarConexionConfController.MSG.ativarOK = Conexión se activo exitosamente.
|
|||
|
||||
#atualizaCorridaFecHusoFecVerano
|
||||
atualizaCorridaFecHusoFecVerano.numcorrida=Servicio
|
||||
|
||||
|
||||
PricingOcupaAntecipaServiceImpl.msg.traslapa=El registro se traslapa con uno que ya existe
|
|
@ -4574,3 +4574,5 @@ editarConexionConfController.MSG.ativarOK = Conexao ativada com sucesso.
|
|||
|
||||
#atualizaCorridaFecHusoFecVerano
|
||||
atualizaCorridaFecHusoFecVerano.numcorrida=Serviço
|
||||
|
||||
PricingOcupaAntecipaServiceImpl.msg.traslapa=O registro informado se sobrepõe a um existente
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
<column width="45%" />
|
||||
<column width="55%" />
|
||||
<column width="45%" />
|
||||
<column width="55%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
|
@ -53,13 +53,13 @@
|
|||
<label
|
||||
value="${c:l('editarPricingController.porcentaje.value')}" />
|
||||
|
||||
<textbox id="porcentaje" precision="7" scale="2"
|
||||
<textbox id="porcentaje" precision="7" scale="2" width="80%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.porcentaje,
|
||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.importe.value')}" />
|
||||
<textbox id="importe" precision="7" scale="2"
|
||||
<textbox id="importe" precision="7" scale="2" width="80%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.importe,
|
||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||
|
|
Loading…
Reference in New Issue