<div class="row">
    <div class="pt-3 pb-1" id="breadcrumbs-wrapper">
        <!-- Search for small screen-->
        <div class="container">
            <div class="row">
                <div class="col s12 m6 l6">
                    <h5 class="breadcrumbs-title mt-0 mb-0"><span>Cliente</span></h5>
                </div>
                <div class="col s12 m6 l6 right-align-md">
                    <ol id="olRutaGrupoTarea" class="breadcrumbs mb-0">

                    </ol>
                </div>
            </div>
        </div>
    </div>
    <div class="col s12">
        <div class="container">
            <div class="section section-data-tables">
                <!-- DataTables example -->
                <div class="row">
                    <div class="col s12 m12 l12">
                        <div id="revenue-chart" class="card animate fadeUp">
                            <!--<div id="button-trigger" class="card card card-default scrollspy">-->
                            <div class="card-content">
                                <h4 class="card-title">Lista de clientes
                                    <a onclick="abrirModalNuevoCliente(1)" class="waves-effect waves-light btn gradient-45deg-light-blue-cyan right">Nuevo cliente</a>
                                </h4>                                
                                <!--Le da sobras al boton -> gradient-shadow-->
                                <br>
                                <div class="row">
                                    <div class="col s12">
                                        <table id="page-length-option" class="display" style="width:100%">
                                            <thead>
                                                <tr>
                                                    <th width = 15%>Código</th>
                                                    <th width = 15%>Tipo cliente</th>
                                                    <th width = 25%>Cliente</th>
                                                    <th width = 15%>Tipo doc.</th>
                                                    <th width = 10%>Nro. doc</th>
                                                    <th width = 10%>Activo</th>
                                                    <th width = 10%>Acciones</th>
                                                </tr>
                                            </thead>
                                            <tbody id="cuerpoTablaCliente">

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

<div id="modalCliente" class="modal modal-fixed-footer">
    <div class="modal-content">
        <h5 id="tituloModal"></h5>
        <br>
        <form class="formValidate" id="formValidate">
            <div class="row">
                <div class="input-field col m4 s12">
                    <select id="cboTipoCliente" name="cboTipoCliente" onchange="verificarTipoCliente()" data-error=".errorTxt1" required>
                    </select>
                    <label>Tipo de cliente</label>
                    <small class="errorTxt1"></small>
                </div>
                <div class="input-field col m8 s12 classEmpresa">
                    <label for="txtRazonSocial">Razón social</label>
                    <input id="txtRazonSocial" name="txtRazonSocial" type="text" data-error=".errorTxt2">
                    <small class="errorTxt2"></small>                  
                </div>
                <div class="input-field col m8 s12 classPersona" style="display: none;">
                    <label for="txtNombre">Nombre</label>
                    <input id="txtNombre" name="txtNombre" type="text" data-error=".errorTxt3">
                    <small class="errorTxt3"></small>
                </div>
            </div>
            <div class="row classPersona" style="display: none;">
                <div class="input-field col m6 s12">
                    <label for="txtApePaterno">Apellido paterno</label>
                    <input id="txtApePaterno" name="txtApePaterno" type="text" data-error=".errorTxt4">
                    <small class="errorTxt4"></small>
                </div>
                <div class="input-field col m6 s12">
                    <label for="txtApeMaterno">Apellido materno</label>
                    <input id="txtApeMaterno" name="txtApeMaterno" type="text" data-error=".errorTxt5">
                    <small class="errorTxt5"></small>
                </div>
            </div>
            <div class="row">
                <div class="input-field col m6 s12">
                    <select id="cboTipoDocumento" name="cboTipoDocumento" data-error=".errorTxt6" required>
                    </select>
                    <label>Tipo de documento</label>
                    <small class="errorTxt6"></small>
                </div>
                <div class="input-field col m6 s12">
                    <label for="txtNroDocumento">Nro. de documento</label>
                    <input id="txtNroDocumento" name="txtNroDocumento" type="text" data-error=".errorTxt7">
                    <small class="errorTxt7"></small>
                </div>
            </div>
            <div class="row">
                <div class="input-field col m6 s12">
                    <label for="txtDireccion">Dirección</label>
                    <input id="txtDireccion" name="txtDireccion" type="text" data-error=".errorTxt8">
                    <small class="errorTxt8"></small>
                </div>
                <div class="input-field col m6 s12">
                    <label for="txtReferencia">Referencia</label>
                    <input id="txtReferencia" name="txtReferencia" type="text" data-error=".errorTxt9">
                    <small class="errorTxt9"></small>
                </div>
            </div>
            <div class="row">
                <div class="input-field col m6 s12">
                    <label for="txtEmail">Email</label>
                    <input id="txtEmail" name="txtEmail" type="text" data-error=".errorTxt10">
                    <small class="errorTxt10"></small>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <a class="mb-6 btn waves-effect waves-light light-blue darken-2" id="btnRegistrarCliente" onclick="registrarCliente()">Guardar</a>
        <a class="modal-action modal-close mb-6 btn waves-effect waves-light red accent-2">Cancelar</a>
    </div>
</div>
<script src="view/js/Mantenedores/despachadorCliente.js"></script>  