<?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="winBusquedaVoucher"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>

<zk xmlns="http://www.zkoss.org/2005/zul">
	<window id="winBusquedaVoucher" border="normal"
		apply="${busquedaVoucherController}" 
		height="500px" width="1000px" contentStyle="overflow:auto" sizable="true"
		title="${c:l('editarVoucherController.window.title')}" > 
		
		<toolbar>
			<hbox spacing="5px" style="padding:1px" align="right">
				<button id="btnRefresh" image="/gui/img/refresh.png"
					width="35px"
					tooltiptext="${c:l('tooltiptext.btnActualizar')}" />
				<separator orient="vertical" />
				<button id="btnCerrar"
					onClick="winBusquedaVoucher.detach()" image="/gui/img/exit.png"
					width="35px"
					tooltiptext="${c:l('tooltiptext.btnFechar')}" />
			</hbox>			
		</toolbar>

		<grid fixedLayout="true">
			<columns>
				<column width="15%" />
				<column width="35%" />
				<column width="15%" />
				<column width="35%" />
			</columns>
			<rows>
				<row>
					<label value="${c:l('label.numVoucher')}" />
					<longbox id="txtNumVoucher" constraint="no negative" maxlength="15" width="100px" />
				
					<label value="${c:l('label.numContrato')}" />
					<textbox id="txtNumContrato" constraint="no negative" maxlength="15" width="100px" />
				</row>
				<row>
					<label value="${c:l('label.nit')}" />
					<textbox id="txtNit" maxlength="20" width="150px" />
					
					<label value="${c:l('label.razaoSocial')}" />
					<textbox id="txtNome" maxlength="150" width="95%"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />				
				</row>
				<row>
					<label id="lbDataInicial" value="${c:l('label.dataInicial')}" />
					<datebox id="datInicial" width="100px"
						format="dd/MM/yyyy" maxlength="10" />
				
					<label id="lbDataFinal" value="${c:l('label.dataFinal')}" />
					<datebox id="datFinal" width="100px"
						format="dd/MM/yyyy" maxlength="10" />
				</row>				
				<row>
					<label value="${c:l('label.origem')}" />
					<combobox id="cmbOrigem" width="95%" 
						autodrop="false" mold="rounded" buttonVisible="true"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
				
					<label value="${c:l('label.destino')}" />
					<combobox id="cmbDestino" width="95%" 
						autodrop="false" mold="rounded" buttonVisible="true"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
				</row>								
				<row spans="1,4" height="10px">
					<label value="${c:l('label.situacao')}" />
					<hbox>						
						<checkbox id="chkEmitido"    value="0" label="${c:l('label.situacaoVoucher.emitido')}"    style="padding: 60px;" />
						<checkbox id="chkLegalizado" value="1" label="${c:l('label.situacaoVoucher.legalizado')}" style="padding: 60px;" />
						<checkbox id="chkFaturado"   value="2" label="${c:l('label.situacaoVoucher.faturado')}"   style="padding: 60px;" />					
						<checkbox id="chkCancelado"  value="3" label="${c:l('label.situacaoVoucher.cancelado')}"  style="padding: 60px;" />
					</hbox>
				</row>
			</rows>
		</grid>

		<toolbar>
			<button id="btnPesquisa" image="/gui/img/find.png"
				label="${c:l('label.btnPesquisar')}" />
		</toolbar>

		<paging id="pagingVoucher" pageSize="20" />
		<listbox id="voucherList"
			use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
			multiple="false">
			<listhead sizable="true">
				<listheader id="lhNumVoucher" image="/gui/img/create_doc.gif"					
					label="${c:l('label.numVoucher')}" width="110px"
					sort="auto(voucherId)" />
				<listheader id="lhNumContrato" image="/gui/img/create_doc.gif"					
					label="${c:l('label.numContrato')}" width="110px"
					sort="auto(numContrato)" />
				<listheader id="lhSituacao" image="/gui/img/create_doc.gif"
					label="${c:l('label.situacao')}" width="90px"
					sort="auto(status)" />	
				<listheader id="lhValidade" image="/gui/img/create_doc.gif"					
					label="${c:l('label.dataValidade')}" width="100px;" 
					sort="auto(dataValidade)" />
				<listheader id="lhValor" image="/gui/img/create_doc.gif"					
					label="${c:l('label.valorLicitado')}"
					sort="auto(valorLicitado)" />
				<listheader id="lhValorLegal" image="/gui/img/create_doc.gif"					
					label="${c:l('label.valorLegalizado')}"
					sort="auto(valorLegalizado)" />
				<listheader id="lhOrigem" image="/gui/img/create_doc.gif"					
					label="${c:l('label.origem')}"
					sort="auto(origenId)" />
				<listheader id="lhDestino" image="/gui/img/create_doc.gif"					
					label="${c:l('label.destino')}"
					sort="auto(destinoId)" />							
			</listhead>
		</listbox>
	</window>
</zk>