$( document ).ready(function() {

        $('#t1').DataTable();
    $('#t2').DataTable();
    $('#t3').DataTable();
    $('#t4').DataTable();
    $('#t5').DataTable();
    $('#t6').DataTable();
    $('#t8').DataTable();
    $('#t9').DataTable({
        "scrollX": true,
        "order": [ 0, 'desc' ],
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }]
    });
    $('select').select2();
    $('#companyRegDate').datepicker({
        format: 'yyyy-mm-dd'

    });

    $('#dob').datepicker({
        format: 'yyyy-mm-dd'
    });

    $('#endDate').datepicker({
        format: 'yyyy-mm-dd'
    });

    $('#startDate').datepicker({
        format: 'yyyy-mm-dd'
    });
    
    
    // List of All Users
    $('#rcc_users').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-users.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".rcc_users-error").html("");
                $("#rcc_users").append('<tbody class="rcc_users-error"><tr><th class="text-center">No Record Found</th></tr></tbody>');
                $("#rcc_users").css("display","none");

            }
        }
    } );
	
	// List of All client KYC Unapproved List
    $('#kyc-unapproved-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "ajax":{
            url :"config/ajax/ajax-list-customers-kyc-unapproved.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".customer-list-error").html("");
                $("#customer-list").append('<tbody class="customer-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#customer-list_processing").css("display","none");

            }
        }
    } );
	
	
	// List of All client KYC Approved List
    $('#kyc-approved-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "ajax":{
            url :"config/ajax/ajax-list-customers-kyc-approved.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".customer-list-error").html("");
                $("#customer-list").append('<tbody class="customer-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#customer-list_processing").css("display","none");

            }
        }
    } );
	
	// List of All client KYC Request Manual
    $('#kyc-request-manual').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "ajax":{
            url :"config/ajax/ajax-list-customers-kyc-manual.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".customer-list-error").html("");
                $("#customer-list").append('<tbody class="customer-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#customer-list_processing").css("display","none");

            }
        }
    } );
	
	
	// List of All client KYC Request
    $('#kyc-request-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "ajax":{
            url :"config/ajax/ajax-list-customers-kyc.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".customer-list-error").html("");
                $("#customer-list").append('<tbody class="customer-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#customer-list_processing").css("display","none");

            }
        }
    } );


    //
    // List of All client
    $('#customer-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "ajax":{
            url :"config/ajax/ajax-list-customers.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".customer-list-error").html("");
                $("#customer-list").append('<tbody class="customer-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#customer-list_processing").css("display","none");

            }
        }
    } );
	

// List of All client failed transactions
    $('#failed-transactions').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-failed-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".failed-transactions-error").html("");
                $("#failed-transactions").append('<tbody class="failed-transactions-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#failed-transactions_processing").css("display","none");

            }
        }
    } );
	
	
	// List of All client flagged transactions
    $('#flaged-transactions').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-flagged-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".flaged-transactions-error").html("");
                $("#flaged-transactions").append('<tbody class="flaged-transactions-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#all-transactions_processing").css("display","none");

            }
        }
    } );
	
	
    // List of All client
    $('#all-transactions').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
		//ajax: "getcustomers?fordt=yes",
            dom: 'Bfrtip',
            buttons: [
                'pageLength',
                'excelHtml5', 'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    orientation: 'Potrait',
                    pageSize: 'LEGAL'
                },
                'copy',
                {
                    extend: 'print',
                    orientation: 'landscape',
                    pageSize: 'LEGAL'
                },
                


            ],
            language: {
                "zeroRecords": "No Customers found"
            },
            "columnDefs": [{
                "targets": 'no-sort',
                "orderable": false,
            }],
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-all-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".all-transactions-error").html("");
                $("#all-transactions").append('<tbody class="all-transactions-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#all-transactions_processing").css("display","none");

            }
        }
    } );

    // List of All Payglobal Voucher
    $('#payGlobal_voucher').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-payglobal-voucher.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".payGlobal_voucher-error").html("");
                $("#payGlobal_voucher").append('<tbody class="payGlobal_voucher-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#payGlobal_voucher_processing").css("display","none");

            }
        }
    } );

    // List of All Payglobal Voucher
    $('#payGlobal_promo').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-payglobal-promo.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".payGlobal_promo-error").html("");
                $("#payGlobal_promo").append('<tbody class="payGlobal_promo-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#payGlobal_promo_processing").css("display","none");

            }
        }
    } );

    // List of All Payglobal Users
    $('#payGlobal_users').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-users.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".payGlobal_users-error").html("");
                $("#payGlobal_users").append('<tbody class="payGlobal_users-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#payGlobal_users_processing").css("display","none");

            }
        }
    } );
    // List of All Services_tbl
    $('#service_pricing').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-service_pricing.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".service_pricing-error").html("");
                $("#service_pricing").append('<tbody class="service_pricing-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#service_pricing_processing").css("display","none");

            }
        }
    } );

    // List of All Services_tbl
    $('#pricing_policy').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-pricing-policy.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".pricing_policy-error").html("");
                $("#pricing_policy").append('<tbody class="pricing_policy-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#pricing_policy_processing").css("display","none");

            }
        }
    } );

    // List of All Super Agent
    $('#superAgentList').DataTable( {
        "processing": true,
        "serverSide": true,
        "scrollX": true,
        "ajax":{
            url :"config/ajax/ajax-list-super-agent.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".superAgentList-error").html("");
                $("#superAgentList").append('<tbody class="pricing_policy-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#superAgentList_processing").css("display","none");

            }
        }
    } );

    // List of All transactions in dev_to_glo_trabsaction_tbl
    $('#devAccount_transactions').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 5, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-dev-glo-trans.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".devAccount_transactions-error").html("");
                $("#devAccount_transactions").append('<tbody class="devAccount_transactions-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#devAccount_transactions_processing").css("display","none");

            }
        }
    } );

    // List of All transactions in dev_to_glo_trabsaction_tbl
    $('#gloAccount_transactions').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "ajax":{
            url :"config/ajax/ajax-list-super-global-trans.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".gloAccount_transactions-error").html("");
                $("#gloAccount_transactions").append('<tbody class="gloAccount_transactions-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#gloAccount_transactions_processing").css("display","none");

            }
        }
    } );

    // List of Single user Wallet to bank Transactions
    $('#single-wtb-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-wtb.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-wtb-list-error").html("");
                $("#single-wtb-list").append('<tbody class="single-wtb-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-wtb-list_processing").css("display","none");

            }
        }
    } );

    // List of Single user Receiving main transactions
    $('#single-maintransaction-receiive-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-receive-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-maintransaction-receiive-list-error").html("");
                $("#single-maintransaction-receiive-list").append('<tbody class="single-maintransaction-receiive-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-maintransaction-receiive-list_processing").css("display","none");

            }
        }
    } );

    // List of Single user Receiving main transactions
    $('#single-maintransaction-sender-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-sender-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-maintransaction-sender-list-error").html("");
                $("#single-maintransaction-sender-list").append('<tbody class="single-maintransaction-sender-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-maintransaction-sender-list_processing").css("display","none");

            }
        }
    } );

    // List of Single user Bank to Wallet Transactions
    $('#single-btw-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-btw.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-btw-list-error").html("");
                $("#single-btw-list").append('<tbody class="single-btw-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-btw-list_processing").css("display","none");

            }
        }
    } );

    // List of Single user Bank to Wallet Transactions
    $('#single-btb-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-btb.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-btb-list-error").html("");
                $("#single-btb-list").append('<tbody class="single-btb-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-btb-list_processing").css("display","none");

            }
        }
    } );

    // List of Single user hubtel Push Transactions
    $('#single-push-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-push.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-push-list-error").html("");
                $("#single-push-list").append('<tbody class="single-push-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-push-list_processing").css("display","none");

            }
        }
    } );

    // List of Single user hubtel Push Transactions
    $('#single-pull-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-single-pull.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".single-pull-list-error").html("");
                $("#single-pull-list").append('<tbody class="single-pull-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#single-pull-list_processing").css("display","none");

            }
        }
    } );

    // List of Transit resolvers
    $('#list-transit-resolver').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-transit-resolver.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".list-transit-resolver-error").html("");
                $("#list-transit-resolver").append('<tbody class="list-transit-resolver-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#list-transit-resolver_processing").css("display","none");

            }
        }
    } );

    // List of Pull Card Transactions
    $('#pull-card-transaction').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-pull-card-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".pull-card-transaction-error").html("");
                $("#pull-card-transaction").append('<tbody class="pull-card-transaction-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#pull-card-transaction_processing").css("display","none");

            }
        }
    } );

    // List of All Token Management
    $('#tokenMgt-list').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-token-mgt.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".tokenMgt-list").html("");
                $("#tokenMgt-list").append('<tbody class="tokenMgt-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#tokenMgt-list_processing").css("display","none");

            }
        }
    } );

    // List of All Token Transactions
    $('#token-transaction').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-token-transaction.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".token-transaction").html("");
                $("#token-transaction").append('<tbody class="token-transaction-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#token-transaction_processing").css("display","none");

            }
        }
    } );

    // List of Hubtel Push Transactions
    $('#push-transaction').DataTable( {
        "processing": true,
        "scrollX": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-push-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".push-transaction").html("");
                $("#push-transaction").append('<tbody class="push-transaction-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#push-transaction_processing").css("display","none");

            }
        }
    } );

    // List of Hubtel Push Transactions New
    $('#push-transaction-new').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-push-transactions-new.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".push-transaction-new").html("");
                $("#push-transaction-new").append('<tbody class="push-transaction-new-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#push-transaction-new_processing").css("display","none");

            }
        }
    } );

// List of Hubtel Pull Transactions
    $('#pull-transaction-new').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-pull-transactions-new.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".pull-transaction-new").html("");
                $("#pull-transaction-new").append('<tbody class="pull-transaction-new-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#pull-transaction-new_processing").css("display","none");

            }
        }
    } );

    // List of Hubtel Pull Transactions
    $('#pull-transaction').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-pull-transactions.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".pull-transaction").html("");
                $("#pull-transaction").append('<tbody class="pull-transaction-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#pull-transaction_processing").css("display","none");

            }
        }
    } );

    // List of All Airtime Transactions
    $('#airtime-transaction').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-airtime-transaction.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".airtime-transaction").html("");
                $("#airtime-transaction").append('<tbody class="airtime-transaction-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#airtime-transaction_processing").css("display","none");

            }
        }
    } );


    // List of All WALLET TO BANK Transactions
        $('#wtb-list').DataTable( {
            "processing": true,
            "serverSide": true,
            "order": [ 0, 'desc' ],
            "ajax":{
                url :"config/ajax/ajax-list-wtb-transaction.php", // json datasource
                type: "post",  // method  , by default get
                error: function(){  // error handling
                    $(".wtb-list").html("");
                    $("#wtb-list").append('<tbody class="wtb-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                    $("#wtb-list_processing").css("display","none");
                }
            }
        } );
    // List of All WALLET TO BANK Transactions (MAIN TRANSACTION)
    $('#wtb-list-new').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-wtb-transaction-new.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".wtb-list-new").html("");
                $("#wtb-list-new").append('<tbody class="wtb-list-new-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#wtb-list-new_processing").css("display","none");
            }
        }
    } );
    // List of All BANK TO WALLET Transactions
        $('#btw-list').DataTable( {
            "processing": true,
            "serverSide": true,
            "order": [ 0, 'desc' ],
            "ajax":{
                url :"config/ajax/ajax-list-btw-transaction.php", // json datasource
                type: "post",  // method  , by default get
                error: function(){  // error handling
                    $(".btw-list").html("");
                    $("#btw-list").append('<tbody class="btw-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                    $("#btw-list_processing").css("display","none");

                }
            }
        } );

    // List of All BANK TO WALLET Transactions (MAIN TRANSACTION)
    $('#btw-list-new').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-btw-transaction-new.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".btw-list").html("");
                $("#btw-list").append('<tbody class="btw-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#btw-list_processing").css("display","none");

            }
        }
    } );
        // List of All BANK TO WALLET Transactions
            $('#btb-list').DataTable( {
                "processing": true,
                "serverSide": true,
                "order": [ 0, 'desc' ],
                "ajax":{
                    url :"config/ajax/ajax-list-btb-transaction.php", // json datasource
                    type: "post",  // method  , by default get
                    error: function(){  // error handling
                        $(".btb-list").html("");
                        $("#btb-list").append('<tbody class="btb-list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                        $("#btb-list_processing").css("display","none");

                    }
                }
            } );

            // List of All BANK TO WALLET Transactions (MAIN TRANSACTION)
            $('#btb-list-new').DataTable( {
                "processing": true,
                "serverSide": true,
                "order": [ 0, 'desc' ],
                "ajax":{
                    url :"config/ajax/ajax-list-btb-transaction-new.php", // json datasource
                    type: "post",  // method  , by default get
                    error: function(){  // error handling
                        $(".btb-list-new").html("");
                        $("#btb-list-new").append('<tbody class="btb-list-new-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                        $("#btb-list-new_processing").css("display","none");

                    }
                }
            } );

    // List of CC Cards under Waiting
    $('#cc_waiting_list').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-cc-waiting.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".cc_waiting_list").html("");
                $("#cc_waiting_list").append('<tbody class="cc_waiting_list-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#cc_waiting_list_processing").css("display","none");

            }
        }
    } );

    // List of CC Cards under Waiting
    $('#cc_activated').DataTable( {
        "processing": true,
        "serverSide": true,
        "order": [ 0, 'desc' ],
        "ajax":{
            url :"config/ajax/ajax-list-cc-active.php", // json datasource
            type: "post",  // method  , by default get
            error: function(){  // error handling
                $(".cc_activated").html("");
                $("#cc_activated").append('<tbody class="cc_activated-error"><tr><th class="text-center">No data found in the server</th></tr></tbody>');
                $("#cc_activated_processing").css("display","none");

            }
        }
    } );




    // Find Super Agent
    $("#superAgent").select2({
        ajax: {
            url: "config/ajax/ajax-single-super-agent.php",
            dataType: 'json',
            delay: 250,
            data: function (params) {
                return {
                    q: params.term // search term
                };
            },
            processResults: function (data) {
                // parse the results into the format expected by Select2.
                // since we are using custom formatting functions we do not need to
                // alter the remote JSON data
                return {
                    results: data
                };
            },
            cache: true
        },
        minimumInputLength: 2
    });


    // Find Single customer
    $("#findCustomer").select2({
        ajax: {
            url: "config/ajax/ajax-single-customer.php",
            dataType: 'json',
            delay: 250,
            data: function (params) {
                return {
                    q: params.term // search term
                };
            },
            processResults: function (data) {
                // parse the results into the format expected by Select2.
                // since we are using custom formatting functions we do not need to
                // alter the remote JSON data
                return {
                    results: data
                };
            },
            cache: true
        },
        minimumInputLength: 2
    });

    // Find Super Agent
    $("#findCustomer2").select2({
        ajax: {
            url: "config/ajax/ajax-single-customer.php",
            dataType: 'json',
            delay: 250,
            data: function (params) {
                return {
                    q: params.term // search term
                };
            },
            processResults: function (data) {
                // parse the results into the format expected by Select2.
                // since we are using custom formatting functions we do not need to
                // alter the remote JSON data
                return {
                    results: data
                };
            },
            cache: true
        },
        minimumInputLength: 2
    });

    // Find Super Agent
    $("#findCard").select2({
        ajax: {
            url: "config/ajax/ajax-single-card.php",
            dataType: 'json',
            delay: 250,
            data: function (params) {
                return {
                    q: params.term // search term
                };
            },
            processResults: function (data) {
                // parse the results into the format expected by Select2.
                // since we are using custom formatting functions we do not need to
                // alter the remote JSON data
                return {
                    results: data
                };
            },
            cache: true
        },
        minimumInputLength: 2
    });

    // Report
    $('#t7').DataTable({
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    });


    /**
     * Ajax for all branch list customers
     */
        // Find Single customer  for branch 1
            $("#branch1").select2({
                ajax: {
                    url: "config/ajax/ajax-single-customer.php",
                    dataType: 'json',
                    placeholder: 'Select a customer',
                    allowClear: true,
                    delay: 250,
                    data: function (params) {
                        return {
                            q: params.term // search term
                        };
                    },
                    processResults: function (data) {
                        // parse the results into the format expected by Select2.
                        // since we are using custom formatting functions we do not need to
                        // alter the remote JSON data
                        return {
                            results: data
                        };
                    },
                    cache: true
                },
                minimumInputLength: 0
            });
            // Find Single customer  for branch 1
            $("#branch2").select2({
                ajax: {
                    url: "config/ajax/ajax-single-customer.php",
                    dataType: 'json',
                    placeholder: 'Select a customer',
                    allowClear: true,
                    delay: 250,
                    data: function (params) {
                        return {
                            q: params.term // search term
                        };
                    },
                    processResults: function (data) {
                        // parse the results into the format expected by Select2.
                        // since we are using custom formatting functions we do not need to
                        // alter the remote JSON data
                        return {
                            results: data
                        };
                    },
                    cache: true
                },
                minimumInputLength: 2
            });

            // Find Single customer  for branch 1
            $("#branch3").select2({
                ajax: {
                    url: "config/ajax/ajax-single-customer.php",
                    dataType: 'json',
                    placeholder: 'Select a customer',
                    allowClear: true,
                    delay: 250,
                    data: function (params) {
                        return {
                            q: params.term // search term
                        };
                    },
                    processResults: function (data) {
                        // parse the results into the format expected by Select2.
                        // since we are using custom formatting functions we do not need to
                        // alter the remote JSON data
                        return {
                            results: data
                        };
                    },
                    cache: true
                },
                minimumInputLength: 2
            });
            // Find Single customer  for branch 1
            $("#branch4").select2({
                ajax: {
                    url: "config/ajax/ajax-single-customer.php",
                    dataType: 'json',
                    placeholder: 'Select a customer',
                    allowClear: true,
                    delay: 250,
                    data: function (params) {
                        return {
                            q: params.term // search term
                        };
                    },
                    processResults: function (data) {
                        // parse the results into the format expected by Select2.
                        // since we are using custom formatting functions we do not need to
                        // alter the remote JSON data
                        return {
                            results: data
                        };
                    },
                    cache: true
                },
                minimumInputLength: 2
            });
            // Find Single customer  for branch 1
            $("#branch5").select2({
                ajax: {
                    url: "config/ajax/ajax-single-customer.php",
                    dataType: 'json',
                    placeholder: 'Select a customer',
                    allowClear: true,
                    delay: 250,
                    data: function (params) {
                        return {
                            q: params.term // search term
                        };
                    },
                    processResults: function (data) {
                        // parse the results into the format expected by Select2.
                        // since we are using custom formatting functions we do not need to
                        // alter the remote JSON data
                        return {
                            results: data
                        };
                    },
                    cache: true
                },
                minimumInputLength: 2
            });
            // Find Single customer  for Branch parents
            $("#parent").select2({
                ajax: {
                    url: "config/ajax/ajax-single-customer.php",
                    dataType: 'json',
                    placeholder: 'Select a customer',
                    allowClear: true,
                    delay: 250,
                    data: function (params) {
                        return {
                            q: params.term // search term
                        };
                    },
                    processResults: function (data) {
                        // parse the results into the format expected by Select2.
                        // since we are using custom formatting functions we do not need to
                        // alter the remote JSON data
                        return {
                            results: data
                        };
                    },
                    cache: true
                },
                minimumInputLength: 2
            });
    /**
     * End of Branch list
     */





});