var purchaseOrderBreakdownItemDelivery = {
    settings: {
        ajaxUrl: ''
    },
    init: function() {
        purchaseOrderBreakdownItemDelivery.initDataTable();
    },
    initDataTable: function() {

        var callBack = function() {
        };

        var datalist = jQ('#purchaseOrderBreakdown-datalist').DataTable({
            
            'processing': true,
            'serverSide': true,
            'ajax': {
                'url': purchaseOrderBreakdownItemDelivery.settings.ajaxUrl,
                'data': function(d) {
                    d.status = jQ('#receivedOrderFilter-status').val();
                    d.url = global.settings.url;
                    d.purchaseOrder_id = purchaseOrderBreakdownItemDelivery.settings.purchaseOrder_id;
                }
            },
            'columnDefs': [
                { 'orderable': false, 'targets': [7, 8] },
                { 'searchable': false, 'targets': [7, 8] }
            ],
            drawCallback: function() {
                callBack();
            },
            responsive: {
                details: {
                    renderer: function( api,rowIdx ) {
                        return global.dataTableResponsiveCallBack(api, rowIdx, callBack);
                    }
                }
            }
        });

        jQ('#receivedOrderFilter-status').change(function(){
            datalist.draw();
        });

        jQ('.content-container').removeClass('has-loading'); jQ('.content-container-content').removeClass('hide');
    }
};