!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/almazenServer/application/views/   drwxr-xr-x
Free 10.11 GB of 29.4 GB (34.38%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     reciboN_generacion_view.php (18.89 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |

<div>

<form  method="post"  name="gestionRemito" >

    <h1> Datos del Cliente</h1>    
    <div class="estiloForm col-sm-12" align="left">    
        <b>Nombre:</b>&nbsp;<input class="form-control input-sm" type="text" name="NombreCliente" id="NombreCliente" value="<?php  echo ($datos->nombre)?>" readonly>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <b>Razon Social:</b>&nbsp;<input class="form-control input-sm" type="text" name="razon_social" id="razon_social" value="<?php  echo ($datos->razon_social)?>" readonly>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

         <b>Mail:</b>&nbsp;<input class="form-control input-sm" type="text" name="mail" id="mail" value="<?php  echo ($datos->mail)?>"readonly>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <b>Telefono:</b>&nbsp;<input class="form-control input-sm" type="text" name="telefonoCliente" id="telefonoCliente" value="<?php  echo ($datos->telefono)?>"readonly>
        
                      <br><br>
        <b>Direccion:</b>&nbsp;<input class="form-control input-sm" type="text" name="DireccionCliente" id="DireccionCliente" value="<?php  echo ($datos->direccion)?>" readonly>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <b>Localidad:</b>&nbsp;<input class="form-control input-sm" type="text" name="LocalidadCliente" id="LocalidadCliente" value="<?php  echo ($datos->localidad)?>"readonly>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <b>IVA:</b>&nbsp;<input class="form-control input-sm" type="text" name="ResponsableCliente" id="ResponsableCliente" value="<?php  echo ($datos->iva)?>"readonly>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <b>Cuit:</b>&nbsp;<input class="form-control input-sm" type="text" name="CuitCliente" id="CuitCliente" value="<?php  echo ($datos->cuit)?>"readonly>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input class="form-control" type="hidden" name="idCliente" id="idCliente" value="<?php  echo ($datos->id)?>" readonly>
    </div>
    <?php  $resultadoSaldo=$this->consultas_model->getSaldo($datos->id); ?>
    <br>
        <strong>Saldo: </strong><input class="form-control input-sm" type="text" name="Saldo" id="Saldo" value="<?php  if($resultadoSaldo !=null)  echo ($resultadoSaldo->valor_saldo);?>" readonly>
    <br>
    
    <h1> Seleccione Remito relacionado al Pago</h1>

          <strong>Seleccione REMITO:</strong>  

           <select name="comboFacturas" id="comboFacturas" onchange="llenarTotal();">
           <option></option>
           <?php $respuesta=$this->consultas_model->getRemitosByCliente($datos->id); 
           foreach(
$respuesta as $file):?>
                 <option><?=  $file->nro_remito ?></option>
            <?php endforeach; ?>
            </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <strong>Monto Remito Seleccionado:</strong>  <input class="form-control input-sm" type="text" name="totalSeleccionadoFactura" id="totalSeleccionadoFactura" value="" readonly>
            <input type="hidden" name="NumeroRecibo" id="NumeroRecibo" value="<?php  echo $nroRecibo?>" readonly> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input class="btn btn-success btn-lg" type="button" name="AgregarFra" id="AgregarFra" value="Agregar Remito" onclick="agregarCarrito();">
            <br><br>
            
            <div class="inline" align="right">
                <div class="col-mod-8">
                    <div id="facturasAgregadas" style="width:30%">
                        <?php
                            $this
->table->set_heading('Remito''Monto de Remito','Quitar Remito'); //crea la primera fila de la tabla con el encabezado
                            
$tmp = array ( 'table_open'  => '<table class="table table-bordered table-striped" border="0" cellpadding="2" cellspacing="1" id="facturasaPagar">' ); 
                            
$this->table->set_template($tmp); //aplico los cambios de modificacion anterior
                              
echo $this->table->generate();
                        
?>
                   </div>
                </div>
                
                <div class="col-mod-4">
                    <strong>Total Acumulado:</strong>  <input class="form-control input-sm" type="text" name="totalAcumulado" id="totalAcumulado" value="0" readonly>
                    <input type="hidden" name="NumeroRecibo" id="NumeroRecibo" value="<?php  echo $nroRecibo?>" readonly> 
                </div>    
           </div>
           <br>
    
    <div id="mediosPago">        
    <ul class="nav nav-tabs" role="tablist" id="myTab">
          <li role="presentation" class="active"><a href="#cash" aria-controls="home" role="tab" data-toggle="tab"><strong> Registrar Pago en Efectivo</strong></a></li>
          <li role="presentation" ><a href="#transf" aria-controls="comercial" role="tab" data-toggle="tab"><strong>Registrar Pago por Transferencia</strong></a></li>
          <li role="presentation"><a href="#cheque" aria-controls="profile" role="tab" data-toggle="tab"><strong>Registrar Pago con Cheque</strong></a></li>
      </ul>        
    <div class="tab-content ">
          <div role="tabpanel" class="tab-pane active estiloForm" id="cash">    
    
            <strong>Monto Recibido (*):</strong>  &nbsp; <input class="form-control input-sm" type="text" name="monto" id="monto" value=""><br>
            <div class="col-md-12 form-inline">
                    <strong>Tipo de Retencion:</strong> 
                    <select name="comboRetencion" id="comboRetencion"  class="form-control">
                    <option></option>
                   <?php $respuestaCombo=$this->consultas_model->getTipoRetencion(); foreach($respuestaCombo as $file):?>
                         <option><?= $file->descripcion ?></option>
                    <?php endforeach;?>
                    </select>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <strong>Importe:</strong> <input class="form-control input-sm" type="text" name="retencionE" id="retencionE" value=""><br>
                </div>
            <label>(*) Campos Obligatorios</label>
            <br><br>
            <input class="btn btn-primary btn-lg" type="button" name="GenerarRecibo" id="GenerarRecibo" value="Generar Recibo" onclick="generarReciboEfectivo();">
          
          </div>
          <div role="tabpanel" class="tab-pane  estiloForm" id="transf">    
             <strong>Codigo Transferencia (*):</strong>&nbsp;   <input class="form-control input-sm" type="text" name="codTransf" id="codTransf" value="">&nbsp;&nbsp;&nbsp;&nbsp;
              <strong>Monto (*):</strong> &nbsp;  <input class="form-control input-sm" type="text" name="valort" id="valort" value=""> <br><br>

                <div class="col-md-12 form-inline">
                    <strong>Tipo de Retencion:</strong> 
                    <select name="comboRetencion" id="comboRetencion"  class="form-control">
                    <option></option>
                   <?php $respuestaCombo=$this->consultas_model->getTipoRetencion(); foreach($respuestaCombo as $file):?>
                         <option><?= $file->descripcion ?></option>
                    <?php endforeach;?>
                    </select>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <strong>Importe:</strong> <input class="form-control input-sm" type="text" name="retenciont" id="retenciont" value=""><br>
                </div>


             <br>
             <label>(*) Campos Obligatorios</label>
             <br><br>
             <input class="btn btn-primary btn-lg" type="button" name="GenerarRecibo" id="GenerarRecibo" value="Generar Recibo" onclick="generarReciboTransf();">
          </div>
          <div role="tabpanel" class="tab-pane  estiloForm" id="cheque">    
                       <strong>Nro Cheque: (*)</strong> &nbsp;  <input class="form-control input-sm" type="text" name="nroCheque" id="nroCheque" value="">&nbsp;&nbsp;&nbsp;&nbsp;
                      <strong>Titular: (*)</strong> &nbsp;  <input class="form-control input-sm" type="text" name="titular" id="titular" value="">&nbsp;&nbsp;&nbsp;&nbsp;
                      <strong>Fecha Vencimiento: (*)</strong>   &nbsp;       
                      <div class="input-append date" id="dp1" data-date="12-02-2012" data-date-format="dd-mm-yyyy"> 
                        <input class="datepicker" id="fechaVenc" data-date-format="dd-mm-yyyy"> 
                    </div>
                    <br><br>
                      <strong>Banco: (*)</strong> &nbsp;  <input class="form-control input-sm" type="text" name="banco" id="banco" value=""> &nbsp;&nbsp;&nbsp;&nbsp;
                      <strong>Monto: (*)</strong> &nbsp;  <input class="form-control input-sm" type="text" name="valorC" id="valorC" value="">&nbsp;&nbsp;&nbsp;&nbsp;
                   
                   <div class="col-md-12 form-inline">
                    <strong>Tipo de Retencion:</strong> 
                    <select name="comboRetencion" id="comboRetencion"  class="form-control">
                    <option></option>
                   <?php $respuestaCombo=$this->consultas_model->getTipoRetencion(); foreach($respuestaCombo as $file):?>
                         <option><?= $file->descripcion ?></option>
                    <?php endforeach;?>
                    </select>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <strong>Importe:</strong> <input class="form-control input-sm" type="text" name="retencionC" id="retencionC" value=""><br>
                </div>

            <br>
             <div class="col-md-12" align="right">
              <input class="btn btn-success" type="button" name="AgregarCheque" id="AgregarCheque" value="Agregar Cheque" onclick="agregarCheque();">
             </div>
            <div class="inline" align="center">
                <div class="col-mod-12">
                    <div id="chequesIngresados" style="width:60%">
                        <?php
                            $this
->table->set_heading('Nro Cheque''Titular','fecha Vencimiento','Banco','Monto','Tipo Retencion','Retencion','Eliminar'); //crea la primera fila de la tabla con el encabezado
                            
$tmp = array ( 'table_open'  => '<table class="table table-bordered table-striped" border="0" cellpadding="2" cellspacing="1" id="chequeLista">' ); 
                            
$this->table->set_template($tmp); //aplico los cambios de modificacion anterior
                              
echo $this->table->generate();
                        
?>
                   </div>
                </div>
           </div>

            <label>(*) Campos Obligatorios</label>
             <br><br>
             <div class="col-md-12" align="center">
                 <input class="btn btn-primary btn-lg" type="button" name="GenerarRecibo" id="GenerarRecibo" value="Generar Recibo" onclick="generarReciboCheque();">
             </div>
          </div>
      </div>    
      </div>
    </form>
</div>

<script type="text/javascript">
    $('#facturasAgregadas').hide();
    
    $('#mediosPago').hide();

      function agregarCheque(){

          cliente=document.getElementById('idCliente').value;
          nroRecibo=document.getElementById('NumeroRecibo').value;
          nroCheque=document.getElementById('nroCheque').value; 
          titular=document.getElementById('titular').value; 
          fechaVenc=document.getElementById('fechaVenc').value; 
          banco=document.getElementById('banco').value; 
          monto=document.getElementById('valorC').value; 
          retencionTipo=document.getElementById('comboRetencion').value;
          retencion=document.getElementById('retencionC').value; 
          if((nroCheque != "") && (titular != "") && (monto!= "") && (fechaVenc !="") && (banco !="")){
              $.ajax({
                     type: 'POST',
                     url: '<?php echo site_url("recibo/ingresarCheque");?>',
                     data: {nroRecibo:nroRecibo,cliente:cliente,nroCheque:nroCheque,titular:titular,fechaVenc:fechaVenc,banco:banco,monto:monto,retencionTipo:retencionTipo,retencion:retencion},
                     success:function(data){
                          $("#chequeLista").append("<tr><td>" + nroCheque + "</td><td>" + titular + "</td><td>" + fechaVenc + "</td><td>" + banco + "</td><td>" + monto + "</td><td>" + retencionTipo + "</td><td>" + retencion + "</td><td><input class='btn btn-danger' type='button' name='eliminar' id='eliminar' value='Eliminar' onclick='elinminarRegistroCheque(this,nroCheque)'></td></tr>");
                          $('#nroCheque').val('');
                          $('#banco').val('');
                          $('#titular').val('');
                          $('#fechaVenc').val('');
                          $('#valorC').val('');
                          $('#retencionC').val('');
                     }
               });
          }
            else{
                alert("Faltan campos obligatorios");
            } 
     }
         
      function elinminarRegistroCheque(id,nroCheque){
          var i = id.parentNode.parentNode.rowIndex;
          document.getElementById('chequeLista').deleteRow(i);
          $.ajax({
                 type: 'POST',
                 url: '<?php echo site_url("recibo/eliminarChequeSi");?>',
                 data: {nroCheque:nroCheque},
                 success:function(data){
                     
                 }
           });
      }

         
    $('.datepicker').datepicker({
        format: 'yyyy-mm-dd',
        startDate: '-3d',
        language: "es",
        autoclose: true,
        todayBtn: true
        }).on('show', function() {            
            // Obtener valores actuales z-index de cada elemento
            var zIndexModal = $('#expo').css('z-index');
            var zIndexFecha = $('.datepicker').css('z-index');
            $('.datepicker').css('z-index',zIndexModal+1);

        });
    
    function llenarTotal(){
      var facturas =document.getElementById('comboFacturas').value;
      $.ajax({
             type: 'POST',
             url: '<?php echo site_url("recibo/consultaTotalRemito");?>',
             data: {facturas:facturas},
             success:function(data){
                 $('#totalSeleccionadoFactura').val(data);
             }
       });
        }
    
      function serialize(arr)
      {
          var res = 'a:'+arr.length+':{';
          for(i=0; i<arr.length; i++)
          {
              res += 'i:'+i+';s:'+arr[i].length+':"'+arr[i]+'";';
          }
          res += '}';
      return  res;
      }
      

      function generarReciboCheque(){
          cliente=document.getElementById('idCliente').value;
          nroRecibo=document.getElementById('NumeroRecibo').value;
          nroCheque=document.getElementById('nroCheque').value;
          titular=document.getElementById('titular').value;
          fechaVencimiento=document.getElementById('dp1').value;
          banco=document.getElementById('banco').value;
          monto=document.getElementById('valorC').value;
          retencionTipo=document.getElementById('comboRetencion').value;
          retencion=document.getElementById('retencionC').value;
          var miArray = new Array();
          var cheques = new Array();
          m=0;
          
          for (var i=1;i < document.getElementById('facturasaPagar').rows.length; i++){
                 for (var j=0; j<1; j++){
                     miArray[m]=document.getElementById('facturasaPagar').rows[i].cells[j].innerHTML;
                     m++;
                 }
         } 
           facturas=null;
           var remitos=serialize(miArray);

          m=0;
          
          for (var i=1;i < document.getElementById('chequeLista').rows.length; i++){
                 for (var j=0; j<1; j++){
                     cheques[m]=document.getElementById('chequeLista').rows[i].cells[j].innerHTML;
                     m++;
                 }
         } 
        var chequesEnviados=serialize(cheques);
        location.href='<?php echo base_url()?>recibo/reciboCheque?cheque='+chequesEnviados+'&nroRecibo='+nroRecibo+'&cliente='+cliente+'&facturas='+facturas+'&remitos='+remitos;

      }

      
      function generarReciboTransf(){
          cliente=document.getElementById('idCliente').value;
          nroRecibo=document.getElementById('NumeroRecibo').value;
          codiTransferencia=document.getElementById('codTransf').value;
          monto=document.getElementById('valort').value;
          retencionTipo=document.getElementById('comboRetencion').value;
          retencion=document.getElementById('retenciont').value;
          var miArray = new Array();
          m=0;
          
          for (var i=1;i < document.getElementById('facturasaPagar').rows.length; i++){
                 for (var j=0; j<1; j++){
                     miArray[m]=document.getElementById('facturasaPagar').rows[i].cells[j].innerHTML;
                     m++;
                 }
         } 
           facturas=null;
           var remitos=serialize(miArray);
         
          if((codiTransferencia != "") && (monto!= "") && (miArray !=null)){
               if(retencion !=null){
                   location.href='<?php echo base_url()?>recibo/reciboTransferencia?monto='+monto+'&nroRecibo='+nroRecibo+'&cliente='+cliente+'&codTransf='+codiTransferencia+'&facturas='+facturas+'&retencion='+retencion+'&tipoRetencion='+retencionTipo+'&remitos='+remitos;
                }
               else{
                   location.href='<?php echo base_url()?>recibo/reciboTransferencia?monto='+monto+'&nroRecibo='+nroRecibo+'&cliente='+cliente+'&codTransf='+codiTransferencia+'&facturas='+facturas+'&remitos='+remitos;
                   }
            }else{
                alert("Faltan campos obligatorios");
            } 
      }

      
      function generarReciboEfectivo(){
           cliente=document.getElementById('idCliente').value;
           nroRecibo=document.getElementById('NumeroRecibo').value;
           monto=document.getElementById('monto').value;
           retencionTipo=document.getElementById('comboRetencion').value;
           retencion=document.getElementById('retencionE').value;
           var miArray = new Array();
           m=0;
           
           for (var i=1;i < document.getElementById('facturasaPagar').rows.length; i++){
                 for (var j=0; j<1; j++){
                     miArray[m]=document.getElementById('facturasaPagar').rows[i].cells[j].innerHTML;
                     m++;
                 }
             } 
           facturas=null;
           var remitos=serialize(miArray);
           
           if((monto  != "" ) &&(miArray !=null)){
               if(retencion !=null){
                   location.href='<?php echo base_url()?>recibo/reciboEfectivo?monto='+monto+'&nroRecibo='+nroRecibo+'&cliente='+cliente+'&facturas='+facturas+'&retencion='+retencion+'&tipoRetencion='+retencionTipo+'&remitos='+remitos;
                }
               else{
                   location.href='<?php echo base_url()?>recibo/reciboEfectivo?monto='+monto+'&nroRecibo='+nroRecibo+'&cliente='+cliente+'&facturas='+facturas+'&remitos='+remitos;
                   }
               
            }else{
                alert("Faltan campos obligatorios");
            } 
      }
      
      function elinminarRegistro(id,ingresa){
          var i = id.parentNode.parentNode.rowIndex;
          document.getElementById('facturasaPagar').deleteRow(i);
          valor=document.getElementById('totalAcumulado').value;
          document.getElementById('totalAcumulado').value=(valor-ingresa);
      }



         
      function agregarCarrito(){
          valor=(parseInt(document.getElementById("totalAcumulado").value))+(parseInt(document.getElementById("totalSeleccionadoFactura").value));
          $('#totalAcumulado').val(valor);
          factura=document.getElementById('comboFacturas').value; 
          monto=document.getElementById('totalSeleccionadoFactura').value;
          $("#facturasaPagar").append("<tr><td>" + factura + "</td><td>" + monto + "</td><td><input class='btn btn-danger' type='button' name='eliminar' id='eliminar' value='Eliminar' onclick='elinminarRegistro(this," + monto + ")'></td></tr>");
          $('#facturasAgregadas').show();
          $('#mediosPago').show();
        }
      
       document.onkeydown = function(){ 
            if (window.event && (window.event.keyCode == 8)) 
            { 
            valor = document.activeElement.value; 
            if (valor==undefined) { return false; } //Evita Back en página. 
            else 
            { 
            if (document.activeElement.getAttribute('type')=='sel ect-one') 
            { return false; } //Evita Back en select. 
            if (document.activeElement.getAttribute('type')=='but ton') 
            { return false; } //Evita Back en button. 
            if (document.activeElement.getAttribute('type')=='rad io') 
            { return false; } //Evita Back en radio. 
            if (document.activeElement.getAttribute('type')=='che ckbox') 
            { return false; } //Evita Back en checkbox. 
            if (document.activeElement.getAttribute('type')=='fil e') 
            { return false; } //Evita Back en file. 
            if (document.activeElement.getAttribute('type')=='res et') 
            { return false; } //Evita Back en reset. 
            if (document.activeElement.getAttribute('type')=='sub mit') 
            { return false; } //Evita Back en submit. 
            else //Text, textarea o password 
            { 
            if (document.activeElement.value.length==0) 
            { return false; } //No realiza el backspace(largo igual a 0). 
            else 
            { document.activeElement.value.keyCode = 8; } //Realiza el backspace. 
            } 
            } 
            
            }
        if(window.event && window.event.keyCode == 505){ 
             window.event.keyCode = 505; 
        } 
       }
    </script>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0079 ]--