<?php
//activamos almacenamiento en el buffer
//ob_start();
//session_start();
if (!isset($_SESSION['nombre'])) {
  header("Location: login.html");
}else{
  if ($_SESSION['ventas']==1) {
  ?>
      <!-- Main content -->
      <section class="content">
        <!-- Default box -->
        <div class="row">
          <div class="col-md-12">
            <div class="box">
              <div class="box-header with-border">
                <button class="btn bg-green btn-app" onclick="mostrarform(true)" id="btnagregar"><i class="fa fa-plus-circle"></i> Agregar</button></h1>
                <div class="box-tools pull-right">
                  <h1 class="box-title">Pedido\Sastrería
                </div>
              </div>
              <!--box-header-->
              <!--centro-->
              <div class="panel-body table-responsive" id="listadoregistros">
                <table id="tbllistado" class="table table-striped table-bordered table-condensed table-hover">
                  <thead>
                    <th>Opciones</th>
                    <th>Fecha</th>
                    <th>Cliente</th>
                    <th>Articulo</th>
                    <th>Usuario</th>
                    <th>Número</th>
                    <th>Unidades</th>
                    <th>Monto $</th>
                    <th>Estado</th>
                  </thead>
                  <tbody>
                  </tbody>
                  <tfoot>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                  </tfoot>   
                </table>
              </div>
              <div class="panel-body" style="height: 400px;" id="formularioregistros">
                <form action="" name="formulario" id="formulario" method="POST">
                  <input class="form-control" type="hidden" name="idordenproduccioncamiseria" id="idordenproduccioncamiseria">
                  <input class="form-control" type="hidden" name="idtransportista" id="idtransportista" value="1">
                  <input class="form-control" type="hidden" name="idempresa_venta" id="idempresa_venta" value="<?php echo $_SESSION['idempresa_venta_empresa'] ?>" >
                  <input class="form-control" type="hidden" name="serie_comprobante" id="serie_comprobante" value="N/A">
                  <input class="form-control" type="hidden" name="num_comprobante" id="num_comprobante" value="N/A">
                  <input class="form-control" type="hidden" name="idclientedespacho" id="idclientedespacho" value="0">
                  <input class="form-control" type="hidden" name="idvendedor" id="idvendedor" value="1">
                  <input class="form-control" type="hidden" name="impuesto" id="impuesto" value=<?php echo $_SESSION['iva_empresa'] ?>>
                  <input class="form-control" type="hidden" name="tipo_comprobante" id="tipo_comprobante" value="ordenproduccionsastreria">
                  <!-- <input class="form-control" type="hidden" name="idcliente" id="idcliente"> -->
                  <input class="form-control" type="hidden" name="validar" id="validar">
                  <input class="form-control" type="hidden" name="validado" id="validado">
                  <input class="form-control" type="hidden" name="tasa_dollar" id="tasa_dollar">
                  <input class="form-control" type="hidden" name="tasa_euro" id="tasa_euro">
                  <input class="form-control" type="hidden" name="idempresa_venta" id="idempresa_venta" value="<?php echo $_SESSION['idempresa_venta_empresa'] ?>" >
                  <input class="form-control" type="hidden" name="impuestoart18_empresa" id="impuestoart18_empresa" value="<?php echo $_SESSION['impuestoart18_empresa'] ?>" >
                  <!-- <input class="form-control" type="hidden" name="num_documento" id="num_documento">
                  <input class="form-control" type="hidden" name="tipo_documento" id="tipo_documento"> -->
                  
                  <div class="col-md-12">
                    <!-- Horizontal Form -->
                    <div class="box box-primary">
                      <!-- <div class="box-header with-border">
                        <h3 class="box-title">General</h3>
                      </div> -->
                      <!-- /.box-header -->
                      <div class="box-body">
                       
                        <div class="row">
                        
                          <table class="table table-striped">
                            <tr>
                              <td colspan="3" style="text-align:center;width:300px" align="center">Cliente</td>
                              <td colspan="2" style="text-align:center;width:250px" align="center">Producto</td>
                              <td colspan="2" align="center">Fecha</td>
                              <td align="center">Orden</td>
                            </tr>
                            <tr>
                              <td style="text-align:center;width:200px" style="text-align:center" class="form-group">
                                <div style="text-align:center;width:350px" >
                                  <select  name="idcliente" id="idcliente" class="form-control selectpicker" data-live-search="true" required></select>
                                </div>
                              </td>
                              <td style="text-align:center" class="form-group">
                                <select class="form-control select-picker" name="tipo_documento" id="tipo_documento" placeholder="Tipo Documento" required>
                                  <option value="RIF">RIF</option>
                                  <option value="CEDULA">CÉDULA</option>
                                </select>
                              </td> 
                              <td style="text-align:center" class="form-group"><input class="form-control" type="text" name="num_documento" id="num_documento" maxlength="20" placeholder="Razón Social/Cédula" required></td>
                              
                              
                              <td colspan="2" style="text-align:center" class="form-group">
                                <input type="hidden" name="idcamiseria" id="idcamiseria" class="form-control" ></input>
                                <input style="text-align:center" type="text" name="camiseria" id="camiseria" class="form-control" readonly></input>
                              </td>
                              
                              <td colspan="2" style="text-align:center" class="form-group"><input style="text-align:center" class="form-control" type="date" name="fecha_hora" id="fecha_hora" required></td>
                              <td colspan="2" style="text-align:center" class="form-group"><input style="text-align:center;width:160px" class="form-control" type="text" name="num_ordenproduccioncamiseria" id="num_ordenproduccioncamiseria" maxlength="20" placeholder="Número ordenproduccioncamiseria" readonly></td>
                            </tr>
                            <tr>
                              <td colspan="2" align="center">Iniciales</td>
                             <!--  <td align="center">Cm</td> -->

                             <!-- <td colspan="4" align="center">Precio</td>-->
                              <td colspan="2" align="center">Unidades</td> 
                              
                              <td colspan="4" align="center">Total</td>
                            </tr>
                            
                            <tr>
                              <td colspan="2" style="text-align:center" class="form-group"><input style="text-align:center" class="form-control" type="text" name="inicialesc" id="inicialesc" value=""></td>
                              <!-- <td style="text-align:center"><input style="text-align:center" class="form-control" type="text" name="cmc" id="cmc" value="0"></td> -->

                             <!--  <td colspan="3" style="text-align:center" class="form-group">
                              <input style="text-align:center" class="form-control" type="text" name="precioc" id="precioc" value="0" readonly>
                              </td> -->
                             
                              <td colspan="2" style="text-align:center" class="form-group"><input style="text-align:center" class="form-control" type="text" name="unidadesc" id="unidadesc" value="0" readonly>
                              <input class="form-control" type="hidden" name="precioc" id="precioc" value="0">
                            </td>
                              
                              <td colspan="4" style="text-align:center" class="form-group"><input style="text-align:center" class="form-control" type="text" name="totalc" id="totalc" value="0" readonly></td>
                            </tr>
                            
                          </table>
                        </div>

                       <!--  <div class="row">
                          <div class="form-group col-lg-4 col-md-4 col-xs-12">
                            <label for="idcliente" class="col-sm-3 control-label">Cliente</label>
                            <div class="col-sm-9">
                              <select name="idcliente" id="idcliente" class="form-control selectpicker" data-live-search="true" required>
                              </select>
                            </div>
                          </div>
                          <div class="form-group col-lg-4 col-md-4 col-xs-12">
                            <label for="idcamiseria" class="col-sm-3 control-label">Producto</label>
                            <div class="col-sm-9">
                              <input type="hidden" name="idcamiseria" id="idcamiseria" class="form-control" ></input>
                              <input type="text" name="camiseria" id="camiseria" class="form-control" readonly></input>
                            </div>
                            
                          </div>
                          <div class="form-group col-lg-4 col-md-4 col-xs-12">
                            <label for="fecha_hora" class="col-sm-2 control-label">Fecha </label>
                            <div class="col-sm-10">
                              <input class="form-control" type="date" name="fecha_hora" id="fecha_hora" required>
                            </div>
                          </div>
                         
                        
                        </div>

                        <div class="row">
                          <div class="form-group col-lg-2 col-md-2 col-xs-12">
                            <label for="num_ordenproduccioncamiseria" class="col-sm-4 control-label">Orden</label>
                            <div class="col-sm-8">
                              <input class="form-control" type="text" name="num_ordenproduccioncamiseria" id="num_ordenproduccioncamiseria" maxlength="20" placeholder="Número ordenproduccioncamiseria" readonly>
                            </div>
                          </div>

                          <div class="form-group col-lg-2 col-md-2 col-xs-12">
                            <label for="inicialesc"  class="col-sm-4 control-label">Iniciales</label>
                            <div class="col-sm-8">
                              <input class="form-control" type="text" name="inicialesc" id="inicialesc" value="">
                            </div>
                          </div>

                          <div class="form-group col-lg-2 col-md-2 col-xs-12">
                            <label for="cmc"  class="col-sm-4 control-label">CM</label>
                            <div class="col-sm-8">
                              <input class="form-control" type="text" name="cmc" id="cmc" value="0">
                            </div>
                          </div>
                          
                          <div class="form-group col-lg-2 col-md-2 col-xs-12">
                            <label for="unidadesc"  class="col-sm-5 control-label">Unidades</label>
                            <div class="col-sm-7">
                              <input class="form-control" type="text" name="unidadesc" id="unidadesc" value="0">
                            </div>
                          </div>
                          
                          <div class="form-group col-lg-2 col-md-2 col-xs-12">
                            <label for="precioc"  class="col-sm-3 control-label">Prec.</label>
                            <div class="col-sm-9">
                              <input class="form-control" type="text" name="precioc" id="precioc" value="0" readonly>
                            </div>
                          </div>
                          <div class="form-group col-lg-2 col-md-2 col-xs-12">
                            <label for="totalc"  class="col-sm-3 control-label">Total</label>
                            <div class="col-sm-9">
                              <input class="form-control" type="text" name="totalc" id="totalc" value="0" readonly>
                            </div>
                          </div>
                          
                        </div>  -->
                      </div>
                      <!-- /.box-body -->
                     <!--  <div class="box-footer">
                        
                      </div> -->
                      <!-- /.box-footer -->
                      
                    </div>
                  </div>
                  <!-- Chaqueta -->
                  <div class="col-md-12">
                    <!-- Horizontal Form -->
                    <div class="box box-info">
                       <div class="box-header with-border">
                        <h3 class="box-title">Chaqueta</h3>
                      </div> 
                      <!-- /.box-header -->
                      <div class="box-body">
                        <div class="row">
                          <table class="table table-striped">
                            <tr>
                              <td width="10%" align="center">Alto Sisa</td>
                              <td width="10%" align="center">Talle</td>
                              <td width="10%" align="center">Espalda</td>
                              <td width="10%" align="center">Pecho</td>
                              <td width="10%" align="center">Largo</td>
                              <td width="10%" align="center">Manga</td>
                              
                            </tr>
                            <tr>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="altosc" id="altosc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="tallec" id="tallec" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="espaldac" id="espaldac" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="pechoc" id="pechoc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="largoc" id="largoc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="mangalc" id="mangalc" value="0"></td>
                              

                              
                              
                              
                              
                              
                              
                             
                              
                              
                              
                              
                            </tr>
                            
                          </table>
                      
                        </div> 
                        
                        <div class="row">
                          <table class="table table-striped">
                            <tr>
                              <td width="10%" align="center">Hombro</td>
                              <td width="10%" align="center">Sobre Hombro</td>
                              <td width="10%" align="center">Cintura</td>
                              <td width="10%" align="center">Base</td>
                              <td width="10%" align="center">Alto Boton</td>
                              <td width="10%" align="center">Ancho Solapa</td>
                            </tr>
                            <tr>
                            <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="hombroc" id="hombroc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="bustoc" id="bustoc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="cinturac" id="cinturac" value="0"></td>

                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="basec" id="basec" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="altobotonc" id="altobotonc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="anchosolapac" id="anchosolapac" value="0"></td>
                              
                            </tr>
                            
                          </table>
                      
                        </div>

                      </div>
                      <!-- /.box-body -->
                     <!--  <div class="box-footer">
                        
                      </div> -->
                      <!-- /.box-footer -->
                      
                    </div>
                  

                  </div>
                  
                  <!-- Pantalon -->
                  <div class="col-md-12">
                    <!-- Horizontal Form -->
                    <div class="box box-info">
                      <div class="box-header with-border">
                        <h3 class="box-title">Pantalon</h3>
                      </div><!--  -->
                      <!-- /.box-header -->
                      <div class="box-body">
                        <div class="row">
                          <table class="table table-striped">
                            <tr>
                              <td width="10%" align="center">Largo Izquierdo</td>
                              <td width="10%" align="center">Largo Derecho</td>
                              <td width="10%" align="center">Rodilla</td>
                              <td width="10%" align="center">Pierna</td>
                              <td width="10%" align="center">Bota</td> <!---->
                              <td width="10%" align="center">Tiro</td>
                              <td width="10%" align="center">Cintura</td> <!---->
                              <td width="10%" align="center">Base</td>
                              <td width="10%" align="center">Entre Pierna</td>
                            </tr>
                            <tr>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="punoic" id="punoic" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="punodc" id="punodc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="cuelloc" id="cuelloc" value="0" ></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="brazoc" id="brazoc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="curasisac" id="curasisac" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="costadoc" id="costadoc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="caderac" id="caderac" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="mangainteriorc" id="mangainteriorc" value="0"></td>
                              <td width="10%" class="form-group"><input style="text-align:center" class="form-control" type="text" name="toraxc" id="toraxc" value="0"></td>

                              
                              
                              
                              
                              
                              
                             
                              
                              
                              
                              
                            </tr>
                            
                          </table>
                      
                        </div> 
                                                

                      </div>
                      <!-- /.box-body -->
                     <!--  <div class="box-footer">
                        
                      </div> -->
                      <!-- /.box-footer -->
                      
                    </div>
                  

                  </div>


                  <!-- table table-bordered table-hover -->
                  <!-- table table-striped table-bordered table-condensed table-hover -->
                  <div class="form-group col-lg-12 col-md-12 col-xs-12">
                    <!--<div class="col-md-12"> -->
                    
                    <table id="detalles" class="table table-bordered table-condensed table-hover">
                        <thead style="background-color:#478ca1">
                          <tr>
                            <td rowspan="2" width=10 style="text-align:center">Opciones</td>
                            <td rowspan="2" style="text-align:center">Articulo</td>
                            <td colspan="4" style="text-align:center">Telas</td>
                            <td colspan="2" style="text-align:center">Modelo</td>
                            <td colspan="2" style="text-align:center">Pantalon</td>
                            <td rowspan="2" style="text-align:center">Observación</td>
                          </tr>
                          <tr>
                            <td colspan="2" style="text-align:center">Codigo</td>
                            <td colspan="2" style="text-align:center">Foto</td>
                            <td style="text-align:center">Solapa</td>
                            <td style="text-align:center">Abertura</td>
                            <td style="text-align:center">Pinza</td>
                            <td style="text-align:center">Bota</td>
                            <!-- <td style="text-align:center">Estilo</td> 
                            <td style="text-align:center">Delantero</td> -->
                          </tr>
                        </thead>
                        
                        <tbody>
                          
                        </tbody>
                       <!-- <tfoot>
                          <tr>
                            <td rowspan="2" width=10 style="text-align:center"></td>
                            <td rowspan="2" style="text-align:center"</td>
                            <td colspan="4" style="text-align:center"></td>
                            <td colspan="5" style="text-align:center"></td>
                            <td rowspan="2" style="text-align:center"></td>
                          </tr>
                          <tr>
                            <td colspan="2" style="text-align:center"></td>
                            <td colspan="2" style="text-align:center"></td>
                            <td style="text-align:center"></td>
                            <td style="text-align:center"></td>
                            <td style="text-align:center"></td>
                            <td style="text-align:center"></td>
                            <td style="text-align:center"></td> 
                          </tr>
                        </tfoot>  -->
                        
                    </table>
                       <!-- Custom Tabs 
                      <div class="nav-tabs-custom">-->
                       <!-- <ul class="nav nav-tabs">
                          <li class="active"><a href="#tab_1" data-toggle="tab">Telas</a></li>
                          <li><a href="#tab_2" data-toggle="tab">Medidas</a></li>
                          <li><a href="#tab_3" data-toggle="tab">Observación</a></li>
                          <li><a href="#tab_4" data-toggle="tab">Hilos</a></li>
                          <li class="tab-pane fade"><a href="#tab_5" data-toggle="tab">Costureras</a></li>
                          <li class="pull-left header"><i class="fa fa-th"></i> Camisas</li>
                           <li class="pull-right"><a href="#" class="text-muted"><i class="fa fa-gear"></i></a></li>
                        </ul> 
                        <div class="tab-content">-->
                          <!-- <div class="tab-pane active" id="tab_1">
                              <table id="detalles12" class="table table-bordered table-condensed table-hover">
                                <thead style="background-color:#478ca1">
                                  <tr>
                                    <td rowspan="2" width=10 style="text-align:center">Opciones</td>
                                    <td rowspan="2" style="text-align:center">Articulo</td>
                                    <td colspan="4" style="text-align:center">Telas</td>
                                    <td colspan="5" style="text-align:center">Medidas</td>
                                    <td rowspan="2" style="text-align:center">Observación</td>
                                  </tr>
                                  <tr>
                                    <td colspan="2" style="text-align:center">Tela</td>
                                    <td colspan="2" style="text-align:center">Foto</td>
                                    <td style="text-align:center">Cuello</td>
                                    <td style="text-align:center">Puños</td>
                                    <td style="text-align:center">Espalda</td>
                                    <td style="text-align:center">Estilo</td>
                                    <td style="text-align:center">Delantero</td> 
                                  </tr>
                                </thead>
                                
                                <tbody>
                                  
                                </tbody>
                                <tfoot>
                                  <th></th>
                                  <th></th>
                                  <th></th>
                                  <th></th>
                                  <th></th>
                                </tfoot>
                               
                              </table>
                          </div>
                          /.tab-pane 
                          <div class="tab-pane" id="tab_2">
                            <table id="detalles" class="table table-bordered table-condensed table-hover">
                      
                              <thead style="background-color:#A9D0F5">-->
                           <!--     <th style="text-align:center">Articulo</th>
                                <th style="text-align:center">Iniciales</th>
                                <th style="text-align:center">Cuello</th>
                                <th style="text-align:center">Puños</th>
                                <th style="text-align:center">Espalda</th>
                                <th style="text-align:center">Estilo</th>
                                <th style="text-align:center">Delantero</th>
                               <th>Cantidad</th>
                                <th>Subtotal</th> -->
                             <!--  </thead>
                              <tfoot>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                              <th></th>
                                <th>TOTAL</th> 
                                    
                                <th align="right"><h4 align="right" id="totald"></h4>
                                  <input type="hidden" name="total_venta1" id="total_venta1" disabled>
                                  <input type="hidden" name="total_venta" id="total_venta">
                                  <input type="hidden" name="total_ventad" id="total_ventad">
                                </th>
                                </tr>
                              </tfoot>
                              <tbody>
                              </tbody>
                            </table>
                          </div>-->
                          <!-- /.tab-pane -->
                          
                          <!--<div class="tab-pane" id="tab_3">
                            <table id="detalles13" class="table table-bordered table-condensed table-hover">
                      
                              <thead style="background-color:#A9D0F5">
                              
                                <th style="text-align:center">Articulo</th>
                                <th  colspan="2" style="text-align:center">Observación</th>
                              
                                <th style="text-align:center">Cantidad Botones</th>
                                <th>Subtotal</th> -->
                             <!-- </thead>
                              <tfoot>
                                <th></th>
                                <th></th>
                                <th></th> 
                                
                              
                              
                               
                              </tfoot>
                              <tbody>
                              </tbody>
                            </table>
                          </div>-->
                         
                       <!-- </div>
                         /.tab-content 
                      </div>-->
                      <!-- nav-tabs-custom -->
                  </div>
                </form>
              </div>
              <div class="box-footer" id="formularioregistros1">
                  <div class="btn-group col-lg-12 col-md-12 col-xs-12">
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <a data-toggle="modal" href="#myModalA">
                        <button type="button" class="btn bg-blue btn-app pull-left" id="btnAgregarArt"><i class="fas fa-user-tie"></i> <br>Sastrería</button>
                      </a>
                      <a data-toggle="modal" href="#myModalAb">
                        <button type="button" class="btn bg-green btn-app pull-left" id="btnAgregarArtb"><i class="fa fa-inbox"></i>Camiseria</button>
                      </a> 
                      <a data-toggle="modal" href="#myModalAc">
                        <button type="button" class="btn bg-orange btn-app pull-left" id="btnAgregarArtc"><i class="fa fa-inbox"></i>Camiseria</button>
                      </a>   
                      <a data-toggle="modal" href="#myModalS">
                        <button type="button" class="btn bg-yellow btn-app pull-left" id="btnAgregarSer"><i class="fa fa-envelope"></i>Camiseria</button>
                      </a>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12" >
                      <label for="">Ingrese en código de barra </label>
                      <input class="form-control" type="text" name="cod_barra" id="cod_barra" maxlength="30" placeholder="Codigo Barra Producto" >
                      
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <!-- <button class="btn bg-blue btn-app pull-right" type="submit" id="btnGuardar"><i class="fa fa-save"></i>  Guardar</button> -->
                      <!-- <a data-toggle="modal" href="#myModalT"> -->
                        <button class="btn bg-blue btn-app pull-right" type="submit" id="btnFacturar"><i class="fa fa-bank"></i>Guardar Pedido</button>
                      <!-- </a> -->  
                      <button class="btn bg-red btn-app pull-right" onclick="cancelarform()" type="button"><i class="fa fa-arrow-circle-left"></i> Cancelar</button>
                    </div>
                  </div>
              </div>
              
                <!--Modal-->
              <div class="modal fade" id="myModalA" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 65% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione un Artículo</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblarticulos" class="table table-striped table-bordered table-condensed table-hover" style="width:100%">
                        <thead>
                          <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                          <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalAb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 45% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione un Artículo</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblarticulosb" class="table table-striped table-bordered table-condensed table-hover">
                        <thead>
                        <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                        <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalAc" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 45% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione un Artículo</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblarticulosc" class="table table-striped table-bordered table-condensed table-hover">
                        <thead>
                        <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                        <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalAh" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 45% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione un Artículo</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblarticulosh" class="table table-striped table-bordered table-condensed table-hover">
                        <thead>
                        <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                        <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th>
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalAv" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 25% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione una Costurera</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblarticulosv" class="table table-striped table-bordered table-condensed table-hover">
                        <thead>
                        <th>Opciones</th>
                          <th>Nombre</th>
                         <!--  <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th> -->
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                        <th>Opciones</th>
                          <th>Nombre</th>
                         <!--  <th>Categoria</th>
                          <th>Código</th>
                          <th>Stock</th>
                          <th>Imagen</th> -->
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalS" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 45% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione un Servicio</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblservicios" class="table table-striped table-bordered table-condensed table-hover">
                        <thead>
                          <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoría</th>
                          <th>Precio</th>
                          <th>Porcenjate</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                          <th>Opciones</th>
                          <th>Nombre</th>
                          <th>Categoría</th>
                          <th>Precio</th>
                          <th>Porcentaje</th>
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>  

              <div class="modal fade" id="myModalT" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 50% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Monto a Pagar</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group col-lg-12 col-md-12 col-xs-12">
                          <label for="">Bolivares</label>
                          <input class="form-control" type="text" name="montoapagarbs" id="montoapagarbs" >
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                          <label for="">Dollar</label>
                          <input class="form-control" type="text" name="montoapagardollar" id="montoapagardollar">
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                          <label for="">EURO</label>
                          <input class="form-control" type="text" name="montoapagareuro" id="montoapagareuro">
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                          <label for="">Tasa de Cambio en Dollar</label>
                          <input class="form-control" type="text" name="tasa_dollar1" id="tasa_dollar1" disabled="disabled">
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                          <label for="">Tasa de Cambio en EURO</label>
                          <input class="form-control" type="text" name="tasa_euro" id="tasa_euro" disabled="disabled">
                        </div>
                        <div class="form-group col-lg-12 col-md-12 col-xs-12">
                          <label for="">Seleccione el Metodo de Pago</label>
                        </div>  
                        <div class="form-group col-lg-4 col-md-4 col-xs-12">
                          <input type="checkbox" name="idmetodopago1" id="idmetodopago1" onchange="change_checkbox('1',this)">
                          <label for="">Tarjeta de Crédito</label>
                          <input class="form-control" type="text" name="montotc" id="montotc" disabled="disabled">
                        </div>
                        <div class="form-group col-lg-4 col-md-4 col-xs-12">
                          <input type="checkbox" name="idmetodopago2" id="idmetodopago2" onchange="change_checkbox('2',this)">
                          <label for="">Tarjeta de Debito</label>
                          <input class="form-control" type="text" name="montotd" id="montotd" disabled="disabled">
                        </div>
                        <div class="form-group col-lg-4 col-md-4 col-xs-12">
                          <input type="checkbox" name="idmetodopago4" id="idmetodopago4" onchange="change_checkbox('4',this)">
                          <label for="">Efectivo Bolivares</label>
                          <input class="form-control" type="text" name="montoeb" id="montoeb" disabled="disabled">
                        </div> 
                        <div class="form-group col-lg-4 col-md-4 col-xs-12">
                          <input type="checkbox" name="idmetodopago3" id="idmetodopago3" onchange="change_checkbox('3',this)">
                          <label for="">Efectivo Dollar</label>
                          <input class="form-control" type="text" name="montoed" id="montoed" disabled="disabled">
                        </div>
                        <div class="form-group col-lg-4 col-md-4 col-xs-12">
                          <input type="checkbox" name="idmetodopago6" id="idmetodopago6" onchange="change_checkbox('6',this)">
                          <label for="">Efectivo Euro</label>
                          <input class="form-control" type="text col-xs-12" name="montoee" id="montoee" disabled="disabled">
                        </div>
                       <div class="form-group col-lg-4 col-md-4 col-xs-12">
                          <input type="checkbox" name="idmetodopago5" id="idmetodopago5" onchange="change_checkbox('5',this)">
                          <label for="">Zelle</label>
                          <input class="form-control" type="text" name="montotz" id="montotz" disabled="disabled">
                        </div>
                        <!-- <div class="form-group col-lg-6 col-md-6">
                          <input type="checkbox" name="idmetodopago[]" id="idmetodopago[]" onchange="change_checkbox('6',this)">
                          <label for="">Bofa</label>
                          <input class="form-control" type="text" name="montobf" id="montobf" disabled="disabled">
                        </div> -->
                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                          <label for="">Pendiente por Pagar Bs</label>
                          <input class="form-control" type="text" name="montopendiente" id="montopendiente">
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                          <label for="">Pendiente por Pagar Dollar</label>
                          <input class="form-control" type="text" name="montopendientedollar" id="montopendientedollar">
                        </div>
                        <div class="form-group col-lg-12 col-md-12 col-xs-12">
                          <label for="">Sub-Total</label>
                          <input class="form-control" type="text" name="montosubtotal" id="montosubtotal">
                        </div>

                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-primary" type="button" id="btnGuardarCompra" disabled="disabled"><i class="fa fa-save"></i>  Facturar</button>
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalB" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 45% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Seleccione un Tarjeta de Cliente</h4>
                    </div>
                    <div class="modal-body">
                      <table id="tblbarras" class="table table-striped table-bordered table-condensed table-hover">
                        <thead>
                          <th>Opciones</th>
                          <th>Tarjeta</th>
                          <th>Número Orden de Camiseria</th>
                          <th>Monto</th>
                          <th>Estado</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                        <tfoot>
                          <th></th>
                          <th></th>
                          <th></th>
                          <th></th>
                          <th></th>
                        </tfoot>
                      </table>
                    </div>
                    <div class="modal-footer">
                <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                  </div>
                </div>
                </div>
              </div>

              <div class="modal fade" id="myModalPermiso" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 25% !important;">
                  <form action="" method="post" name="formapermiso" id="formapermiso">
                    <div class="modal-content">
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Ingrese clave</h4>
                      </div>
                      <div class="modal-body">
                          <div class="form-group col-lg-12 col-md-12 col-xs-12">
                              <label for="">Usuario</label>
                              <input class="form-control" type="text" name="usuariopermiso" id="usuariopermiso" maxlength="50" placeholder="Clave de permiso" required>
                              <label for="">Clave</label>
                              <input class="form-control" type="password" name="clavepermiso" id="clavepermiso" maxlength="50" placeholder="Clave de permiso" required>
                          </div>
                      </div>
                      <div class="modal-footer">
                        <button class="btn btn-primary" type="submit">Enviar</button>
                        <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                      </div>
                    </div>
                  </form>  
                </div>
              </div>
             
              <div class="modal fade" id="myModalCliente" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 40% !important;">
                  <div class="modal-content">
                    <form action="" method="post" name="formaguardarcliente" id="formaguardarcliente">    
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Datos del cliente</h4>
                      </div>
                      <div class="modal-body">
                        
                          <div class="form-group col-lg-6 col-md-6 col-xs-12">
                            <label for="">Tipo Documento</label>
                            <select class="form-control select-picker" name="tipo_documento1" id="tipo_documento1">
                              <option value="RIF">RIF</option>
                              <option value="CEDULA">CÉDULA</option>
                            </select>
                          </div>
                          <div class="form-group col-lg-6 col-md-6 col-xs-12">
                            <label for="">Razón Social/Cédula</label>
                            <input class="form-control" type="text" name="num_documento1" id="num_documento1" maxlength="20" placeholder="Razón Social/Cédula">
                            <input class="form-control" type="hidden" name="tipo_persona1" id="tipo_persona1" value="Cliente">
                          </div>
                          <div class="form-group col-lg-12 col-md-12 col-xs-12">
                            <label for="">Nombre</label>
                            <input class="form-control" type="text" name="nombre1" id="nombre1" maxlength="200" placeholder="Nombre del cliente" autofocus required>
                          </div>
                          <div class="form-group col-lg-12 col-md-12 col-xs-12">
                            <label for="">Dirección</label>
                            <input class="form-control" type="text" name="direccion1" id="direccion1" maxlength="600" placeholder="Dirección">
                          </div>
                          <div class="form-group col-lg-6 col-md-6 col-xs-12">
                            <label for="">Teléfono</label>
                            <input class="form-control" type="text" name="telefono1" id="telefono1" maxlength="20" placeholder="Número de Teléfono">
                          </div>
                          <div class="form-group col-lg-6 col-md-6 col-xs-12">
                            <label for="">Email</label>
                            <input class="form-control" type="email" name="email1" id="email1" maxlength="50" placeholder="Email">
                          </div>
                      </div>
                      <div class="modal-footer">
                        <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                        <button class="btn btn-success" type="submit" id="btnGuardarCliente">Guardar</button>
                    
                    
                      </div>
                    </form>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalStock" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 65% !important;">
                  <div class="modal-content">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title">Lista de Insumos</h4>
                    </div>
                    <div class="modal-body">
                      <div class="form-group col-lg-12 col-md-12 col-xs-12">  
                     <!--  <table id="tblarticulosi" class="table table-striped table-bordered table-condensed table-hover"> -->
                        <table id="tblarticulosi" class="table table-striped table-bordered table-condensed table-hover" style="width:100%">
                          <thead>
                            <th>Artículo</th>
                            <th>Insumo</th>
                            <th>Stock</th>
                            <th>Cantidad Pedida</th>
                            <th>Stock - Cantidad</th>
                            <th>Estado</th>
                          
                          </thead>
                          <tbody>
                            
                          </tbody>
                          <tfoot>
                            <th>Artículo</th>
                            <th>Insumo</th>
                            <th>Stock</th>
                            <th>Cantidad Pedida</th>
                            <th>Stock - Cantidad</th>
                            <th>Estado</th>
                          </tfoot>
                        </table>
                      </div>
                    </div>
                    <div class="modal-footer">
                      <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalCosturera" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 35% !important;">
                  <div class="modal-content">
                    <form action="" method="post" name="formaguarcosturera" id="formaguarcosturera">    
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Seleccione un sastre</h4>
                        <input type="hidden" name="idordenproduccioncamiseriac" id="idordenproduccioncamiseriac" value="">
                      </div>
                      <div class="modal-body">
                        <table id="tbcostureras" class="table table-striped table-bordered table-condensed table-hover" style="width:100%">
                          <thead>
                            <td style="text-align:center;width:350px">Artículo</td>
                            <td style="text-align:center;width:100px">Sastre</td>
                           
                          </thead>
                          <tbody>
                            
                          </tbody>
                          <tfoot>
                            <th></th>
                            <th></th>
                           
                          </tfoot>
                        </table>
                      </div>
                      <div class="modal-footer">
                        <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                        <button class="btn btn-success" type="submit" id="btnGuardarCosturera">Guardar</button>
                    
                    
                      </div>
                    </form>
                  </div>
                </div>
              </div>

              <div class="modal fade" id="myModalEstado" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 40% !important;">
                  <div class="modal-content">
                    <form action="" method="post" name="formaguarestado" id="formaguarestado">    
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Seleccione Status del Artículo</h4>
                      </div>
                      <div class="modal-body">
                        <table id="tbestado" class="table table-striped table-bordered table-condensed table-hover" style="width:100%">
                          <thead>
                            <th>Artículo</th>
                            <th>Status</th>
                           
                          </thead>
                          <tbody>
                            
                          </tbody>
                          <tfoot>
                            <th></th>
                            <th></th>
                           
                          </tfoot>
                        </table>
                      </div>
                      <div class="modal-footer">
                        <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                        <button class="btn btn-success" type="submit" id="btnGuardarCliente">Guardar</button>
                    
                    
                      </div>
                    </form>
                  </div>
                </div>
              </div>
              <!-- fin Modal-->

                <!--fin centro-->
            </div>
          </div>
        </div>
      <!-- /.box -->
      </section>
      <!-- /.content -->
    </div>
    
  <?php 
  }else{
    require 'vistas/contenidos/noacceso-view.php';
  }
 ?>
  <!-- Main Footer -->
  <?php include "vistas/modulos/mainfooter.php";?>
  </div>
  <!-- ./wrapper -->
  <!-- REQUIRED JS SCRIPTS -->
  <?php include "vistas/modulos/script.php";?>
  <script src="vistas/scripts/ordenproduccionsastreria.js"></script>
  </body>
  </html> 
<?php 
}

ob_end_flush();
  ?>

