mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
[enhance] close purchase order
This commit is contained in:
@@ -236,6 +236,21 @@ cur_frm.cscript['Stop Sales Order'] = function() {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript['Unstop Sales Order'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
|
||||
var check = confirm(__("Are you sure you want to UNSTOP ") + doc.name);
|
||||
|
||||
if (check) {
|
||||
return $c('runserverobj', {
|
||||
'method':'unstop_sales_order',
|
||||
'docs': doc
|
||||
}, function(r,rt) {
|
||||
cur_frm.refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript['Close Sales Order'] = function(){
|
||||
var doc = cur_frm.doc;
|
||||
|
||||
@@ -252,21 +267,6 @@ cur_frm.cscript['Close Sales Order'] = function(){
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript['Unstop Sales Order'] = function() {
|
||||
var doc = cur_frm.doc;
|
||||
|
||||
var check = confirm(__("Are you sure you want to UNSTOP ") + doc.name);
|
||||
|
||||
if (check) {
|
||||
return $c('runserverobj', {
|
||||
'method':'unstop_sales_order',
|
||||
'docs': doc
|
||||
}, function(r,rt) {
|
||||
cur_frm.refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
if(cint(frappe.boot.notification_settings.sales_order)) {
|
||||
cur_frm.email_doc(frappe.boot.notification_settings.sales_order_message);
|
||||
|
||||
Reference in New Issue
Block a user