<!--  CONSIGNADOS		-->
<?php
	$dir = $_SERVER['DOCUMENT_ROOT']."/".substr(substr($_SERVER['REQUEST_URI'], 1), 0, strpos(substr($_SERVER['REQUEST_URI'], 1), '/'))."/phone_gap/";
	require_once($dir."/classes/Dados.class.php");
	require_once($dir."/dao/ConfigDAO.class.php");
	$dados = new Dados();
	
	$configdao = new ConfigDAO();
	$exibirData= $configdao->getDisponibilizar()->getData_rel_vendas();

	echo '<script src="consignados/consignados.js?ver='.$dados->getVersao().'"></script>';
?>
<div data-role="page" data-theme="b" data-control-title="Consignados" id="consignados" class="loading-show loading-hide mobipicker verifica-login">
	<div  data-role="header" data-position="fixed">
		<h3>
			Consignados
		</h3>
		<a href="#home" id="botaovoltarconsig" data-role="button" data-direction="reverse" data-transition="slide" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-back">
			Voltar
		</a>
	</div>
	<div data-role="content" class="conteudo">
		<div data-role="fieldcontain" data-controltype="dateinput">
			<label for="datainiconsig">
				De:
			</label>
			<input class="mobipick" id="datainiconsig" value='<?php echo date('2018-01-01'); ?>' type="text">
		</div>
		<div data-role="fieldcontain" data-controltype="dateinput">
			<label for="datafinconsignados">
				Até:
			</label>
			<input class="mobipick" id="datafinconsig" value='<?php echo date('Y-m-t'); ?>' type="text">
		</div>
		
		<div data-controltype="checkboinput" >
			<label for="apenasComSaldoConsig">
				 Apenas Produtos com Saldo
			</label>
			<input type="checkbox" id="apenasComSaldoConsig" checked="true">
		</div>
		
		<div data-controltype="checkboinput" >
			<label for="mostrarTipoConsig">
				 Mostrar Tipos
			</label>
			<input type="checkbox" id="mostrarTipoConsig">
		</div>
		
		<a id="botaofiltrar" data-role="button" data-transition="slide"  data-icon="arrow-r" data-iconpos="right" href="#filtrosConsig">
			Filtrar
		</a>
	
		<div data-role="fieldcontain" data-controltype="selectmenu">
			<label for="consigagrupar">Agrupar por:</label>

			<select id="consigagrupar" name="" >
				<option value="">Sem Agrupamento</option>
				<option value="Supervisor">Supervisor</option>
				<option value="Vendedor">Vendedor</option>
				<option value="Cliente" selected="selected">Cliente</option>
				<option value="Cidade">Cidade</option>
				<option value="Familia">Familia</option>
				<option value="Grupo">Grupo</option>
				<option value="Produto">Produto</option>
				<option value="Data">Data</option>
			</select>
		</div>
		
		<div data-role="fieldcontain" data-controltype="selectmenu">
			<label for="consigmostrarpor">Mostrar por:</label>

			<select id="consigmostrarpor" class="gambito" name="" >
				<option value="Supervisor">Supervisor</option>
				<option value="Vendedor">Vendedor</option>
				<option value="Cliente">Cliente</option>
				<option value="Cidade">Cidade</option>
				<option value="Familia">Familia</option>
				<option value="Marca">Marca</option>
				<option value="Grupo">Grupo</option>
				<option value="Subgrupo">Subgrupo</option>
				<option value="Produto" selected="selected">Produto</option>
			</select>
		</div>
		<div data-role="fieldcontain" data-controltype="selectmenu">
			<label for="consigordenar">Ordenar por:</label>

			<select id="consigordenar" name="" >
				<option value="CODIGO">Codigo</option>
				<option value="DESCRICAO" selected="selected">Descrição</option>
				<option value="TIPO">Tipo</option>
				<option value="SALDO_ANT">Saldo Ant.</option>
				<option value="SALDO_REMESSA">Saldo Remessa</option>
				<option value="SALDO_VENDA">Saldo Venda</option>
				<option value="SALDO_RETORNO">Saldo Retorno</option>
				<option value="SALDO_FINAL">Saldo Final</option>
				<option value="SALDO_ATUAL">Saldo Atual</option>
				<option value="SUM(VALTOTAL)">Valor Total</option>
			</select>
		</div>
		<a id="botaovisualizarconsig" data-role="button" data-transition="slide"  data-icon="arrow-r" data-iconpos="right" href="#relconsig">
			Visualizar
		</a>
	</div>
</div>

<!--	VISUALIZAR CONSIGNADOS	-->
<div data-role="page" data-theme="b" data-control-title="Home"  id="relconsig" class="loading-show verifica-login">
	<div  data-role="header" data-position="fixed" data-position="fixed">
		<h3 class="ui-title" role="heading" aria-level="1">
			Consignados
		</h3>
		<a href="#consignados" data-role="button" data-direction="reverse"  data-transition="slide" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-back" id="voltarrelconsig">
			Voltar
		</a>
	</div>
	<div data-role="content" id='divtabelaconsig' class="conteudo">
		<table data-role="table" id="tabelarelconsig" data-mode="columntoggle" class="ui-body-d ui-shadow table-stripe ui-responsive" data-column-btn-theme="b" data-column-btn-text="Colunas" data-column-popup-theme="b" style="text-align: center;">
			<thead>
			  <tr class="ui-bar-d">
				<th data-priority="1" style="text-align: left;">Codigo</th>
				<th id="colmostarporrelconsig" style="text-align: left;">Descrição</th>
				<th id="th_tipo_th" data-priority="2" class="ui-table-cell-hidden">Tipo</th>
				<th data-priority="3" class="ui-table-cell-hidden">Saldo Ant.</th>
				<th data-priority="4" class="ui-table-cell-hidden">Qtde Remessa</th>
				<th data-priority="5" class="ui-table-cell-hidden">Qtde Venda</th>
				<th data-priority="6" class="ui-table-cell-hidden">Qtde Retorno</th>
				<th data-priority="7" class="ui-table-cell-hidden">Saldo Final</th>
				<th data-priority="8">Saldo Atual</th>
				<th data-priority="9">Preço Unitário</th>
				<th data-priority="10">Valor Saldo</th>
				<th data-priority="11" class="ui-table-cell-hidden">Valor Total</th>
			  </tr>
			</thead>
			<tbody>

			</tbody>
		</table>
	</div>
</div>