
function Finalize() {
    
    var selectedKeys = gridDebitCredit.GetSelectedKeysOnPage();
    if (selectedKeys == '')
        alert('Please select atleast one record')
    else {
        var sunSelectedAccounts = selectedKeys.toString();
        window.location = "Debit_Credit_Note/Finaized?DebitCreditIDs=" + sunSelectedAccounts;
    }
}

Date.prototype.addDays = function (days)
{
    var date = new Date(this.valueOf());
    date.setDate(date.getDate() + days);
    return date;
}
function Datechange(e,i) {
    DueDate.SetValue(e.GetValue()==null?null:e.GetValue().addDays(30));
    //console.log(i);
    //$('#NoteDate_I').on('propertychange change click keyup input paste', function ()
    //{
    //    DueDate.SetValue(NoteDate.GetValue().addDays(30));
    //})
}