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

File diff suppressed because it is too large Load Diff

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"]
}
}
};