HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/root/proc/self/cwd/pm/plugins/Purchase/assets/js/invoices/pur_invoice_preview_js.php
<script>
  

function preview_purinv_btn(invoker){
  "use strict"; 
    var id = $(invoker).attr('id');
    var rel_id = $(invoker).attr('rel_id');
    view_purinv_file(id, rel_id);
}

function view_purinv_file(id, rel_id) {
  "use strict"; 
      $('#purinv_file_data').empty();
      $("#purinv_file_data").load(admin_url + 'purchase/file_purinv/' + id + '/' + rel_id, function(response, status, xhr) {
          if (status == "error") {
              alert_float('danger', xhr.statusText);
          }
      });
}
function close_modal_preview(){
  "use strict"; 
 $('._project_file').modal('hide');
}

function delete_purinv_attachment(id) {
  "use strict"; 
    if (confirm_delete()) {
        requestGet("<?php echo get_uri('purchase/delete_purinv_attachment/'); ?>" + id).done(function(success) {
            if (success == 1) {
                $("#purinv_pv_file").find('[data-attachment-id="' + id + '"]').remove();
            }
        }).fail(function(error) {
            appAlert.warning(error.responseText);
        });
    }
  }

function confirm_delete() {
   "use strict"; 
    var message = 'Are you sure you want to perform this action?';

    // Clients area
    if (typeof(app) != 'undefined') {
        message = "<?php echo app_lang('confirm_action_prompt'); ?>";
    }

    var r = confirm(message);
    if (r == false) { return false; }
    return true;
}
</script>