<?php echo csrf_field(); ?>

<form id='form-proveedor'>
  <div class="row">
    <div class="col-12 col-sm-8">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder" for="nombre">* Nombre de la empresa:</label>
        <input type="text" class="form-control form-control-sm" id="nombre" name="nombre" required="required" value="{{ $proveedor->nombre }}">
      </div>
    </div>
    <div class="col-12 col-sm-4">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* R.F.C.:</label>
        <input type="text" class="form-control form-control-sm" id="rfc" name="rfc" required="required" value="{{ $proveedor->rfc }}">
      </div>
    </div>
  </div>
  
  <div class="row">
    
    <div class="col-12 col-sm-8">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Nombre del Propietario o Representante Legal:</label>
        <input type="text" class="form-control form-control-sm" id="representante" name="representante" required="required" value="{{ $proveedor->representante_legal }}">
      </div>
    </div>
    <div class="col-12 col-sm-4">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">Tipo de persona:</label><br>
        <div class="custom-control custom-radio custom-control-inline">
				  <input type="radio" id="fisica" name="tipo_persona" class="custom-control-input" value="F" @if ($proveedor->tipo_persona=='F') checked="checked" @endif >
				  <label class="custom-control-label" for="fisica">Física</label>
				</div>
				<div class="custom-control custom-radio custom-control-inline">
				  <input type="radio" id="moral" name="tipo_persona" class="custom-control-input" value="M" @if ($proveedor->tipo_persona=='M') checked="checked" @endif>
				  <label class="custom-control-label" for="moral">Moral</label>
				</div>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Actividades Comerciales:</label>
        <textarea class="form-control form-control-sm" id="actividades" name="actividades" required="required" >{{ $proveedor->actividades_comerciales }}</textarea>
      </div>
    </div>
  </div>

  <h2>Domicilio</h2>

  <div class="row mt-3">
    <div class="col-12 col-sm-6">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Calle:</label>
        <input type="text" class="form-control form-control-sm" id="calle" name="calle" required="required" value="{{ $proveedor->calle }}">
      </div>
    </div>
    <div class="col-12 col-sm-3">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Número:</label>
        <input type="text" class="form-control form-control-sm" id="numero" name="numero" required="required" value="{{ $proveedor->numero }}">
      </div>
    </div>
    <div class="col-12 col-sm-3">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">Colonia:</label>
        <input type="text" class="form-control form-control-sm" id="colonia" name="colonia" value="{{ $proveedor->colonia }}">
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-12 col-sm-3">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">Código Postal:</label>
        <input type="text" class="form-control form-control-sm" id="codigo_postal" name="codigo_postal" value="{{ $proveedor->codigo_postal }}">
      </div>
    </div>
    <div class="col-12 col-sm-3">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Ciudad:</label>
        <input type="text" class="form-control form-control-sm" id="ciudad" name="ciudad" required="required" value="{{ $proveedor->ciudad }}">
      </div>
    </div>
    <div class="col-12 col-sm-3">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">Estado:</label>
        <input type="text" class="form-control form-control-sm" id="estado" name="estado" value="{{ $proveedor->estado }}">
      </div>
    </div>
    <div class="col-12 col-sm-3">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">País:</label>
        <input type="text" class="form-control form-control-sm" id="pais" name="pais" value="{{ $proveedor->pais }}">
      </div>
    </div>
  </div>

	<h2>Contacto</h2>

  <div class="row mt-3">
    <div class="col-12 col-sm-4">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">Teléfono:</label>
        <input type="text" class="form-control form-control-sm" id="telefono_1" name="telefono_1" placeholder="* Telefono 1" required="required" value="{{ $proveedor->telefono_1 }}">
      </div>
    </div>
    <div class="col-12 col-sm-4">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">&nbsp;</label>
        <input type="text" class="form-control form-control-sm" id="telefono_2" name="telefono_2" placeholder="Telefono 2" value="{{ $proveedor->telefono_2 }}">
      </div>
    </div>
    <div class="col-12 col-sm-4">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">&nbsp;</label>
        <input type="text" class="form-control form-control-sm" id="telefono_3" name="telefono_3" placeholder="Telefono 3" value="{{ $proveedor->telefono_3 }}">
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-12 col-sm-6">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Correo electrónico:</label>
        <input type="text" class="form-control form-control-sm" id="correo" name="correo" required="" value="{{ $proveedor->correo }}">
      </div>
    </div>
    <div class="col-12 col-sm-6">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">Página Web:</label>
        <input type="text" class="form-control form-control-sm" id="pagina_web" name="pagina_web" value="{{ $proveedor->pagina_web }}">
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-12 col-sm-12">
      <div class="form-group">
        <label class="col-form-label font-weight-bolder">* Los campos son requeridos.</label>
        <input type="hidden" id="id" name="id" value="{{ $proveedor->id }}">
      </div>
    </div>
  </div>
      
</form>

<div class="row mt-5">
  <div class="col-md-3 col-sm-12"></div>
  <div class="col-md-6 col-sm-12">
    <div class="row" id="div_boton">
      <div class="col">
        <button type="button" onclick="javascript:proveedor_validar('UPDATE');" class="btn btn-outline-success btn-block"><i class="fa fa-save"></i> Actualizar</button>
      </div>
      <div class="col">
        <button type="button" onclick='javascript:proveedor_regresar()' class="btn btn-outline-dark btn-block"><i class="fa fa-times"></i> Regresar</button>
      </div>
    </div>
  </div>
  <div class="col-md-3 col-sm-12"></div>
</div>




