HEX
Server: Apache
System: Linux server-634962.emtiyz.com 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: codo66ho (1003)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/codo66ho/www/ar/wp-content/plugins/tf-car-listing/public/assets/js/invoice.js
(function ($) {
    'use strict';
    var handleInvoicePrint = function () {
        $('#invoice_print').on('click', function (event) {
            event.preventDefault();
            var width_print_window = 900,
                height_print_window = 650,
                left = (screen.width / 2) - (width_print_window / 2),
                top = (screen.height / 2) - (height_print_window / 2),
                invoiceId = $(this).data('invoice-id'),
                ajaxUrl = $(this).data('ajax-url'),
                homeUrl = $(this).data('home-url'),
                invoice_print_window = window.open(homeUrl, 'Invoice ' + invoiceId, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=1, copyhistory=no, width=' + width_print_window + ', height=' + height_print_window + ', top=' + top + ', left=' + left);
            $.ajax({
                type: 'post',
                url: ajaxUrl,
                data: {
                    'action': 'tfcl_handle_print_invoice',
                    'invoice_id': invoiceId
                },
                success: function (data) {
                    invoice_print_window.document.write(data);
                    invoice_print_window.document.close();
                    invoice_print_window.focus();
                },
                error: function (error) {
                    console.log(error);
                }
            })
        })
    }

    $(document).ready(function () {
        handleInvoicePrint();
    })
})(jQuery)