function getResult() {
    var saveid = document.getElementById("saveid").value;
    var from = document.getElementById("datepicker_from").value;
    var to = document.getElementById("datepicker_to").value;

    if (from != "" && to != "") {
        $('#resultDiv').load('supplierReportsControllerAjax.php?from=' + from + '&to=' + to + '', function (response, status, xhr) {

            //$('select').chosen();
            $.getScript('../views/default/js/jqueryui_init.js');
        });
        return false;
    }
}


$("[id^='delbtn']").live('click', function (e) {
    $('#currentItr').val($(this).attr("data-itr"));
    $('#ddbtn').data('useBtnId', 'delbtn');//cash
    $("#myModal155").modal("show");
});
$("[id^='delbtn_cheques']").live('click', function (e) {
    $('#currentItr').val($(this).attr("data-itr"));
    $('#ddbtn').data('useBtnId', 'delbtn_cheques');//cheque
    $("#myModal155").modal("show");
});

$('#ddbtn').live('click', function (e) {
    $("#myModal155").modal("hide");
    var itr = Number($('#currentItr').val());
    if (itr > 0) {
        var useBtnId = $('#ddbtn').data('useBtnId');
        var debBtnAction = $('#' + useBtnId + itr).attr('data-action');
        $('#supDel').attr('action', debBtnAction);
        $('#supDel').submit();
        $(this).prop('disabled', true);
    }

});
