fixes bug#11058
dev:lucas qua:gleimar git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@81584 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f5982a7f47
commit
15ffe79da2
|
@ -14,6 +14,7 @@ import org.zkoss.util.resource.Labels;
|
|||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
|
@ -43,10 +44,9 @@ public class BusquedaIntegracaoTotvsController extends MyGenericForwardComposer
|
|||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(BusquedaIntegracaoTotvsController.class);
|
||||
private List<Empresa> lsEmpresas;
|
||||
private MyComboboxEmpresa cmbEmpresa;
|
||||
private MyComboboxEmpresa cmbEmpresaServico;
|
||||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||
private List<PuntoVenta> lsPuntoVenta;
|
||||
private Combobox cmbEmpresa;
|
||||
private Combobox cmbEmpresaServico;
|
||||
private Combobox cmbPuntoVenta;
|
||||
private Datebox fecInicioIntervalo;
|
||||
private Datebox fecFinIntervalo;
|
||||
private Datebox fecInicioCorrida;
|
||||
|
@ -106,7 +106,7 @@ public class BusquedaIntegracaoTotvsController extends MyGenericForwardComposer
|
|||
dataDe = new Date();
|
||||
dataAte = new Date();
|
||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsPuntoVenta = new ArrayList<PuntoVenta>();
|
||||
|
||||
cajaList.setItemRenderer(new RenderCajaTotvs());
|
||||
cajaList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
|
@ -132,29 +132,12 @@ public class BusquedaIntegracaoTotvsController extends MyGenericForwardComposer
|
|||
this.lsEmpresas = lsEmpresas;
|
||||
}
|
||||
|
||||
public MyComboboxPuntoVenta getCmbPuntoVenta() {
|
||||
return cmbPuntoVenta;
|
||||
}
|
||||
|
||||
public void setCmbPuntoVenta(MyComboboxPuntoVenta cmbPuntoVenta) {
|
||||
this.cmbPuntoVenta = cmbPuntoVenta;
|
||||
}
|
||||
|
||||
public MyComboboxEmpresa getCmbEmpresa() {
|
||||
return cmbEmpresa;
|
||||
}
|
||||
|
||||
public void setCmbEmpresa(MyComboboxEmpresa cmbEmpresa) {
|
||||
this.cmbEmpresa = cmbEmpresa;
|
||||
}
|
||||
|
||||
public List<PuntoVenta> getLsPuntoVenta() {
|
||||
return lsPuntoVenta;
|
||||
}
|
||||
|
||||
public void setLsPuntoVenta(List<PuntoVenta> lsPuntoVenta) {
|
||||
this.lsPuntoVenta = lsPuntoVenta;
|
||||
}
|
||||
|
||||
private void refreshLista() {
|
||||
HibernateSearchObject<Caja> cajaBusqueda = new HibernateSearchObject<Caja>(Caja.class, pagingCaja.getPageSize());
|
||||
|
@ -176,11 +159,18 @@ public class BusquedaIntegracaoTotvsController extends MyGenericForwardComposer
|
|||
cajaBusqueda.addFilterEqual("puntoventaId", puntoVenta.getPuntoventaId());
|
||||
}
|
||||
}
|
||||
Date valueFecInicio = fecInicioIntervalo.getValue();
|
||||
Date valueFecFin = fecFinIntervalo.getValue();
|
||||
|
||||
valueFecInicio = valueFecInicio==null?new Date():valueFecInicio;
|
||||
valueFecFin = valueFecFin==null?new Date():valueFecFin;
|
||||
|
||||
valueFecInicio = DateUtil.inicioFecha(valueFecInicio);
|
||||
valueFecFin = DateUtil.fimFecha(valueFecFin);
|
||||
|
||||
// Filtro data
|
||||
Date dataInicio = fecInicioIntervalo.getValue() != null ? DateUtil.inicioFecha(fecInicioIntervalo.getValue()) : null;
|
||||
Date dataFim = fecFinIntervalo.getValue() != null ? DateUtil.fimFecha(fecFinIntervalo.getValue()) : null;
|
||||
cajaBusqueda.addFilterGreaterOrEqual("fechorventa", dataInicio);
|
||||
cajaBusqueda.addFilterLessOrEqual("fechorventa", dataFim);
|
||||
cajaBusqueda.addFilterGreaterOrEqual("fechorventa", valueFecInicio);
|
||||
cajaBusqueda.addFilterLessOrEqual("fechorventa", valueFecFin);
|
||||
plwCaja.init(cajaBusqueda, cajaList, pagingCaja);
|
||||
if (cajaList.getData().length == 0) {
|
||||
try {
|
||||
|
|
|
@ -44,15 +44,17 @@
|
|||
<label
|
||||
value="${c:l('integracaoTotvsController.cmbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa" mold="rounded" buttonVisible="true" width="40%"
|
||||
model="@{winIntegracaoTotvs$composer.lsEmpresas}"/>
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="60%"
|
||||
model="@{winIntegracaoTotvs$composer.lsEmpresas}"
|
||||
/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('integracaoTotvsController.lbPuntoVenta.value')}" />
|
||||
<combobox id="cmbPuntoVenta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
mold="rounded" buttonVisible="true" width="90%" model="@{winIntegracaoTotvs$composer.lsPuntoVenta}" />
|
||||
mold="rounded" buttonVisible="true" width="60%"/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
|
@ -130,7 +132,8 @@
|
|||
<label
|
||||
value="${c:l('integracaoTotvsController.cmbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresaServico"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa" mold="rounded" buttonVisible="true" width="40%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="40%"
|
||||
model="@{winIntegracaoTotvs$composer.lsEmpresas}"/>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -166,7 +169,8 @@
|
|||
<label
|
||||
value="${c:l('integracaoTotvsController.cmbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresaCorrida"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa" mold="rounded" buttonVisible="true" width="40%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="40%"
|
||||
model="@{winIntegracaoTotvs$composer.lsEmpresas}"/>
|
||||
</row>
|
||||
<row>
|
||||
|
|
Loading…
Reference in New Issue