Remove unnecessary variable (#14352)
* Remove unnecessary variable * Replace cur_frm with frm * Update material_request.js
This commit is contained in:
parent
dabe21051c
commit
c37fd050c5
@ -148,8 +148,8 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||||
|
|
||||||
// stop
|
// stop
|
||||||
cur_frm.add_custom_button(__('Stop'),
|
me.frm.add_custom_button(__('Stop'),
|
||||||
cur_frm.cscript['Stop Material Request']);
|
me.frm.cscript['Stop Material Request']);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,8 +174,8 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
if(doc.docstatus == 1 && doc.status == 'Stopped')
|
||||||
cur_frm.add_custom_button(__('Re-open'),
|
me.frm.add_custom_button(__('Re-open'),
|
||||||
cur_frm.cscript['Unstop Material Request']);
|
me.frm.cscript['Unstop Material Request']);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -315,14 +315,14 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur
|
|||||||
|
|
||||||
cur_frm.cscript['Stop Material Request'] = function() {
|
cur_frm.cscript['Stop Material Request'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
$c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) {
|
$c('runserverobj', {'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) {
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
cur_frm.cscript['Unstop Material Request'] = function(){
|
cur_frm.cscript['Unstop Material Request'] = function(){
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
$c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': doc}, function(r,rt) {
|
$c('runserverobj', {'method':'update_status', 'arg': 'Submitted','docs': doc}, function(r,rt) {
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user