mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-02 08:03:21 +00:00
merge
This commit is contained in:
@@ -162,7 +162,7 @@ cur_frm.cscript.is_opening = function(doc, dt, dn) {
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ fld.get_query = function(doc, cdt, cdn) {
|
||||
+'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 @@ fld.get_query = function(doc, cdt, cdn) {
|
||||
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'
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,15 @@ erpnext.todo.ToDoItem = Class.extend({
|
||||
'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 @@ erpnext.todo.ToDoItem = Class.extend({
|
||||
<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));
|
||||
|
||||
@@ -81,12 +81,12 @@ class TransactionBase:
|
||||
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:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user