

<div class="modal tabindex=-1" id="fpagos">
        <div class="modal-dialog ">
            <div class="modal-content">
            <div class="col-md-12 d-flex flex-wrap">   
                <div class="modal-header col-md-6 col-sm-12">
                    <h5 class="modal-title">Metodo de Pago</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>

                <div class="modal-header col-md-6 col-sm-12">
                    <label for="">Bod_Venta</label>
                <select readonly name="" id="idbodegaVenta"   class="form-control" >
                                                               

                                                                <?php 
                                                                // <?php if($_SESSION["multibodega"]==0){echo("readonly");  
                                                             
                                                                
                                                            if($_SESSION["multibodega"]==1 ){
                                                                $acti="";
                                                                    

                                                            }else{
                                                                $acti="disabled";
                                                            }

                                                         if (empty($_SESSION["bodegasUser"])) {
                                                                foreach ($_SESSION["bodegas"] as $key => $value) {

                                                                        if($value["id"]==$_SESSION["bodegaUser"]){
                                                                                echo("<option value=".$value["id"]." selected>".$value["nombreBodega"]."</option>"); 
                                                                        }else{
                                                                           
                                                                                echo("<option value=".$value["id"]." $acti>".$value["nombreBodega"]."</option>"); 
                                                                            
                                                                                     
                                                                        }
                                                                        

                                                                }
                                                         }else{
                                                            $idusers = array_column($_SESSION["bodegasUser"], 'bodegaPermiti');


                                                            foreach ($_SESSION["bodegas"] as $key => $value) {

                                                                if($value["id"]==$_SESSION["bodegaUser"]){
                                                                        echo("<option value=".$value["id"]." selected>".$value["nombreBodega"]."</option>"); 
                                                                }else{
                                                                    if (in_array($value["id"], $idusers)) {
                                                                        echo("<option value=".$value["id"]." >".$value["nombreBodega"]."</option>"); 
                                                                    }
                                                                    // else{
                                                                    //     echo("<option value=".$value["id"]." disabled>".$value["nombreBodega"]."</option>"); 
                                                                    // }
                                                                             
                                                                }
                                                                

                                                        }



                                                         }
                                                                
                                                                ?>
                                                        
                                                        </select>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>

            </div> 
            <div class="grid-container">
               
           

            </div>




            <div class="modal-body">
                <div id="titupagos"></div>
                
                    <form  id="forfpagos"  name="crearcleinte">    
                        <div class="d-flex flex-wrap   ">        
                            <div class="col-md-3 col-4" ><b>T_Factura</b>
                                    <select name="tipoFactu" id="tipoFactu" class="form-control-sm selectStyle"  aria-label="Default select example">
                                        <option value="Pos"  >Pos</option>

                                        <option value="Electronica" >Electrónica</option>  
                                        <option value="Pos_Elec" >Pos Electro</option>                                          
                                        <option value="<?php echo($_SESSION["tipofactur"]); ?>" selected><?php echo($_SESSION["tipofactur"]);  ?></option>   
                                    
                                    </select>
                                    
                            </div>

                            <div class="col-md-4  "><b>📅Fech_Venc_Elec</b><input id="fechaV"   class="form-control form-control-sm"  type="datetime" value="<?php echo date('Y-m-d').'T'.date('H:i');?>"></div>
                            <div class="col-md-3 col-4" ><b>T_Atencion</b>
                                    <select name="tipoFactu" id="tipoAtencion" class="form-control-sm selectStyle"  aria-label="Default select example">
                                        <option value="Mostrador"<?php if($_SESSION["multibodega"]==3){echo("hidden");}else{echo("selected");} ?> >Mostrador</option> 
                                        <option value="Domicilio"<?php if($_SESSION["multibodega"]==3){echo("selected");} ?>>Domicilio</option>  
                                        <option value="Convenios">Convenios</option> 
  
                                    
                                    </select>
                                    
                            </div>

                            <div class="col-md-2  col-4" >
                            <label for="" ><input class="col-12" id="porceservicio" type="number" value="10"></label>
                              <label for=""><input class="btn bg-success" id="calcularServicio" type="button" value="Servicio"></label>
                                    
                            </div>
                            </div>  
                            <hr> 
                                <div id="fdatos" class="d-flex row-cols-md-4 flex-wrap">
                                
                                <div class="col-md-4  col-sm-6 col-12 "><label class="col m-1"><b class="FORMADEPAGO">💵EFECTIVO</b><input type="text" inputmode="numeric" style="color:  #060606; background:  #85B6BF; font-size: 20px; padding:none;" class="form-control " value="0"  id="efectivo"></label></div>
                                <div class="col-md-4 col-sm-6 col-12"><label class="col m-1"><b class="FORMADEPAGO">🪙TRASFERENCIA</b><input type="text" inputmode="numeric" style="color:  #060606; background:   #99FDBC ; font-size: 20px;" class="form-control " value="0"  id="Tcredicto" > </label></div>
                                <div class="col-md-4 col-sm-6 col-12"><label class="col m-1" ><b class="FORMADEPAGO">💳TARJETAS</b> <input  type="text" inputmode="numeric" style="color:  #060606; background:  #595494 ; font-size: 20px; " class="form-control " value="0"  id="Tdebito" > </label></div>
                               
                                
                               

                                <div class="col-md-4 col-sm-6 col-12"><label class="col m-1"> <b class="FORMADEPAGO">💰CREDITO</b>  <input type="text" inputmode="numeric"   class="form-control " style="color:  #060606; background:  #757F41 ;font-size: 20px;" value="0"  id="creditoc"> </label></div>
                               
                           



                               

                                <div class="col-md-8 col-sm-8 col-12" <?php if(count($_SESSION["cuentasCaja"])>0){echo("");}else{echo("hidden");} ?> >
                                    <label class="d-flex m-1 flex-wrap">
                                        <b class="FORMADEPAGO col-12" id="saltolina">OTROS</b>
                                        

                                        
                                            <!-- INPUT VALOR -->
                                           
                                                <input
                                                    type="text"
                                                    inputmode="numeric"
                                                    class="form-control-auto col-6"
                                                    id="otrosBANCO"
                                                    name="otrosBANCO"
                                                    placeholder="0"
                                                    style="color:#060606; background:#79B0D9; font-size:20px;"
                                                    value="0"
                                                >
                                           
                                                <select class="form-control-auto col-6" id="cuentaDestino" name="cuentaDestino" style="color:#060606;  ">
                                                      <!-- <option value="0" selected></option> -->
                                                    <?php foreach ($_SESSION["cuentasCaja"] as $c) { ?>
                                                      
                                                        <option value="<?= $c['CuentaM']; ?>">
                                                            <?= $c['CuentaM'] . ' - ' . $c['NombreCuenta']; ?>
                                                        </option>
                                                    <?php } ?>
                                                </select>
                                           
                                       
                                    </label>
                                </div>






                               
                               
                               
                                <div class="col-md-4 col-sm-6 col-12"><label class="col m-1" ><b>🎁VLR_DTO</b><input type="text"  class="form-control" style="color:  #060606; background: #557A69  ;font-size: 20px; " disabled="disabled" value="0" id="descuentovalor"> </label></div>

                                <div class="col-md-4 col-sm-6 col-12"><label class="col m-1"><b>SERVICIO</b><input type="text" value="0" class="form-control"   id="propina" style="color:#325e63; background: #79B0D9   ; font-size: 20px; border:none;"></label></div>

                                <div class="col-md-4 col-sm-6 col-12"><label class="col m-1"><b>💷CAMBIO</b><input type="text" disabled="disabled" class="form-control"   id="valentragdo" style="color:#325e63; background: #79B0D9   ; font-size: 25px; border:none;"></label></div>
                                 
                              
                                </div>    
                            
                                <div>
                                    <label class="col"><b style="background-color:salmon; border-radius:9px;  border-bottom:-2px; font-size:12px; color:white;">&nbsp;TOTAL&nbsp;</b>  <input type="text" disabled="disabled" class="form-control"  value="0" id="tfactur" style="color:#022640 ; background-color:#ffffff ; font-size: 50px; border:none; font-weight:bold; text-align: center"> </label></div>  

                                
                                                <label class="col-12"><input type="text" id="comentarios"  class="form-control" placeholder="Escriba un detalle de la factura."></input></label>     
                                                
                                               
                    </form>
                     
                                   <div class="d-flex justify-content-center" style="padding-top:15px; ">
                                   <button type="button" class="btn btn-warning m-2 text-dark" id="guarfactu" > 💾&nbsp; Guardar </button>  
                                   <button type="button" class="btn btn-secondary m-2" data-bs-dismiss="modal"> Salir </button>
                                   <button  <?php echo($_SESSION["Realizarcotizacion"]); ?>  class="btn btn-info m-1"   id="guardarCotizacion" type="button"  value="Guardar_Cotizacion">Cotizar</button>
                                   
                                   </div>
                                   <div class="row">
                                   <label class="col"><input type="checkbox" id="idSorteo" >Sorteo</input></label> 
                                   </div>
                                  
          
        </div>

        
    </div>







