Correções - Movimentação de estoque centralizado - Agencia

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32438 d1611594-4594-4d17-8e1d-87c2c4800839
master
vinicius 2013-12-05 13:54:48 +00:00
parent 2b09ab9fad
commit 2eede4f612
4 changed files with 26 additions and 11 deletions

View File

@ -148,7 +148,7 @@ public class MovimentacionBilhetesController extends MyGenericForwardComposer {
Aidf aidf = (Aidf)aidfSeleccionada.getValue(); Aidf aidf = (Aidf)aidfSeleccionada.getValue();
Comboitem origemSeleccionada = cmbPuntoVentaOrigem.getSelectedItem(); Comboitem origemSeleccionada = cmbPuntoVentaOrigem.getSelectedItem();
PuntoVenta origem = (PuntoVenta)origemSeleccionada.getValue(); PuntoVenta origem = origemSeleccionada != null ? (PuntoVenta)origemSeleccionada.getValue() : null;
Comboitem destinoSeleccionado = cmbPuntoVentaDestino.getSelectedItem(); Comboitem destinoSeleccionado = cmbPuntoVentaDestino.getSelectedItem();
PuntoVenta destino = (PuntoVenta)destinoSeleccionado.getValue(); PuntoVenta destino = (PuntoVenta)destinoSeleccionado.getValue();

View File

@ -1,7 +1,6 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.gr; package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -19,16 +18,14 @@ import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Longbox; import org.zkoss.zul.Longbox;
import org.zkoss.zul.Textbox; import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.Aidf;
import com.rjconsultores.ventaboletos.entidad.Ciudad;
import com.rjconsultores.ventaboletos.entidad.Estacion; import com.rjconsultores.ventaboletos.entidad.Estacion;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.TipoMovimentacion; import com.rjconsultores.ventaboletos.entidad.TipoMovimentacion;
import com.rjconsultores.ventaboletos.service.EstacionService; import com.rjconsultores.ventaboletos.service.EstacionService;
import com.rjconsultores.ventaboletos.service.MovimentacionBilhetesService; import com.rjconsultores.ventaboletos.service.MovimentacionBilhetesService;
import com.rjconsultores.ventaboletos.service.PuntoVentaService; import com.rjconsultores.ventaboletos.service.PuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@Controller("movimentacionBilhetesPuntoVentaController") @Controller("movimentacionBilhetesPuntoVentaController")
@ -57,7 +54,7 @@ public class MovimentacionBilhetesPuntoVentaController extends MyGenericForwardC
private Combobox cmbEstacionDestino; private Combobox cmbEstacionDestino;
private List<PuntoVenta> lsPuntoVenta; private List<PuntoVenta> lsPuntoVenta;
private Combobox cmbPuntoVenta; private MyComboboxPuntoVenta cmbPuntoVenta;
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
@ -65,9 +62,11 @@ public class MovimentacionBilhetesPuntoVentaController extends MyGenericForwardC
lsEstacion = new ArrayList<Estacion>(); lsEstacion = new ArrayList<Estacion>();
lsTipoMovimentacion = movimentacionBilhetesService.obtenerTiposMovimetacionPuntoVenta(); lsTipoMovimentacion = movimentacionBilhetesService.obtenerTiposMovimetacionPuntoVenta();
setLsPuntoVenta(puntoVentaService.buscarPuntosVentaPorUsuario(UsuarioLogado.getUsuarioLogado())); setLsPuntoVenta(new ArrayList<PuntoVenta>());
super.doAfterCompose(comp); super.doAfterCompose(comp);
txtForminicial.setConstraint("no empty");
} }
public void onChange$cmbPuntoVenta(Event ev) { public void onChange$cmbPuntoVenta(Event ev) {
@ -86,6 +85,13 @@ public class MovimentacionBilhetesPuntoVentaController extends MyGenericForwardC
public void onClick$btnSalvar(Event ev) throws InterruptedException { public void onClick$btnSalvar(Event ev) throws InterruptedException {
cmbPuntoVenta.getValue();
cmbEstacionOrigem.getValue();
cmbEstacionDestino.getValue();
cmbTipoMovimentacion.getValue();
txtForminicial.getValue();
try{ try{
Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem(); Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem();
@ -119,14 +125,17 @@ public class MovimentacionBilhetesPuntoVentaController extends MyGenericForwardC
cmbEstacionDestino.setSelectedItem(null); cmbEstacionDestino.setSelectedItem(null);
cmbEstacionOrigem.setSelectedItem(null); cmbEstacionOrigem.setSelectedItem(null);
txtForminicial.setValue(null);
txtFormfinal.setValue(null); txtFormfinal.setValue(null);
txtCantidad.setValue(null); txtCantidad.setValue(null);
} catch (Exception ex) { } catch (Exception ex) {
String msgError = ex.getMessage();
if(msgError == null)
msgError = Labels.getLabel("MSG.Error");
Messagebox.show( Messagebox.show(
Labels.getLabel("MSG.Error"), msgError,
Labels.getLabel("movimentacionBilhetesController.window.title"), Labels.getLabel("movimentacionBilhetesController.window.title"),
Messagebox.OK, Messagebox.ERROR); Messagebox.OK, Messagebox.ERROR);
} }

View File

@ -324,6 +324,12 @@
<value>com.rjconsultores.ventaboletos.entidad.AbastoCentral</value> <value>com.rjconsultores.ventaboletos.entidad.AbastoCentral</value>
<value>com.rjconsultores.ventaboletos.entidad.AbastoHisto</value> <value>com.rjconsultores.ventaboletos.entidad.AbastoHisto</value>
<value>com.rjconsultores.ventaboletos.entidad.Clasificacion</value>
<value>com.rjconsultores.ventaboletos.entidad.AbastoBoleto</value>
<value>com.rjconsultores.ventaboletos.entidad.DetAbastoBoleto</value>
<value>com.rjconsultores.ventaboletos.entidad.FolioPreimpreso</value>
<value>com.rjconsultores.ventaboletos.entidad.RequisicionBoleto</value>
</list> </list>
</property> </property>

View File

@ -41,7 +41,7 @@
<label <label
value="${c:l('winMovimentacionBilhetesPuntoVenta.puntoventa.label')}" /> value="${c:l('winMovimentacionBilhetesPuntoVenta.puntoventa.label')}" />
<combobox id="cmbPuntoVenta" <combobox id="cmbPuntoVenta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
width="70%" mold="rounded" buttonVisible="true" width="70%" mold="rounded" buttonVisible="true"
model="@{winMovimentacionBilhetesPuntoVenta$composer.lsPuntoVenta}"/> model="@{winMovimentacionBilhetesPuntoVenta$composer.lsPuntoVenta}"/>