<?php
include 'header.php';
include 'erpc_excecao_fiscal_toolbar.php';
include_once 'connect.php';
?>
<head>
<script type="text/javascript" src="js/js.js"></script>
</head>

<!-- 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">Impostos</a></li>
</ul>

<form id=validate_custom method=POST action="erpc_excecao_fiscal_ws.php">
<!-- Tab panes -->
<div class="tab-content">
  <div role="tabpanel" class="tab-pane fade in active" id="form1">
  <div class=block>
    <div class=header>
      <h2>Incluir Exceção Fiscal</h2>
    </div>

    <div class="content controls">
      <div class="form-row">
        <div class="col-md-2"><label>Grupo de Tributação</label></div>
        <div class="col-md-2">
            <div class="input-group">
            <input name="id_grupo_tributacao" id="id_grupo_tributacao" class="validate[required] form-control" value=""/>
            <div class="input-group-addon">
              <a href="erpc_grupo_tributacao_helper.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="#id_grupo_tributacao" data-description="#ds_grupo" data-title="Selecione:">
              <span class="fa fa-search"></span></a>
            </div>
            </div>
        </div>
            <div class="col-md-4"><input name="ds_grupo" id="ds_grupo" readonly/></div>
      </div>

	  <!--
     <div class="form-row">
       <div class="col-md-2"><label>Estado</label></div>
       <div class="col-md-2">
           <div class="input-group">
           <input name="ds_uf" id="ds_uf" class="validate[required] form-control" value=""/>
           <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-4"><input name="ds_estado" id="ds_estado" readonly/></div>
     </div>
	 -->

     <div class=form-row>
       <div class="col-md-2"><label>Tipo de Cliente</label></div>
       <div class="col-md-2">
           <div class="input-group">
           <input name="id_tipo" id="id_tipo" class="validate[required] form-control" value=""/>
           <div class="input-group-addon">
             <a href="erpc_dom_tipo_cliente_helper.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="#id_tipo" data-description="#ds_tipo" data-title="Selecione:">
             <span class="fa fa-search"></span></a>
           </div>
           </div>
       </div>
           <div class="col-md-4"><input name="ds_tipo" id="ds_tipo" readonly/></div>
    </div>


    <div class=form-row>
      <div class="col-md-2"><label>Cliente/Fornecedor</label></div>
      <div class="col-md-2">
          <div class="input-group">
          <input name="id_grupo_clifor" id="id_grupo_clifor" class="form-control" value=""/>
          <div class="input-group-addon">
            <a href="erpc_grupo_clifor_helper.php" class='input-helper' data-remote="false" data-toggle="modal" data-target="#helper-modal-div" data-value="#id_grupo_clifor" data-description="#ds_grupo_clifor" data-title="Selecione:">
            <span class="fa fa-search"></span></a>
          </div>
          </div>
      </div>
          <div class="col-md-4"><input name="ds_grupo_clifor" id="ds_grupo_clifor" readonly/></div>
    </div>

  </div> <!-- content -->
  </div> <!-- block -->
  </div> <!-- fim da primeira tab -->

  <div role="tabpanel" class="tab-pane" id="form2">
    <div class=block>
    <div class="content controls">
    <div class=form-row>
        <div class="col-md-2">
          <label>Alíquota Interna</label>
          <input type=number name="nr_aliq_interna" id="nr_aliq_interna" class="validate[required]" min="0" max="99.99" step="0.01"/></div>

        <div class="col-md-2">
          <label>Alíquota Externa</label>
          <input type=number name="nr_aliq_externa" id="nr_aliq_externa" class="validate[required]" min="0" max="99.99" step="0.01"/></div>

        <div class="col-md-2">
            <label>Alíquota ICMS Destino</label>
            <input type=number name="nr_aliq_icms_dest" id="nr_aliq_icms_dest" min="0" max="99.99" step="0.01"/></div>

         <div class="col-md-2">
            <label>Mva</label>
            <input type=number name="nr_mva" id="nr_mva" value="<?echo $nr_mva?>" min="0" step="0.01"/></div>
     </div>

     <div class=form-row>
       <div class="col-md-2">
         <label>IPI Pauta</label>
         <input type=number name="nr_ipi_pauta" id="nr_ipi_pauta"/></div>

       <div class="col-md-2">
         <label>PIS Pauta</label>
         <input type=number name="nr_pis_pauta" id="nr_pis_pauta"/></div>

       <div class="col-md-2">
         <label>COFINS Pauta</label>
         <input type=number name="nr_cofins_pauta" id="nr_cofins_pauta"/></div>
     </div>

     <div class=form-row>
         <div class="col-md-2">
           <label>Alíquota IPI</label>
           <input type=number name="nr_ipi_aliq" id="nr_ipi_aliq" min="0" step="0.01"/></div>

         <div class="col-md-2">
           <label>Alíquota PIS</label>
           <input type=number name="nr_pis_aliq" id="nr_pis_aliq" min="0" step="0.01"/></div>

         <div class="col-md-2">
           <label>Alíquota Cofins</label>
           <input type=number name="nr_cofins_aliq" id="nr_cofins_aliq" min="0" step="0.01"/></div>
      </div>

    <div class="form-row">
      <div class="col-md-2">
        <label>Valor Red.PIS</label>
        <input type=number name="nr_reducao_pis" id="nr_reducao_pis"/></div>

      <div class="col-md-2">
        <label>Valor Red. COFINS.</label>
        <input type=number name="nr_reducao_cofins" id="nr_reducao_cofins"/></div>

	  <!--
      <div class="col-md-2">
        <label>UF Busca</label>
        <select name="ds_uf_busca" id="ds_uf_busca" class="validate[required]">
          <option value=""/></option>
          <option value="origem" />origem</option>
          <option value="destino"/>destino</option>
        </select></div>
		-->
		
    </div>

    </div>
  </div>
</div>
</div>

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

<!-- modal do helper -->
<div class="row-clear">&nbsp;</div>
<div class="modal modal-white modal-draggable fade" id="helper-modal-div" tabindex="-1" role="dialog" aria-labelledby="helper-modal-label" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="helper-modal-label">Helper</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" id="modalCancel">Cancelar</button>
        <button type="button" class="btn btn-primary" data-dismiss="modal" id="modalOk" disabled="disabled">Selecionar</button>
      </div>
    </div>
  </div>
</div>


<?php include 'footer.php';?>
<script type="text/javascript" src="js/acme.js"></script>
<script type="text/javascript" src="js/js.js"></script>
