I have created a checkbox column in Interactive Grid and when the checkbox is un-checked for any of the row the current record Bill Percent and Amounts should be null. I have coded the logic in the Function and Variable declaration. But the issue is that i have to uncheck the row checkbox and mouse-click outside the grid to make the Bill Percent/Amount null otherwise when i just uncheck the checkbox, the values stay as below: Please help to resolve this.

Logic:
$(function() {
// the model gets released and created at various times such as when the report changes
// listen for model created events so that we can subscribe to model notifications
$("#Project\_Tasks\_IG").on("interactivegridviewmodelcreate", function(event, ui) {
var sid,
model = ui.model;
if ( ui.viewId === "grid" ) {
sid = model.subscribe( {
onChange: function(type, change) {
if (type === "set" && change.field == "INCLUDE\_TASK" ) {
update2( model);
}
….
…
….
function update2(model) {
var model = apex.region("Project_Tasks_IG").widget().interactiveGrid("getViews","grid").model;
var selrec = model.getSelectedRecords();
var currec = model.getValue(selrec, "INCLUDE_TASK");
if (currec != undefined) {
if (model.getValue(currec, "INCLUDE\_TASK") == 'N'){
model.setValue(currec,'BILL\_AMOUNT','');
model.setValue(currec,'BILL\_PERCENT','');
}
}
}