mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -162,7 +162,7 @@ cur_frm.cscript.conversion_rate = function(doc,cdt,cdn) {
|
||||
//==================== Item Code Get Query =======================================================
|
||||
// Only Is Purchase Item = 'Yes' and Items not moved to trash are allowed.
|
||||
cur_frm.fields_dict[fname].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
|
||||
return 'SELECT tabItem.name, tabItem.description FROM tabItem WHERE (ifnull(tabItem.is_purchase_item, "No")="Yes" or ifnull(tabItem.is_sub_contracted_item, "No")="Yes") AND (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` ="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND tabItem.%(key)s LIKE "%s" LIMIT 50'
|
||||
return 'SELECT tabItem.name, tabItem.description FROM tabItem WHERE (ifnull(tabItem.is_purchase_item, "No")="Yes" or ifnull(tabItem.is_sub_contracted_item, "No")="Yes") AND (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` ="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND tabItem.docstatus != 2 AND tabItem.%(key)s LIKE "%s" LIMIT 50'
|
||||
}
|
||||
|
||||
//==================== Get Item Code Details =====================================================
|
||||
|
||||
@@ -515,7 +515,7 @@ class DocType(TransactionBase):
|
||||
dt = webnotes.conn.sql("select posting_date from `tab%s` where name = '%s'" % (d.prevdoc_doctype, d.prevdoc_docname))
|
||||
else:
|
||||
dt = webnotes.conn.sql("select transaction_date from `tab%s` where name = '%s'" % (d.prevdoc_doctype, d.prevdoc_docname))
|
||||
d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''
|
||||
d.prevdoc_date = (dt and dt[0][0]) and dt[0][0].strftime('%Y-%m-%d') or ''
|
||||
|
||||
def update_prevdoc_detail(self, is_submit, obj):
|
||||
StatusUpdater(obj, is_submit).update()
|
||||
|
||||
@@ -59,8 +59,7 @@ class DocType:
|
||||
self.validate_item(s[0], count)
|
||||
self.validate_warehouse(s[1], count)
|
||||
|
||||
# encode as ascii
|
||||
self.data.append([d.encode("ascii") for d in s])
|
||||
self.data.append(s)
|
||||
count += 1
|
||||
|
||||
if not self.validated:
|
||||
|
||||
@@ -39,7 +39,8 @@ class DocType:
|
||||
self.doclist = doclist
|
||||
|
||||
def get_bin(self, item_code):
|
||||
bin = sql("select name from tabBin where item_code = '%s' and warehouse = '%s'" % (item_code, self.doc.name))
|
||||
bin = sql("select name from tabBin where item_code = %s and \
|
||||
warehouse = %s", (item_code, self.doc.name))
|
||||
bin = bin and bin[0][0] or ''
|
||||
if not bin:
|
||||
if not self.doc.warehouse_type :
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
.todoitem .ref_link {
|
||||
float: left;
|
||||
margin-left: 14px;
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
line-height: 18px;
|
||||
}
|
||||
@@ -28,4 +28,4 @@
|
||||
.todoitem .description {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,11 @@ erpnext.todo.ToDoItem = Class.extend({
|
||||
}
|
||||
todo.labelclass = label_map[todo.priority];
|
||||
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
|
||||
})
|
||||
} else { todo.fullname = ''; }
|
||||
if(todo.reference_name && todo.reference_type) {
|
||||
todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
|
||||
%(reference_type)s: %(reference_name)s</a>', todo);
|
||||
@@ -59,7 +64,7 @@ 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>\
|
||||
%(fullname)s%(description)s</span>\
|
||||
<span class="ref_link">→ \
|
||||
%(link)s</span>\
|
||||
<a href="#" class="close">×</a>\
|
||||
|
||||
@@ -2170,7 +2170,7 @@ wn.widgets.form.sidebar.AssignTo=Class.extend({init:function(parent,sidebar,doct
|
||||
doc.file_list=filename+','+fileid;doc.modified=new_timestamp;var frm=frms[doctype];frm.attachments.dialog.hide();msgprint('File Uploaded Sucessfully.');frm.refresh();}
|
||||
/*
|
||||
* lib/js/legacy/wn/widgets/form/assign_to.js
|
||||
*/
|
||||
*/
|
||||
wn.widgets.form.sidebar.AssignTo=Class.extend({init:function(parent,sidebar,doctype,docname){var me=this;this.doctype=doctype;this.name=docname;this.wrapper=$a(parent,'div','sidebar-comment-wrapper');this.body=$a(this.wrapper,'div');this.add_btn=$btn($a(this.wrapper,'div','sidebar-comment-message'),'Assign',function(){me.add();})
|
||||
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 \
|
||||
|
||||
@@ -1 +1 @@
|
||||
841
|
||||
842
|
||||
Reference in New Issue
Block a user