merge
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index d33478f..e97aea5 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -47,7 +47,7 @@
//---------------
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);
}
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index a18f079..91d3fd5 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -86,15 +86,10 @@
// 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'])
+ }
}
}
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 99c0a73..e030fc1 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -63,12 +63,7 @@
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']);
diff --git a/erpnext/website/doctype/style_settings/style_settings.txt b/erpnext/website/doctype/style_settings/style_settings.txt
index 18a4d1a..b87a02c 100644
--- a/erpnext/website/doctype/style_settings/style_settings.txt
+++ b/erpnext/website/doctype/style_settings/style_settings.txt
@@ -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
}
-]
+]
\ No newline at end of file
diff --git a/js/all-app.js b/js/all-app.js
index b4363d6..b5942dd 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -1287,8 +1287,10 @@
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();}}
diff --git a/js/all-web.js b/js/all-web.js
index 158fc84..1497c9c 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -828,8 +828,10 @@
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();}}