Fixed indicators & List view in Time Log, Time Log Batch

This commit is contained in:
Neil Trini Lasrado 2016-01-29 15:02:28 +05:30
parent 172efb1e87
commit 5b7d0a960e
3 changed files with 883 additions and 869 deletions

View File

@ -69,7 +69,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"in_list_view": 0,
"label": "Project",
"length": 0,
"no_copy": 0,
@ -897,7 +897,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-01-14 04:40:47.439032",
"modified": "2016-01-29 04:05:43.489154",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log",
@ -946,5 +946,6 @@
],
"read_only": 0,
"read_only_onload": 0,
"sort_order": "ASC",
"title_field": "title"
}

View File

@ -4,6 +4,17 @@
// render
frappe.listview_settings['Time Log'] = {
add_fields: ["status", "billable", "activity_type", "task", "project", "hours", "for_manufacturing", "billing_amount"],
get_indicator: function(doc) {
if (doc.status== "Batched for Billing") {
return [__("Batched for Billing"), "darkgrey", "status,=,Batched for Billing"]
} else if (doc.status== "Billed") {
return [__("Billed"), "green", "status,=,Billed"]
} else if (doc.status== "Submitted" && doc.billable) {
return [__("Billable"), "orange", "billable,=,1"]
}
},
selectable: true,
onload: function(me) {
me.page.add_menu_item(__("Make Time Log Batch"), function() {

View File

@ -1,6 +1,8 @@
frappe.listview_settings['Time Log Batch'] = {
add_fields: ["status", "total_hours"],
get_indicator: function(doc) {
return [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
if (doc.status== "Billed") {
return [__("Billed"), "green", "status,=," + "Billed"]
}
}
};