jQuery(document).ready(function() {
    
        var id = jQuery('#elex-multi-vendor-for-woocommerce-vendor-settlement-history-table').attr("data-attr-id");
        if ( ! jQuery.fn.DataTable.isDataTable( jQuery('#elex-multi-vendor-for-woocommerce-vendor-settlement-history-table') ) ) {
            jQuery('#elex-multi-vendor-for-woocommerce-vendor-settlement-history-table').DataTable(
            {
              
               "columns":[
                {data:"settlement_date",name:"settlement_date"},
                {data:"settlement_mode",name:"settlement_mode"},
                {data:"transaction_id",name:"transaction_id"},
                {data:"vendor_amount",name:"vendor_amount"},
                {data:"note",name:"note"},
               ],
            "pageLength" : 10,
            "processing": true,
            "order": [0, 'desc'],
            "serverSide": true,
                "ajax": {
                    url:elex_mv_vendor_ajaxurl_object.ajax_url,
                    method: "post",
                    data: function ( d ) {	 
                        d.id=id;
                        d.action = "elex_mv_settlement_history_data";
                        d.nonce = elex_mv_vendor_ajaxurl_object.nonce;
                    }
                }
            });
        }
                // add export & for payment page export 
            jQuery(".elex-multi-vendor-for-woocommerce-add-export-open-btn").click(function() {
                jQuery("#elex-multi-vendor-for-woocommerce-add-export").addClass("active");
            });
            jQuery(".elex-multi-vendor-for-woocommerce-add-export-close-btn").click(function() {
                jQuery("#elex-multi-vendor-for-woocommerce-add-export").removeClass("active");
            });

        
            
});
