Issue #9792: Impresora en red con stock de pasaje único
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@74219 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
96c6243de7
commit
bceba25ec0
|
@ -631,8 +631,8 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
|||
}
|
||||
txtNomImpressoara.setText("");
|
||||
txtNomeArquivoLayout.setText("");
|
||||
txtNomImpressoara.setDisabled(Boolean.FALSE);
|
||||
txtNomeArquivoLayout.setDisabled(Boolean.FALSE);
|
||||
txtNomImpressoara.setDisabled(Boolean.TRUE);
|
||||
txtNomeArquivoLayout.setDisabled(Boolean.TRUE);
|
||||
cmbEstacion.setSelectedItem(null);
|
||||
List<Estacion> lsEstacion = estacionService.buscarEstacionesStockCentral(estacion.getPuntoVenta());
|
||||
BindingListModel dictModel = new BindingListModelList(lsEstacion, false);
|
||||
|
@ -640,4 +640,34 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public void onChange$cmbEstacion(Event ev) {
|
||||
Comboitem item = (Comboitem) cmbEstacion.getSelectedItem();
|
||||
|
||||
if (item == null || item.getValue() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
Comboitem cbiEmpresa = cmbEmpresaImpressora.getSelectedItem();
|
||||
|
||||
Estacion est = (Estacion)item.getValue();
|
||||
est = estacionService.obtenerID(est.getEstacionId());
|
||||
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
||||
for(EstacionImpresora ei: est.getLsEstacionImpresora()){
|
||||
//Si la mepresa es la misma que se selecciono para la nueva impresora
|
||||
if(empresa != null &&
|
||||
empresa.getEmpresaId().intValue() == ei.getEmpresa().getEmpresaId().intValue()){
|
||||
//Si el tipo de impresora es STOCK_CENTRAL
|
||||
if(ei.getTipoImpressora().intValue() == 6){
|
||||
txtNomImpressoara.setText(ei.getNombImpresora());
|
||||
txtNomeArquivoLayout.setText(ei.getNombArchivoLayout());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue