Pricing - Junção ocupação/antecipação (ADAM)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@31647 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a5081397a8
commit
d9599fcf9f
|
@ -1,190 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
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;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zhtml.Messagebox;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Intbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingAnticipacion;
|
||||
import com.rjconsultores.ventaboletos.service.PricingAnticipacionService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
*/
|
||||
@Controller("editarPricingAnticipacionController")
|
||||
@Scope("prototype")
|
||||
public class EditarPricingAnticipacionController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private PricingAnticipacionService pricingAnticipacionService;
|
||||
private PricingAnticipacion pricingAnticipacion;
|
||||
private MyListbox pricingAnticipacionList;
|
||||
private Intbox anticipacioninicial;
|
||||
private Intbox anticipacionfinal;
|
||||
private MyTextboxDecimal porcentaje;
|
||||
private Pricing pricing;
|
||||
private ConstraintPorcentagem ct;
|
||||
private static Logger log = Logger.getLogger(EditarPricingAnticipacionController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
ct = new ConstraintPorcentagem();
|
||||
pricing = (Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
pricingAnticipacion = (PricingAnticipacion) Executions.getCurrent().getArg().get("pricingAnticipacion");
|
||||
pricingAnticipacionList = (MyListbox) Executions.getCurrent().getArg().get("pricingAnticipacionList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarAnticipacion(Event ev) throws Exception {
|
||||
anticipacioninicial.getValue();
|
||||
anticipacionfinal.getValue();
|
||||
porcentaje.getValue();
|
||||
|
||||
if (anticipacioninicial.getValue() > 100) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.anticipacionPorcentaje.value"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (anticipacionfinal.getValue() > 100) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.anticipacionPorcentaje.value"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (anticipacionfinal.getValue() < anticipacioninicial.getValue()) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.anticipacionErrada.value"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
} else {
|
||||
|
||||
Integer min = pricingAnticipacion.getCantdiasmin();
|
||||
Integer max = pricingAnticipacion.getCantdiasmax();
|
||||
// Boolean podeSalvar = pricingAnticipacionService.podeSalvar(pricing,
|
||||
// min, max);
|
||||
|
||||
boolean existe = true;
|
||||
|
||||
List<PricingAnticipacion> lsPricingAnticipacion = pricingAnticipacionService.obtenerPorPricing(pricingAnticipacion.getPricing());
|
||||
|
||||
if (pricingAnticipacion != null) {
|
||||
lsPricingAnticipacion.remove(pricingAnticipacion);
|
||||
}
|
||||
for (PricingAnticipacion po : lsPricingAnticipacion) {
|
||||
if (po.getActivo().equals(Pricing.ATIVO)) {
|
||||
boolean traslapa = TraslaparUtil.intersectNum(
|
||||
po.getCantdiasmin().longValue(), po.getCantdiasmax().longValue(),
|
||||
min.longValue(), max.longValue());
|
||||
if (traslapa) {
|
||||
existe = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (existe) {
|
||||
if (pricingAnticipacion.getPricinganticipacionId() != null) {
|
||||
pricingAnticipacionService.actualizacion(pricingAnticipacion);
|
||||
pricingAnticipacionList.updateItem(pricingAnticipacion);
|
||||
} else {
|
||||
pricingAnticipacionService.suscribir(pricingAnticipacion);
|
||||
pricingAnticipacionList.addItemNovo(pricingAnticipacion);
|
||||
}
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.anticipacionErrada"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverAnticipacion(Event ev) {
|
||||
try {
|
||||
PricingAnticipacion pAnticipacion = (PricingAnticipacion) pricingAnticipacionList.getSelected();
|
||||
if (pAnticipacion != null) {
|
||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaAnticipacion"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.YES | Messagebox.NO,
|
||||
Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingAnticipacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingAnticipacion.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingAnticipacion.setActivo(Pricing.EXCLUIDO);
|
||||
|
||||
pricingAnticipacionList.removeItem(pricingAnticipacion);
|
||||
pricingAnticipacionService.borrar(pricingAnticipacion);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PricingAnticipacion getPricingAnticipacion() {
|
||||
return pricingAnticipacion;
|
||||
}
|
||||
|
||||
public void setPricingAnticipacion(PricingAnticipacion pricingAnticipacion) {
|
||||
this.pricingAnticipacion = pricingAnticipacion;
|
||||
}
|
||||
|
||||
public MyListbox getPricingAnticipacionList() {
|
||||
return pricingAnticipacionList;
|
||||
}
|
||||
|
||||
public void setPricingAnticipacionList(MyListbox pricingAnticipacionList) {
|
||||
this.pricingAnticipacionList = pricingAnticipacionList;
|
||||
}
|
||||
|
||||
public PricingAnticipacionService getPricingAnticipacionService() {
|
||||
return pricingAnticipacionService;
|
||||
}
|
||||
|
||||
public void setPricingAnticipacionService(
|
||||
PricingAnticipacionService pricingAnticipacionService) {
|
||||
this.pricingAnticipacionService = pricingAnticipacionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ct
|
||||
*/
|
||||
public ConstraintPorcentagem getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ct
|
||||
* the ct to set
|
||||
*/
|
||||
public void setCt(ConstraintPorcentagem ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
}
|
|
@ -37,7 +37,6 @@ import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
|||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingAnticipacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingAsiento;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingCategoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingClase;
|
||||
|
@ -46,7 +45,7 @@ import com.rjconsultores.ventaboletos.entidad.PricingDia;
|
|||
import com.rjconsultores.ventaboletos.entidad.PricingImporte;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingMarca;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingMercado;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingRuta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingTipoPtoVta;
|
||||
|
@ -76,7 +75,6 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
|||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingAnticipacion;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingAsiento;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingCategoria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingClase;
|
||||
|
@ -85,7 +83,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingDia;
|
|||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingImporte;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMarca;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMercado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingOcupacion;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingRuta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingTipoPtoVta;
|
||||
|
@ -149,9 +147,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
private MyListbox pricingDiaList;
|
||||
private MyListbox pricingCorridaList;
|
||||
private MyListbox pricingAsientoList;
|
||||
private MyListbox pricingOcupacionList;
|
||||
private MyListbox pricingAnticipacionList;
|
||||
private MyListbox pricingTipoServicioList;
|
||||
private MyListbox pricingOcupaAntecipaList;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private List<PricingVigencia> lsPricingVigencia;
|
||||
private List<PricingImporte> lsPricingImporte;
|
||||
|
@ -164,9 +161,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
private List<PricingCorrida> lsPricingCorrida;
|
||||
private List<PricingCategoria> lsPricingCategoria;
|
||||
private List<PricingAsiento> lsPricingAsiento;
|
||||
private List<PricingOcupacion> lsPricingOcupacion;
|
||||
private List<PricingOcupaAntecipa> lsPricingOcupaAntecipa;
|
||||
private List<PricingRuta> lsPricingRuta;
|
||||
private List<PricingAnticipacion> lsPricingAnticipacion;
|
||||
private List<PricingTipoServicio> lsPricingTipoServicio;
|
||||
private static Logger log = Logger.getLogger(EditarPricingController.class);
|
||||
private Combobox cmbEmpresa;
|
||||
|
@ -216,9 +212,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
private Button btnNovoAsiento;
|
||||
private Button btnApagarAsiento;
|
||||
private Button btnModificarAsiento;
|
||||
private Button btnNovoOcupacion;
|
||||
private Button btnApagarOcupacion;
|
||||
private Button btnModificarOcupacion;
|
||||
private Button btnNovoOcupaAntecipa;
|
||||
private Button btnApagarOcupaAntecipa;
|
||||
private Button btnModificarOcupaAntecipa;
|
||||
private Button btnNovoAnticipacion;
|
||||
private Button btnApagarAnticipacion;
|
||||
private Button btnModificarAnticipacion;
|
||||
|
@ -402,15 +398,15 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
});
|
||||
|
||||
// Anticipacion
|
||||
pricingAnticipacionList.setItemRenderer(new RenderPricingAnticipacion());
|
||||
lsPricingAnticipacion = new ArrayList<PricingAnticipacion>();
|
||||
pricingAnticipacionList.addEventListener("onDoubleClick", new EventListener() {
|
||||
// OcupaAntecipa
|
||||
pricingOcupaAntecipaList.setItemRenderer(new RenderPricingOcupaAntecipa());
|
||||
lsPricingOcupaAntecipa = new ArrayList<PricingOcupaAntecipa>();
|
||||
pricingOcupaAntecipaList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
PricingAnticipacion pAnticipacion = (PricingAnticipacion) pricingAnticipacionList.getSelected();
|
||||
verPricingAnticipacion(pAnticipacion);
|
||||
PricingOcupaAntecipa pOcupaAntecipa = (PricingOcupaAntecipa) pricingOcupaAntecipaList.getSelected();
|
||||
verPricingOcupaAntecipa(pOcupaAntecipa);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -426,18 +422,6 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
});
|
||||
|
||||
// Ocupacion
|
||||
pricingOcupacionList.setItemRenderer(new RenderPricingOcupacion());
|
||||
lsPricingOcupacion = new ArrayList<PricingOcupacion>();
|
||||
pricingOcupacionList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
PricingOcupacion pOcupacion = (PricingOcupacion) pricingOcupacionList.getSelected();
|
||||
verPricingOcupacion(pOcupacion);
|
||||
}
|
||||
});
|
||||
|
||||
if (pricing.getPricingId() != null) {
|
||||
pricing = pricingService.obtenerID(pricing.getPricingId());
|
||||
|
||||
|
@ -464,11 +448,13 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
if (lsPricingClase.size() > 0) {
|
||||
pricingClaseList.setSelectedIndex(0);
|
||||
}
|
||||
lsPricingAnticipacion = pricing.getPricingAnticipacionList(buscarPricingInativosAtivos);
|
||||
pricingAnticipacionList.setData(lsPricingAnticipacion);
|
||||
if (lsPricingAnticipacion.size() > 0) {
|
||||
pricingAnticipacionList.setSelectedIndex(0);
|
||||
|
||||
lsPricingOcupaAntecipa = pricing.getPricingOcupaAntecipaList(buscarPricingInativosAtivos);
|
||||
pricingOcupaAntecipaList.setData(lsPricingOcupaAntecipa);
|
||||
if (lsPricingOcupaAntecipa.size() > 0) {
|
||||
pricingOcupaAntecipaList.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
lsPricingTipoServicio = pricing.getPricingTipoServicioList(buscarPricingInativosAtivos);
|
||||
pricingTipoServicioList.setData(lsPricingTipoServicio);
|
||||
if (lsPricingTipoServicio.size() > 0) {
|
||||
|
@ -511,11 +497,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
lsPricingAsiento = pricing.getPricingAsientoList(buscarPricingInativosAtivos);
|
||||
pricingAsientoList.setData(lsPricingAsiento);
|
||||
|
||||
lsPricingOcupacion = pricing.getPricingOcupacionList(buscarPricingInativosAtivos);
|
||||
pricingOcupacionList.setData(lsPricingOcupacion);
|
||||
|
||||
lsPricingAnticipacion = pricing.getPricingAnticipacionList(buscarPricingInativosAtivos);
|
||||
pricingAnticipacionList.setData(lsPricingAnticipacion);
|
||||
lsPricingOcupaAntecipa = pricing.getPricingOcupaAntecipaList(buscarPricingInativosAtivos);
|
||||
pricingOcupaAntecipaList.setData(lsPricingOcupaAntecipa);
|
||||
|
||||
lsPricingTipoServicio = pricing.getPricingTipoServicioList(buscarPricingInativosAtivos);
|
||||
pricingTipoServicioList.setData(lsPricingTipoServicio);
|
||||
|
@ -781,7 +764,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
} else {
|
||||
if ((descuentoporcsen.getValue() == null) || (descuentoporcsen.getValue().equals("")) || (descuentoporcsen.getValueDecimal().compareTo(BigDecimal.ZERO) == 0)) {
|
||||
if ((pricingAsientoList.getData().length == 0) && (pricingOcupacionList.getData().length == 0)) {
|
||||
if ((pricingAsientoList.getData().length == 0) && (pricingOcupaAntecipaList.getData().length == 0)) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.porcentajeSencilloVazio"),
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
|
@ -1783,26 +1766,26 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public void onClick$btnApagarOcupacion(Event ev) throws Exception {
|
||||
PricingOcupacion pOcupacion = (PricingOcupacion) pricingOcupacionList.getSelected();
|
||||
public void onClick$btnApagarOcupaAntecipa(Event ev) throws Exception {
|
||||
PricingOcupaAntecipa pOcupaAntecipa = (PricingOcupaAntecipa) pricingOcupaAntecipaList.getSelected();
|
||||
|
||||
if (pOcupacion != null) {
|
||||
if (pOcupaAntecipa != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaOcupacion"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
if (resp == Messagebox.YES) {
|
||||
lsPricingOcupacion.remove(pOcupacion);
|
||||
lsPricingOcupaAntecipa.remove(pOcupaAntecipa);
|
||||
|
||||
pOcupacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pOcupacion.setFecmodif(Calendar.getInstance().getTime());
|
||||
pOcupacion.setActivo(Pricing.EXCLUIDO);
|
||||
pOcupaAntecipa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pOcupaAntecipa.setFecmodif(Calendar.getInstance().getTime());
|
||||
pOcupaAntecipa.setActivo(Pricing.EXCLUIDO);
|
||||
|
||||
lsPricingOcupacion.add(pOcupacion);
|
||||
pricingOcupacionList.removeItem(pOcupacion);
|
||||
pricingOcupacionList.clearSelection();
|
||||
lsPricingOcupaAntecipa.add(pOcupaAntecipa);
|
||||
pricingOcupaAntecipaList.removeItem(pOcupaAntecipa);
|
||||
pricingOcupaAntecipaList.clearSelection();
|
||||
|
||||
pricing.setPricingOcupacionList(lsPricingOcupacion);
|
||||
pricing.setPricingOcupaAntecipaList(lsPricingOcupaAntecipa);
|
||||
pricingService.actualizacion(pricing);
|
||||
}
|
||||
} else {
|
||||
|
@ -1810,36 +1793,36 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public void onClick$btnNovoOcupacion(Event ev) throws InterruptedException {
|
||||
public void onClick$btnNovoOcupaAntecipa(Event ev) throws InterruptedException {
|
||||
if (!validarNome()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PricingOcupacion pOcupacion = new PricingOcupacion();
|
||||
pOcupacion.setPricing(pricing);
|
||||
verPricingOcupacion(pOcupacion);
|
||||
PricingOcupaAntecipa pOcupaAntecipa = new PricingOcupaAntecipa();
|
||||
pOcupaAntecipa.setPricing(pricing);
|
||||
verPricingOcupaAntecipa(pOcupaAntecipa);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void verPricingOcupacion(PricingOcupacion pOcupacion) {
|
||||
private void verPricingOcupaAntecipa(PricingOcupaAntecipa pOcupaAntecipa) {
|
||||
if (pricing.getPricingId() == null) {
|
||||
pricingService.suscribir(pricing);
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("pricingOcupacion", pOcupacion);
|
||||
args.put("pricingOcupaAntecipa", pOcupaAntecipa);
|
||||
args.put("pricing", pricing);
|
||||
args.put("pricingOcupacionList", pricingOcupacionList);
|
||||
args.put("pricingOcupaAntecipaList", pricingOcupaAntecipaList);
|
||||
|
||||
openWindow("/gui/pricing/editarPricingOcupacion.zul",
|
||||
openWindow("/gui/pricing/editarPricingOcupaAntecipa.zul",
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"), args, MODAL);
|
||||
}
|
||||
|
||||
public void onClick$btnModificarOcupacion(Event ev) {
|
||||
PricingOcupacion pOcupacion = (PricingOcupacion) pricingOcupacionList.getSelected();
|
||||
public void onClick$btnModificarOcupaAntecipa(Event ev) {
|
||||
PricingOcupaAntecipa pOcupaAntecipa = (PricingOcupaAntecipa) pricingOcupaAntecipaList.getSelected();
|
||||
|
||||
if (pOcupacion != null) {
|
||||
verPricingOcupacion(pOcupacion);
|
||||
if (pOcupaAntecipa != null) {
|
||||
verPricingOcupaAntecipa(pOcupaAntecipa);
|
||||
} else {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
@ -1914,71 +1897,6 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public void onClick$btnApagarAnticipacion(Event ev) throws Exception {
|
||||
PricingAnticipacion pAnticipacion = (PricingAnticipacion) pricingAnticipacionList.getSelected();
|
||||
|
||||
if (pAnticipacion != null) {
|
||||
int resp = Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaAnticipacion"),
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
if (resp == Messagebox.YES) {
|
||||
lsPricingAnticipacion.remove(pAnticipacion);
|
||||
|
||||
pAnticipacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pAnticipacion.setFecmodif(Calendar.getInstance().getTime());
|
||||
pAnticipacion.setActivo(Pricing.EXCLUIDO);
|
||||
|
||||
lsPricingAnticipacion.add(pAnticipacion);
|
||||
pricingAnticipacionList.removeItem(pAnticipacion);
|
||||
pricingAnticipacionList.clearSelection();
|
||||
|
||||
pricing.setPricingAnticipacionList(lsPricingAnticipacion);
|
||||
pricingService.actualizacion(pricing);
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnNovoAnticipacion(Event ev) throws InterruptedException {
|
||||
if (!validarNome()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PricingAnticipacion pAnticipacion = new PricingAnticipacion();
|
||||
pAnticipacion.setPricing(pricing);
|
||||
verPricingAnticipacion(pAnticipacion);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void verPricingAnticipacion(PricingAnticipacion pAnticipacion) {
|
||||
if (pricing.getPricingId() == null) {
|
||||
pricingService.suscribir(pricing);
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("pricingAnticipacion", pAnticipacion);
|
||||
args.put("pricingAnticipacionList", pricingAnticipacionList);
|
||||
|
||||
openWindow("/gui/pricing/editarPricingAnticipacion.zul",
|
||||
Labels.getLabel("editarPricingController.windowAnticipacion.title"), args, MODAL);
|
||||
}
|
||||
|
||||
public void onClick$btnModificarAnticipacion(Event ev) {
|
||||
PricingAnticipacion pAnticipacion = (PricingAnticipacion) pricingAnticipacionList.getSelected();
|
||||
|
||||
if (pAnticipacion != null) {
|
||||
verPricingAnticipacion(pAnticipacion);
|
||||
} else {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
java.util.logging.Logger.getLogger(EditarPricingController.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnApagarTipoServicio(Event ev) throws Exception {
|
||||
PricingTipoServicio pTipoServicio = (PricingTipoServicio) pricingTipoServicioList.getSelected();
|
||||
|
||||
|
@ -2111,10 +2029,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
pricingDiaList.setDisabled(desativar);
|
||||
pricingCorridaList.setDisabled(desativar);
|
||||
pricingAsientoList.setDisabled(desativar);
|
||||
pricingOcupacionList.setDisabled(desativar);
|
||||
pricingAnticipacionList.setDisabled(desativar);
|
||||
pricingOcupaAntecipaList.setDisabled(desativar);
|
||||
pricingTipoServicioList.setDisabled(desativar);
|
||||
|
||||
btnNovoVigencia.setDisabled(desativar);
|
||||
btnApagarVigencia.setDisabled(desativar);
|
||||
btnModificarVigencia.setDisabled(desativar);
|
||||
|
@ -2146,9 +2062,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
btnNovoAsiento.setDisabled(desativar);
|
||||
btnApagarAsiento.setDisabled(desativar);
|
||||
btnModificarAsiento.setDisabled(desativar);
|
||||
btnNovoOcupacion.setDisabled(desativar);
|
||||
btnApagarOcupacion.setDisabled(desativar);
|
||||
btnModificarOcupacion.setDisabled(desativar);
|
||||
btnNovoOcupaAntecipa.setDisabled(desativar);
|
||||
btnApagarOcupaAntecipa.setDisabled(desativar);
|
||||
btnModificarOcupaAntecipa.setDisabled(desativar);
|
||||
btnNovoAnticipacion.setDisabled(desativar);
|
||||
btnApagarAnticipacion.setDisabled(desativar);
|
||||
btnModificarAnticipacion.setDisabled(desativar);
|
||||
|
@ -2272,14 +2188,6 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
this.lsPricingMercado = lsPricingMercado;
|
||||
}
|
||||
|
||||
public List<PricingOcupacion> getLsPricingOcupacion() {
|
||||
return lsPricingOcupacion;
|
||||
}
|
||||
|
||||
public void setLsPricingOcupacion(List<PricingOcupacion> lsPricingOcupacion) {
|
||||
this.lsPricingOcupacion = lsPricingOcupacion;
|
||||
}
|
||||
|
||||
public List<PricingRuta> getLsPricingRuta() {
|
||||
return lsPricingRuta;
|
||||
}
|
||||
|
@ -2288,6 +2196,14 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
this.lsPricingRuta = lsPricingRuta;
|
||||
}
|
||||
|
||||
public List<PricingOcupaAntecipa> getLsPricingOcupaAntecipa() {
|
||||
return lsPricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public void setLsPricingOcupaAntecipa(List<PricingOcupaAntecipa> lsPricingOcupaAntecipa) {
|
||||
this.lsPricingOcupaAntecipa = lsPricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public MyListbox getPricingImporteList() {
|
||||
return pricingImporteList;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,165 @@
|
|||
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;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zhtml.Messagebox;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.api.Decimalbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
||||
import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
@Controller("editarPricingOcupaAntecipaController")
|
||||
@Scope("prototype")
|
||||
public class EditarPricingOcupaAntecipaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private PricingOcupaAntecipaService pricingOcupaAntecipaService;
|
||||
private PricingOcupaAntecipa pricingOcupaAntecipa;
|
||||
private MyListbox pricingOcupaAntecipaList;
|
||||
private Intbox cantdiasmin;
|
||||
private Intbox cantdiasmax;
|
||||
private Intbox cantasientosmin;
|
||||
private Intbox cantasientosmax;
|
||||
private Decimalbox porcentaje;
|
||||
private Decimalbox importe;
|
||||
private Pricing pricing;
|
||||
private ConstraintPorcentagem ct;
|
||||
private static Logger log = Logger.getLogger(EditarPricingOcupaAntecipaController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
ct = new ConstraintPorcentagem();
|
||||
pricing = (Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
pricingOcupaAntecipa = (PricingOcupaAntecipa) Executions.getCurrent().getArg().get("pricingOcupaAntecipa");
|
||||
pricingOcupaAntecipaList = (MyListbox) Executions.getCurrent().getArg().get("pricingOcupaAntecipaList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
|
||||
|
||||
if ((cantasientosmin.getValue() != null && cantasientosmax.getValue() != null)
|
||||
|| (cantdiasmin.getValue() != null && cantdiasmax.getValue() != null)) {
|
||||
|
||||
if (porcentaje.getValue() != null && importe.getValue() != null) {
|
||||
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
if (porcentaje.getValue() == null && importe.getValue() == null) {
|
||||
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else {
|
||||
|
||||
Boolean podeSalvar = Boolean.FALSE;
|
||||
if (cantasientosmin.getValue() != null && cantasientosmax.getValue() != null) {
|
||||
podeSalvar = pricingOcupaAntecipaService.podeSalvar(pricing, pricingOcupaAntecipa);
|
||||
} else {
|
||||
if (cantdiasmin.getValue() < cantdiasmax.getValue()) {
|
||||
podeSalvar = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
List<PricingOcupaAntecipa> lsPricingOcupacion = pricingOcupaAntecipaService.obtenerPorPricing(pricingOcupaAntecipa.getPricing());
|
||||
|
||||
if (podeSalvar) {
|
||||
if (pricingOcupaAntecipa != null) {
|
||||
lsPricingOcupacion.remove(pricingOcupaAntecipa);
|
||||
}
|
||||
|
||||
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
|
||||
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
|
||||
} else {
|
||||
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
|
||||
}
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.ocAnt"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverOcupaAntecipa(Event ev) {
|
||||
|
||||
try {
|
||||
PricingOcupaAntecipa pOcupacion = (PricingOcupaAntecipa) pricingOcupaAntecipaList.getSelected();
|
||||
if (pOcupacion != null) {
|
||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaOcupacion"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.YES | Messagebox.NO,
|
||||
Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingOcupaAntecipa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingOcupaAntecipa.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingOcupaAntecipa.setActivo(Pricing.INATIVO);
|
||||
|
||||
pricingOcupaAntecipaList.removeItem(pricingOcupaAntecipa);
|
||||
pricingOcupaAntecipaService.borrar(pricingOcupaAntecipa);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PricingOcupaAntecipa getPricingOcupaAntecipa() {
|
||||
return pricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public void setPricingOcupacion(PricingOcupaAntecipa pricingOcupaAntecipa) {
|
||||
this.pricingOcupaAntecipa = pricingOcupaAntecipa;
|
||||
}
|
||||
|
||||
public MyListbox getPricingOcupacionList() {
|
||||
return pricingOcupaAntecipaList;
|
||||
}
|
||||
|
||||
public void setPricingOcupacionList(MyListbox pricingOcupacionList) {
|
||||
this.pricingOcupaAntecipaList = pricingOcupacionList;
|
||||
}
|
||||
|
||||
public ConstraintPorcentagem getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
public void setCt(ConstraintPorcentagem ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
}
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zhtml.Messagebox;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Intbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupacion;
|
||||
import com.rjconsultores.ventaboletos.service.PricingOcupacionService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
*/
|
||||
@Controller("editarPricingOcupacionController")
|
||||
@Scope("prototype")
|
||||
public class EditarPricingOcupacionController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private PricingOcupacionService pricingOcupacionService;
|
||||
private PricingOcupacion pricingOcupacion;
|
||||
private MyListbox pricingOcupacionList;
|
||||
private Intbox ocupacioninicial;
|
||||
private Intbox ocupacionfinal;
|
||||
private MyTextboxDecimal porcentaje;
|
||||
private Pricing pricing;
|
||||
private ConstraintPorcentagem ct;
|
||||
private static Logger log = Logger.getLogger(EditarPricingOcupacionController.class);
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
ct = new ConstraintPorcentagem();
|
||||
pricing = (Pricing) Executions.getCurrent().getArg().get("pricing");
|
||||
pricingOcupacion = (PricingOcupacion) Executions.getCurrent().getArg().get("pricingOcupacion");
|
||||
pricingOcupacionList = (MyListbox) Executions.getCurrent().getArg().get("pricingOcupacionList");
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnAdicionarOcupacion(Event ev) throws Exception {
|
||||
ocupacioninicial.getValue();
|
||||
ocupacionfinal.getValue();
|
||||
porcentaje.getValue();
|
||||
|
||||
if (ocupacioninicial.getValue() > 100) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionPorcentaje.value"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (ocupacionfinal.getValue() > 100) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionPorcentaje.value"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
} else if (ocupacionfinal.getValue() < ocupacioninicial.getValue()) {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.value"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
} else {
|
||||
|
||||
BigDecimal min = pricingOcupacion.getOcupacioninicial();
|
||||
BigDecimal max = pricingOcupacion.getOcupacionfinal();
|
||||
// Boolean podeSalvar = pricingOcupacionService.podeSalvar(pricing,
|
||||
// min, max);
|
||||
|
||||
boolean existe = true;
|
||||
|
||||
List<PricingOcupacion> lsPricingOcupacion = pricingOcupacionService.obtenerPorPricing(pricingOcupacion.getPricing());
|
||||
|
||||
if (pricingOcupacion != null) {
|
||||
lsPricingOcupacion.remove(pricingOcupacion);
|
||||
}
|
||||
|
||||
for (PricingOcupacion po : lsPricingOcupacion) {
|
||||
if (po.getActivo().equals(Pricing.ATIVO)) {
|
||||
boolean traslapa = TraslaparUtil.intersectNum(
|
||||
po.getOcupacioninicial(), po.getOcupacionfinal(),
|
||||
min, max);
|
||||
if (traslapa) {
|
||||
existe = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (existe) {
|
||||
if (pricingOcupacion.getPricingocupacionId() != null) {
|
||||
pricingOcupacionService.actualizacion(pricingOcupacion);
|
||||
pricingOcupacionList.updateItem(pricingOcupacion);
|
||||
} else {
|
||||
pricingOcupacionService.suscribir(pricingOcupacion);
|
||||
pricingOcupacionList.addItemNovo(pricingOcupacion);
|
||||
}
|
||||
closeWindow();
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverOcupacion(Event ev) {
|
||||
try {
|
||||
PricingOcupacion pOcupacion = (PricingOcupacion) pricingOcupacionList.getSelected();
|
||||
if (pOcupacion != null) {
|
||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaOcupacion"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.YES | Messagebox.NO,
|
||||
Messagebox.QUESTION);
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
pricingOcupacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
pricingOcupacion.setFecmodif(Calendar.getInstance().getTime());
|
||||
pricingOcupacion.setActivo(Pricing.INATIVO);
|
||||
|
||||
pricingOcupacionList.removeItem(pricingOcupacion);
|
||||
pricingOcupacionService.borrar(pricingOcupacion);
|
||||
closeWindow();
|
||||
}
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PricingOcupacion getPricingOcupacion() {
|
||||
return pricingOcupacion;
|
||||
}
|
||||
|
||||
public void setPricingOcupacion(PricingOcupacion pricingOcupacion) {
|
||||
this.pricingOcupacion = pricingOcupacion;
|
||||
}
|
||||
|
||||
public MyListbox getPricingOcupacionList() {
|
||||
return pricingOcupacionList;
|
||||
}
|
||||
|
||||
public void setPricingOcupacionList(MyListbox pricingOcupacionList) {
|
||||
this.pricingOcupacionList = pricingOcupacionList;
|
||||
}
|
||||
|
||||
public PricingOcupacionService getPricingOcupacionService() {
|
||||
return pricingOcupacionService;
|
||||
}
|
||||
|
||||
public void setPricingOcupacionService(
|
||||
PricingOcupacionService pricingOcupacionService) {
|
||||
this.pricingOcupacionService = pricingOcupacionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ct
|
||||
*/
|
||||
public ConstraintPorcentagem getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ct
|
||||
* the ct to set
|
||||
*/
|
||||
public void setCt(ConstraintPorcentagem ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingAnticipacion;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
public class RenderPricingAnticipacion implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingAnticipacion pm = (PricingAnticipacion) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmin() == null ? "" : pm.getCantdiasmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmax() == null ? "" : pm.getCantdiasmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getPorcpricing() == null ? "" : pm.getPorcpricing().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
||||
|
||||
public class RenderPricingOcupaAntecipa implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
PricingOcupaAntecipa pm = (PricingOcupaAntecipa) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(pm.getCantasientosmin() == null ? "" : pm.getCantasientosmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantasientosmax() == null ? "" : pm.getCantasientosmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmin() == null ? "" : pm.getCantdiasmin().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getCantdiasmax() == null ? "" : pm.getCantdiasmax().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getPorcentaje() == null ? "" : pm.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(pm.getImporte() == null ? "" : pm.getImporte().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", pm);
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupacion;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
*/
|
||||
public class RenderPricingOcupacion implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
|
||||
PricingOcupacion po = (PricingOcupacion) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(po.getOcupacioninicial().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(po.getOcupacionfinal().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(po.getPorcentaje().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", po);
|
||||
}
|
||||
}
|
|
@ -164,8 +164,6 @@
|
|||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.Plaza</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.Pricing</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingAnticipacion
|
||||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingImporte</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingVigencia
|
||||
</value>
|
||||
|
@ -174,6 +172,8 @@
|
|||
<value>com.rjconsultores.ventaboletos.entidad.PricingMercado</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingDia</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingCorrida</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa
|
||||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingPuntoVenta
|
||||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingCategoria
|
||||
|
@ -183,8 +183,6 @@
|
|||
<value>com.rjconsultores.ventaboletos.entidad.PricingTipoServicio
|
||||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingAsiento</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingOcupacion
|
||||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingEspecifico
|
||||
</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingRuta</value>
|
||||
|
|
|
@ -2009,7 +2009,7 @@ editarPricingController.tabApl.label = Filtros
|
|||
editarPricingController.tabMer.label = Trecho
|
||||
editarPricingController.tabCor.label = Serviços
|
||||
editarPricingController.tabAsi.label = Poltronas
|
||||
editarPricingController.tabOcu.label = Ocupação
|
||||
editarPricingController.tabOcu.label = Ocupação/Antecipação
|
||||
editarPricingController.tabAnti.label = Antecipação
|
||||
editarPricingController.tabTipo.label = Tipo Corrida
|
||||
editarPricingController.lhEmpresa.label = Empresa
|
||||
|
@ -2151,12 +2151,15 @@ editarPricingController.corridaId.value = Nº Serviço
|
|||
editarPricingController.corridaHora.value = Hora Serviço
|
||||
editarPricingController.asiento.value = Poltrona
|
||||
editarPricingController.nombAsiento.value = Nome Poltrona
|
||||
editarPricingController.ocupacion.value = Ocupação
|
||||
editarPricingController.ocupacion.value = Ocupação/Antecipação
|
||||
editarPricingController.porcentaje.value = Porcentagem %
|
||||
editarPricingController.importe.value = Valor R$
|
||||
editarPricingController.ocupacionMin.value = Ocupação Mínima
|
||||
editarPricingController.ocupacionMax.value = Ocupação Máxima
|
||||
editarPricingController.ocupacionPorcentaje.value = Porcentagem maior que 100%
|
||||
editarPricingController.ocupacionErrada.value = Ocupação mínima maior que ocupação máxima.
|
||||
editarPricingController.ocupacionErrada.centoDin = Deve ser inserido a quantidade em porcentagem % ou em R$.
|
||||
editarPricingController.ocupacionErrada.ocAnt = Deve ser inserido ocupação e/ou os dias de antecipação.
|
||||
editarPricingController.ocupacionErrada = Ocupação informada se sobrepõe com outra já existente.
|
||||
editarPricingController.anticipacionPorcentaje.value = Porcentagem maior que 100%
|
||||
editarPricingController.anticipacionErrada.value = Antecipação mínima maior que ocupação máxima.
|
||||
|
|
|
@ -55,8 +55,6 @@
|
|||
label="${c:l('editarPricingController.tabAsi.label')}" />
|
||||
<tab id="F"
|
||||
label="${c:l('editarPricingController.tabOcu.label')}" />
|
||||
<tab id="G"
|
||||
label="${c:l('editarPricingController.tabAnti.label')}" />
|
||||
<tab id="H"
|
||||
label="${c:l('editarPricingController.tabTipo.label')}" />
|
||||
</tabs>
|
||||
|
@ -682,7 +680,7 @@
|
|||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- Ocupación -->
|
||||
<!-- Ocupación Antecipacion -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
|
@ -697,18 +695,20 @@
|
|||
<label
|
||||
value="${c:l('editarPricingController.ocupacion.value')}:" />
|
||||
<button
|
||||
id="btnNovoOcupacion" image="/gui/img/add.png" width="35px"
|
||||
id="btnNovoOcupaAntecipa" image="/gui/img/add.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoOcupacion.tooltiptext')}" />
|
||||
<button
|
||||
id="btnApagarOcupacion" height="6"
|
||||
id="btnApagarOcupaAntecipa" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button
|
||||
id="btnModificarOcupacion"
|
||||
id="btnModificarOcupaAntecipa"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox id="pricingOcupacionList"
|
||||
<listbox
|
||||
id="pricingOcupaAntecipaList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="370px">
|
||||
<listhead sizable="true">
|
||||
|
@ -720,49 +720,6 @@
|
|||
image="/gui/img/create_doc.gif" sort="auto(ocupacionfinal)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.ocupacionMax.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(porcentaje)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.porcentaje.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
<!-- Anticipacion -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
<columns>
|
||||
<column width="100%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<vbox height="150px" width="100%">
|
||||
<toolbar>
|
||||
<hbox spacing="5px"
|
||||
style="padding:1px" align="right">
|
||||
<label
|
||||
value="${c:l('editarPricingController.tabAnti.label')}:" />
|
||||
<button
|
||||
id="btnNovoAnticipacion" image="/gui/img/add.png"
|
||||
width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnNovoAnticipacion.tooltiptext')}" />
|
||||
<button
|
||||
id="btnApagarAnticipacion" height="6"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
|
||||
<button
|
||||
id="btnModificarAnticipacion"
|
||||
label="${c:l('editarPricingController.btnModificar.value')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
<listbox
|
||||
id="pricingAnticipacionList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" height="370px">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif"
|
||||
sort="auto(anticipacioninicial)" align="left"
|
||||
|
@ -775,6 +732,10 @@
|
|||
image="/gui/img/create_doc.gif" sort="auto(porcentaje)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.porcentaje.value')}" />
|
||||
<listheader
|
||||
image="/gui/img/create_doc.gif" sort="auto(importe)"
|
||||
align="left"
|
||||
label="${c:l('editarPricingController.importe.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
|
@ -782,6 +743,7 @@
|
|||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
|
||||
<!-- TipoServicio -->
|
||||
<tabpanel>
|
||||
<grid fixedLayout="false">
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPricingAnticipacion"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarPricingAnticipacion" border="normal"
|
||||
apply="${editarPricingAnticipacionController}"
|
||||
width="400px" height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowAnticipacion.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverAnticipacion" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingAnticipacionController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarAnticipacion" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingAnticipacionController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarPricingAnticipacion.detach()"
|
||||
tooltiptext="${c:l('editarPricingAnticipacionController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.anticipacionMin.value')}"/>
|
||||
<intbox id="anticipacioninicial" constraint="no negative, no empty" maxlength="3"
|
||||
value="@{winEditarPricingAnticipacion$composer.pricingAnticipacion.cantdiasmin}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.anticipacionMax.value')}"/>
|
||||
<intbox id="anticipacionfinal" constraint="no negative, no empty" maxlength="3"
|
||||
value="@{winEditarPricingAnticipacion$composer.pricingAnticipacion.cantdiasmax}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.porcentaje.value')}"/>
|
||||
<!-- Todas porcentagens devem aceitar porcentaje -->
|
||||
<textbox id="porcentaje"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" maxValue="100" allowNegative="true" obligatorio="true"
|
||||
value="@{winEditarPricingAnticipacion$composer.pricingAnticipacion.porcpricing,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"/>
|
||||
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPricingOcupaAntecipa"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarPricingOcupaAntecipa" border="normal"
|
||||
apply="${editarPricingOcupaAntecipaController}" width="450px"
|
||||
height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowOcupacion.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<button id="btnAdicionarOcupaAntecipa" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnSalvar.tooltiptext')}" />
|
||||
<button height="20" image="/gui/img/exit.png"
|
||||
width="35px" onClick="winEditarPricingOcupaAntecipa.detach()"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnFechar.tooltiptext')}" />
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacionMin.value')}" />
|
||||
<intbox id="cantasientosmin" maxlength="3"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantasientosmin}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.ocupacionMax.value')}" />
|
||||
<intbox id="cantasientosmax" maxlength="3"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantasientosmax}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.anticipacionMin.value')}" />
|
||||
<intbox id="cantdiasmin" maxlength="3"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantdiasmin}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.anticipacionMax.value')}" />
|
||||
<intbox id="cantdiasmax" maxlength="3"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.cantdiasmax}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarPricingController.porcentaje.value')}" />
|
||||
<decimalbox id="porcentaje" maxlength="5"
|
||||
format="###.##"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.porcentaje}" />
|
||||
<label
|
||||
value="${c:l('editarPricingController.importe.value')}" />
|
||||
<decimalbox id="importe" maxlength="5"
|
||||
format="###.##"
|
||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.importe}" />
|
||||
</row>
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
|
@ -1,55 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPricingOcupacion"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarPricingOcupacion" border="normal"
|
||||
apply="${editarPricingOcupacionController}"
|
||||
width="400px" height="457x" contentStyle="overflow:auto"
|
||||
title="${c:l('editarPricingController.windowOcupacion.title')}">
|
||||
<toolbar>
|
||||
<hbox spacing="5px" style="padding:1px" align="right">
|
||||
<!--button id="btnRemoverOcupacion" height="20"
|
||||
image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnAdicionarOcupacion" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnSalvar.tooltiptext')}"/>
|
||||
<button height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarPricingOcupacion.detach()"
|
||||
tooltiptext="${c:l('editarPricingOcupacionController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.ocupacionMin.value')}"/>
|
||||
<intbox id="ocupacioninicial" constraint="no negative, no empty" maxlength="3"
|
||||
value="@{winEditarPricingOcupacion$composer.pricingOcupacion.ocupacioninicial}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.ocupacionMax.value')}"/>
|
||||
<intbox id="ocupacionfinal" constraint="no negative, no empty" maxlength="3"
|
||||
value="@{winEditarPricingOcupacion$composer.pricingOcupacion.ocupacionfinal}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarPricingController.porcentaje.value')}"/>
|
||||
<!-- Todas porcentagens devem aceitar porcentaje -->
|
||||
<textbox id="porcentaje"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" maxValue="100" allowNegative="true" obligatorio="true"
|
||||
value="@{winEditarPricingOcupacion$composer.pricingOcupacion.porcentaje,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}"/>
|
||||
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</window>
|
||||
</zk>
|
Loading…
Reference in New Issue