[enhance] close purchase order

This commit is contained in:
Saurabh
2015-10-19 15:16:17 +05:30
parent c6dbe70256
commit 98b287565a
6 changed files with 36 additions and 19 deletions

View File

@@ -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);