merge
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
index bdb4e41..2715bfd 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
@@ -162,7 +162,7 @@
// Recalculate Button
// -------------------
-cur_frm.cscript['Recalculate'] = function(doc, dt, dn) {
+cur_frm.cscript['Recalculate'] = function(doc, cdt, cdn) {
cur_frm.cscript['Calculate Tax'](doc,cdt,cdn);
calc_total_advance(doc,cdt,cdn);
}
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 3593fa0..07e83ed 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -111,6 +111,7 @@
+'AND ifnull(`tabBin`.`actual_qty`,0) > 0 '
+'AND tabBin.warehouse="'+ d.s_warehouse +'" '
+'AND tabItem.docstatus < 2 '
+ +'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC '
+'LIMIT 50'
@@ -118,6 +119,7 @@
return 'SELECT tabItem.name, tabItem.description '
+'FROM tabItem '
+'WHERE tabItem.docstatus < 2 '
+ +'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC '
+'LIMIT 50'
diff --git a/erpnext/utilities/page/todo/todo.css b/erpnext/utilities/page/todo/todo.css
index b7c9f20..704e600 100644
--- a/erpnext/utilities/page/todo/todo.css
+++ b/erpnext/utilities/page/todo/todo.css
@@ -21,7 +21,7 @@
.todoitem .ref_link {
float: left;
- margin-left: 14px;
+ margin-left: 10px;
display: inline-block;
line-height: 18px;
}
@@ -29,4 +29,4 @@
.todoitem .description {
cursor: pointer;
float: left;
-}
\ No newline at end of file
+}
diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js
index dfaa7cd..d9fd7a7 100644
--- a/erpnext/utilities/page/todo/todo.js
+++ b/erpnext/utilities/page/todo/todo.js
@@ -45,10 +45,15 @@
'Low':''
}
todo.labelclass = label_map[todo.priority];
- todo.userdate = dateutil.str_to_user(todo.date);
+ todo.userdate = dateutil.str_to_user(todo.date) || '';
+ if(todo.assigned_by) {
+ todo.fullname = repl("[By %(fullname)s] ", {
+ fullname: wn.boot.user_info[todo.assigned_by].fullname
+ })
+ }
if(todo.reference_name && todo.reference_type) {
todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
- %(reference_name)s</a>', todo);
+ %(reference_type)s: %(reference_name)s</a>', todo);
} else if(todo.reference_type) {
todo.link = repl('<a href="#!List/%(reference_type)s">\
%(reference_type)s</a>', todo);
@@ -59,8 +64,8 @@
<span class="description">\
<span class="label %(labelclass)s">%(priority)s</span>\
<span class="help" style="margin-right: 7px">%(userdate)s</span>\
- %(description)s</span>\
- <span class="ref_link">→\
+ %(fullname)s%(description)s</span>\
+ <span class="ref_link">→ \
%(link)s</span>\
<a href="#" class="close">×</a>\
</div>', todo));
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index ee23c75..032b52f 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -81,12 +81,12 @@
cond = 'name="%s"' % address_name
if is_shipping_address:
- details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone from `tabAddress` where %s and docstatus != 2 order by is_shipping_address desc limit 1" % cond, as_dict = 1)
+ details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_shipping_address desc limit 1" % cond, as_dict = 1)
else:
- details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone from `tabAddress` where %s and docstatus != 2 order by is_primary_address desc limit 1" % cond, as_dict = 1)
+ details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_primary_address desc limit 1" % cond, as_dict = 1)
extract = lambda x: details and details[0] and details[0].get(x,'') or ''
- address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','phone')]
+ address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','phone'),('\nFax: ', 'fax')]
address_display = ''.join([a[0]+extract(a[1]) for a in address_fields if extract(a[1])])
if address_display.startswith('\n'): address_display = address_display[1:]
diff --git a/js/all-app.js b/js/all-app.js
index 9d45d31..684cce8 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -2148,7 +2148,7 @@
this.refresh();},refresh:function(){var me=this;$c('webnotes.widgets.form.assign_to.get',{doctype:me.doctype,name:me.name},function(r,rt){me.render(r.message)})},render:function(d){var me=this;$(this.body).empty();if(this.dialog){this.dialog.hide();}
for(var i=0;i<d.length;i++){$(this.body).append(repl('<div>%(owner)s \
<a class="close" href="#" data-owner="%(owner)s">×</a></div>',d[i]))}
-$(this.body).find('a.close').click(function(){$c('webnotes.widgets.form.assign_to.remove',{doctype:me.doctype,name:me.name,assign_to:$(this).attr('data-owner')},function(r,rt){me.render(r.message);});return false;});},add:function(){var me=this;if(!me.dialog){me.dialog=new wn.widgets.Dialog({title:'Add to To Do',width:350,fields:[{fieldtype:'Link',fieldname:'assign_to',options:'Profile',label:'Assign To',description:'Add to To Do List of',reqd:true},{fieldtype:'Data',fieldname:'description',label:'Comment','default':'Assigned by '+user},{fieldtype:'Date',fieldname:'date',label:'Complete By'},{fieldtype:'Select',fieldname:'priority',label:'Priority',options:'Low\nMedium\nHigh','default':'Medium'},{fieldtype:'Check',fieldname:'notify',label:'Notify By Email'},{fieldtype:'Button',label:'Add',fieldname:'add_btn'}]});me.dialog.fields_dict.add_btn.input.onclick=function(){var assign_to=me.dialog.fields_dict.assign_to.get_value();if(assign_to){$c('webnotes.widgets.form.assign_to.add',{doctype:me.doctype,name:me.name,assign_to:assign_to,description:me.dialog.fields_dict.description.get_value(),priority:me.dialog.fields_dict.priority.get_value(),date:me.dialog.fields_dict.date.get_value(),notify:me.dialog.fields_dict.notify.get_value()},function(r,rt){me.render(r.message);});}}}
+$(this.body).find('a.close').click(function(){$c('webnotes.widgets.form.assign_to.remove',{doctype:me.doctype,name:me.name,assign_to:$(this).attr('data-owner')},function(r,rt){me.render(r.message);});return false;});},add:function(){var me=this;if(!me.dialog){me.dialog=new wn.widgets.Dialog({title:'Add to To Do',width:350,fields:[{fieldtype:'Link',fieldname:'assign_to',options:'Profile',label:'Assign To',description:'Add to To Do List of',reqd:true},{fieldtype:'Data',fieldname:'description',label:'Comment'},{fieldtype:'Date',fieldname:'date',label:'Complete By'},{fieldtype:'Select',fieldname:'priority',label:'Priority',options:'Low\nMedium\nHigh','default':'Medium'},{fieldtype:'Check',fieldname:'notify',label:'Notify By Email'},{fieldtype:'Button',label:'Add',fieldname:'add_btn'}]});me.dialog.fields_dict.add_btn.input.onclick=function(){var assign_to=me.dialog.fields_dict.assign_to.get_value();if(assign_to){$c('webnotes.widgets.form.assign_to.add',{doctype:me.doctype,name:me.name,assign_to:assign_to,description:me.dialog.fields_dict.description.get_value(),priority:me.dialog.fields_dict.priority.get_value(),date:me.dialog.fields_dict.date.get_value(),notify:me.dialog.fields_dict.notify.get_value()},function(r,rt){me.render(r.message);});}}}
me.dialog.clear();me.dialog.show();}});
/*
* lib/js/legacy/app.js
diff --git a/version.num b/version.num
index 39bc2a1..97dc468 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-1339
\ No newline at end of file
+1339