<?php
require_once 'header.php';
require_once 'erpc_unidades_toolbar.php';
require_once 'connect.php';
?>

<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
  <li role="presentation" class="active"><a href="#form1" aria-controls="form1" role="tab" data-toggle="tab">Dados Cadastrais</a></li>
  <!--
  <li role="presentation"><a href="#form2" aria-controls="form2" role="tab" data-toggle="tab">Form #2</a></li>
  <li role="presentation"><a href="#form3" aria-controls="form3" role="tab" data-toggle="tab">Form #3</a></li>
  <li role="presentation"><a href="#form4" aria-controls="form4" role="tab" data-toggle="tab">Form #4</a></li>
  -->
</ul>

<!-- Tab panes -->
<div class="tab-content">
  <div role="tabpanel" class="tab-pane fade in active" id="form1">
<form id=validate_custom method=POST action="erpc_unidades_list.php">
  <div class=block>
    <div class=header>
      <h2>Parametros para consulta de Unidades:</h2>
      <div class="side pull-right"> <button class="btn btn-default btn-clean" onClick="clear_form('#validate_custom');" type=button>Clear form</button>          </div>
    </div>

    <div class="content controls">
  	<div class=form-row>
          <div class=col-md-2>ID:</div>
          <div class=col-md-6><input type=number name="id" value="" class="form-control" /> </div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Razão Social</label></div>
          <div class="col-md-10"><input type=text name="ds_razao_social" id="ds_razao_social"  maxlength="100"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Nome Fantasia</label></div>
          <div class="col-md-6"><input type=text name="ds_fantasia" id="ds_fantasia"  maxlength="40"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>CNPJ</label></div>
          <div class="col-md-4"><input name="ds_cnpj" id="ds_cnpj" class="mask_cnpj"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Insc. Estadual</label></div>
          <div class="col-md-3"><input type=number name="ds_ie" id="ds_ie"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>CNAE Fiscal</label></div>
          <div class="col-md-1"><input type=number name="ds_cnae_fiscal" id="ds_cnae_fiscal"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Insc. Municipal</label></div>
          <div class="col-md-3"><input type=number name="ds_im" id="ds_im"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Insc. Estadual Subst.Trib.</label></div>
          <div class="col-md-3"><input type=number name="ds_iest" id="ds_iest"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Regime Tributário</label></div>
          <div class="col-md-2">
                  <select name="id_regime" id="id_regime">
                    <option value="F">F - Fisico</option>
                    <option value="J">J - Juridico</option>
                    <option value="X">X - Outros</option>
                  </select>
          </div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>CEP</label></div>
          <div class="col-md-2">
            <div class="input-group">
            <input type=text name="ds_cep" id="ds_cep" maxlenght="8" size="4" class="mask_cep">
            <div class="input-group-addon">
              <a href="helper-cep.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="#ds_cep" data-description="#ds_endereco" data-title="Selecione:">
              <span class="fa fa-search"></span></a>
            </div>
          </div>
          </div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Endereço</label></div>
          <div class="col-md-10"><input type=text name="ds_endereco" id="ds_endereco"  maxlength="100"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Número</label></div>
          <div class="col-md-2"><input type=text name="ds_numero" id="ds_numero"  maxlength="10"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Complemento</label></div>
          <div class="col-md-6"><input name="ds_complemento" id="ds_complemento" maxlength="100"/></div>
        </div>

        <div class="form-row">
          <div class="col-md-2"><label>Bairro</label></div>
          <div class="col-md-2"><input type=text name="ds_bairro" id="ds_bairro" class="validate[required] form-control" maxlength="60"/></div>

          <div class="col-md-1">&nbsp;</div>
          <div class="col-md-2"><label>Município</label></div>
          <div class="col-md-2">
            <div class="input-group">
              <input type=number name="id_municipio" id="id_municipio" maxlenght="10" size="4">
                <div class="col-md-2">
                <a href="helper-id-municipio.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-parameter="" data-value="#id_municipio" data-description="#ds_municipio" data-title="Selecione:">
                <span class="fa fa-search"></span></a>
              </div>
            </div>
          </div>
          <div class="col-md-4"><input name="ds_municipio" id="ds_municipio"></div>
        </div>

        <div class="row clear">&nbsp;</div>
        <div class="form-row">
        <div class="col-md-2"><label>UF</label></div>
        <div class="col-md-2">
          <div class="input-group"><input type=text name="ds_uf" id="ds_uf" class="validate[required] form-control" maxlength="2"/>
          <div class="input-group-addon">
            <a href="helper-descricao-uf.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="#ds_uf" data-description="#ds_estado" data-title="Selecione:">
            <span class="fa fa-search"></span></a>
            </div>
          </div>
          </div>
        <div class="col-md-2"><input name="ds_estado" id="ds_estado"></div>

        <div class="col-md-2"><label>Código País</label></div>
        <div class="col-md-2"><input type=number name="id_pais" id="id_pais"  min="0" max="9999"/></div>
        </div>

    </div>
    <div class=footer>
      <div class="side pull-right">
        <div class=btn-group>
		        <button class="btn btn-default" type="button" onClick="window.history.go(-1)" value="Voltar">Voltar</button>
            <button class="btn btn-success" type="submit" value="pesquisar" name="pesquisar">pesquisar</button>
		        </div>
      </div>
    </div>
  </div>
</form>

  </div>

</div>


  <?php
include 'footer.php';
?>
