Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
5a376f0cdb
@ -101,8 +101,11 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
onrender: function(treenode) {
|
onrender: function(treenode) {
|
||||||
if (ctype == 'Account') {
|
if (ctype == 'Account') {
|
||||||
var bal = treenode.data && treenode.data.balance.split(' ') || ['',''];
|
var bal = treenode.data && treenode.data.balance.split(' ') || ['',''];
|
||||||
treenode.parent.append('<span class="balance-area"><span style="color: #aaa">'+ bal[0] + '</span> '
|
if (bal && flt(bal[1])) {
|
||||||
+ bal[1] + '</span>');
|
treenode.parent.append('<span class="balance-area">\
|
||||||
|
<span style="color: #aaa">'+ bal[0] + '</span> '
|
||||||
|
+ fmt_money(bal[1]) + '</span>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -12,8 +12,9 @@ wn.doclistviews['Employee'] = wn.views.ListView.extend({
|
|||||||
"`tabEmployee`.company",
|
"`tabEmployee`.company",
|
||||||
"`tabEmployee`.reports_to",
|
"`tabEmployee`.reports_to",
|
||||||
"`tabEmployee`.date_of_joining",
|
"`tabEmployee`.date_of_joining",
|
||||||
|
"`tabEmployee`.status",
|
||||||
]);
|
]);
|
||||||
this.stats = this.stats.concat(['company']);
|
this.stats = this.stats.concat(['status', 'company']);
|
||||||
},
|
},
|
||||||
|
|
||||||
prepare_data: function(data) {
|
prepare_data: function(data) {
|
||||||
@ -32,14 +33,22 @@ wn.doclistviews['Employee'] = wn.views.ListView.extend({
|
|||||||
data.company && concat_list.push(data.company);
|
data.company && concat_list.push(data.company);
|
||||||
data.branch && concat_list.push(data.branch);
|
data.branch && concat_list.push(data.branch);
|
||||||
data.description = concat_list.join(", ");
|
data.description = concat_list.join(", ");
|
||||||
|
|
||||||
|
if(data.status=='Left') {
|
||||||
|
data.label_type = 'important';
|
||||||
|
} else if(data.status=='Active') {
|
||||||
|
data.label_type = 'success';
|
||||||
|
}
|
||||||
|
data.status_html = repl('<span class="label label-%(label_type)s" \
|
||||||
|
support_list_status="%(status)s">%(status)s</span>', data);
|
||||||
},
|
},
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{width: '3%', content: 'check'},
|
{width: '3%', content: 'check'},
|
||||||
{width: '3%', content: 'docstatus'},
|
|
||||||
{width: '12%', content: 'name'},
|
{width: '12%', content: 'name'},
|
||||||
{width: '25%', content: 'employee_name'},
|
{width: '25%', content: 'employee_name'},
|
||||||
{width: '45%', content: 'description+tags',
|
{width: '10%', content: 'status_html'},
|
||||||
|
{width: '38%', content: 'description+tags',
|
||||||
css: {'color': '#aaa'}},
|
css: {'color': '#aaa'}},
|
||||||
{width: '12%', content:'date_of_joining',
|
{width: '12%', content:'date_of_joining',
|
||||||
css: {'text-align': 'right', 'color': '#777'}},
|
css: {'text-align': 'right', 'color': '#777'}},
|
||||||
|
|||||||
11
erpnext/patches/june_2012/cache_item_table.py
Normal file
11
erpnext/patches/june_2012/cache_item_table.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
def execute():
|
||||||
|
"""drop and create __CacheItem table again"""
|
||||||
|
import webnotes
|
||||||
|
webnotes.conn.commit()
|
||||||
|
webnotes.conn.sql("drop table __CacheItem")
|
||||||
|
webnotes.conn.sql("""create table __CacheItem(
|
||||||
|
`key` VARCHAR(180) NOT NULL PRIMARY KEY,
|
||||||
|
`value` LONGTEXT,
|
||||||
|
`expires_on` DATETIME
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8""")
|
||||||
|
webnotes.conn.begin()
|
||||||
@ -457,4 +457,9 @@ patch_list = [
|
|||||||
'patch_file': 'delete_about_contact',
|
'patch_file': 'delete_about_contact',
|
||||||
'description': "delete depracated doctypes of website module"
|
'description': "delete depracated doctypes of website module"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.june_2012',
|
||||||
|
'patch_file': 'cache_item_table',
|
||||||
|
'description': "create cache item table again"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
@ -52,6 +52,14 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||||
|
if(!doc.amended_from) {
|
||||||
|
hide_field('misc_details');
|
||||||
|
} else {
|
||||||
|
unhide_field('misc_details');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cur_frm.cscript.update_item_details = function(doc) {
|
cur_frm.cscript.update_item_details = function(doc) {
|
||||||
$c_obj(make_doclist(doc.doctype, doc.name), 'update_item_details', '', function(r, rt) {
|
$c_obj(make_doclist(doc.doctype, doc.name), 'update_item_details', '', function(r, rt) {
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2012-03-27 14:36:34',
|
'creation': '2012-05-15 12:15:08',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-27 14:45:49',
|
'modified': '2012-06-29 12:24:16',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@ -15,6 +15,7 @@
|
|||||||
'_last_update': u'1328091392',
|
'_last_update': u'1328091392',
|
||||||
'autoname': u'PS.#######',
|
'autoname': u'PS.#######',
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
'description': u'Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'document_type': u'Transaction',
|
'document_type': u'Transaction',
|
||||||
'is_submittable': 1,
|
'is_submittable': 1,
|
||||||
@ -26,7 +27,7 @@
|
|||||||
'section_style': u'Simple',
|
'section_style': u'Simple',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': u'[%(delivery_note)s] Case Nos: %(from_case_no)s - %(to_case_no)s | Net Weight: %(net_weight_pkg)s %(net_weight_uom)s | Gross Weight: %(gross_weight_pkg)s %(gross_weight_uom)s',
|
'subject': u'[%(delivery_note)s] Case Nos: %(from_case_no)s - %(to_case_no)s | Net Weight: %(net_weight_pkg)s %(net_weight_uom)s | Gross Weight: %(gross_weight_pkg)s %(gross_weight_uom)s',
|
||||||
'version': 40
|
'version': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -140,6 +141,8 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'description': u'Indicates that the package is a part of this delivery',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'delivery_note',
|
'fieldname': u'delivery_note',
|
||||||
'fieldtype': u'Link',
|
'fieldtype': u'Link',
|
||||||
@ -190,10 +193,11 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
'description': u'Identification of the package for the delivery (for print)',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'from_case_no',
|
'fieldname': u'from_case_no',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
'label': u'From Case No.',
|
'label': u'From Package No.',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'reqd': 1,
|
'reqd': 1,
|
||||||
@ -211,10 +215,11 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
'description': u'If more than one package of the same type (for print)',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'to_case_no',
|
'fieldname': u'to_case_no',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
'label': u'To Case No.',
|
'label': u'To Package No.',
|
||||||
'no_copy': 1,
|
'no_copy': 1,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'width': u'50px'
|
'width': u'50px'
|
||||||
@ -251,6 +256,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
'description': u'The net weight of this package. (calculated automatically as sum of net weight of items)',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'net_weight_pkg',
|
'fieldname': u'net_weight_pkg',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
@ -281,6 +287,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
|
'description': u'The gross weight of the package. Usually net weight + packaging material weight. (for print)',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'gross_weight_pkg',
|
'fieldname': u'gross_weight_pkg',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
@ -303,7 +310,7 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'depends_on': u'eval:doc.amended_from',
|
'colour': u'White:FFF',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'misc_details',
|
'fieldname': u'misc_details',
|
||||||
'fieldtype': u'Section Break',
|
'fieldtype': u'Section Break',
|
||||||
|
|||||||
@ -29,10 +29,7 @@ wn.doclistviews['Support Ticket'] = wn.views.ListView.extend({
|
|||||||
data.status = 'Waiting'
|
data.status = 'Waiting'
|
||||||
}
|
}
|
||||||
data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
|
data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
|
||||||
var a = $(data.status_html).click(function() {
|
|
||||||
me.set_filter('status', $(this).text());
|
|
||||||
});
|
|
||||||
|
|
||||||
// escape double quotes
|
// escape double quotes
|
||||||
data.description = cstr(data.subject).replace(/"/gi, '\"')
|
data.description = cstr(data.subject).replace(/"/gi, '\"')
|
||||||
+ " | " + cstr(data.description).replace(/"/gi, '\"');
|
+ " | " + cstr(data.description).replace(/"/gi, '\"');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user