merge
This commit is contained in:
commit
6610d390e1
@ -47,7 +47,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
//---------------
|
||||
cur_frm.clear_custom_buttons()
|
||||
if(!doc.__islocal && !in_list(['Converted', 'Lead Lost'], doc.status)) {
|
||||
cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
|
||||
if (doc.source != 'Existing Customer') cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
|
||||
cur_frm.add_custom_button('Create Opportunity', cur_frm.cscript['Create Opportunity']);
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
}
|
||||
|
@ -86,15 +86,10 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
// stop
|
||||
if(doc.per_delivered < 100 || doc.per_billed < 100)
|
||||
cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Sales Order']);
|
||||
} else {
|
||||
|
||||
} else {
|
||||
// un-stop
|
||||
cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Sales Order']);
|
||||
}
|
||||
|
||||
unhide_field(['Send SMS', 'message', 'customer_mobile_no'])
|
||||
} else {
|
||||
hide_field(['Send SMS', 'message', 'customer_mobile_no'])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
|
||||
if(doc.per_installed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
|
||||
|
||||
if (doc.docstatus!=1) {
|
||||
hide_field(['Send SMS', 'message', 'customer_mobile_no');
|
||||
} else {
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
unhide_field(['Send SMS', 'message', 'customer_mobile_no');
|
||||
}
|
||||
if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
|
||||
if(doc.docstatus==0 && !doc.__islocal) {
|
||||
cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:36:48',
|
||||
'creation': '2012-04-02 16:02:43',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 14:36:48',
|
||||
'modified': '2012-04-16 13:36:48',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -23,7 +23,7 @@
|
||||
'name': '__common__',
|
||||
'section_style': u'Simple',
|
||||
'show_in_menu': 0,
|
||||
'version': 18
|
||||
'version': 19
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -95,7 +95,7 @@
|
||||
'fieldname': u'font',
|
||||
'fieldtype': u'Select',
|
||||
'label': u'Font',
|
||||
'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
|
||||
'options': u'\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
'fieldname': u'heading_font',
|
||||
'fieldtype': u'Select',
|
||||
'label': u'Heading Font',
|
||||
'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
|
||||
'options': u'\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
@ -153,4 +153,4 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
}
|
||||
]
|
||||
]
|
@ -1287,8 +1287,10 @@ function expand_doclist(docs){var l=[];for(var i=0;i<docs._vl.length;i++)
|
||||
l[l.length]=zip(docs._kl[docs._vl[i][0]],docs._vl[i]);return l;}
|
||||
function zip(k,v){var obj={};for(var i=0;i<k.length;i++){obj[k[i]]=v[i];}
|
||||
return obj;}
|
||||
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
|
||||
all_clear=tmp;}}
|
||||
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_reqd_ok=true;if(save_action!='Cancel'){for(var n in doclist){var reqd_ok=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_reqd_ok)
|
||||
all_reqd_ok=reqd_ok;}}
|
||||
if(!all_reqd_ok){onerr()
|
||||
return;}
|
||||
var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
|
||||
if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
|
||||
if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
|
||||
|
@ -828,8 +828,10 @@ function expand_doclist(docs){var l=[];for(var i=0;i<docs._vl.length;i++)
|
||||
l[l.length]=zip(docs._kl[docs._vl[i][0]],docs._vl[i]);return l;}
|
||||
function zip(k,v){var obj={};for(var i=0;i<k.length;i++){obj[k[i]]=v[i];}
|
||||
return obj;}
|
||||
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
|
||||
all_clear=tmp;}}
|
||||
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_reqd_ok=true;if(save_action!='Cancel'){for(var n in doclist){var reqd_ok=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_reqd_ok)
|
||||
all_reqd_ok=reqd_ok;}}
|
||||
if(!all_reqd_ok){onerr()
|
||||
return;}
|
||||
var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
|
||||
if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
|
||||
if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user