[ui] [listviews] indicators
This commit is contained in:
parent
50d7e8cf8f
commit
738d4ef5c8
@ -38,7 +38,7 @@
|
||||
"fieldname": "voucher_type",
|
||||
"fieldtype": "Select",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Voucher Type",
|
||||
"oldfieldname": "voucher_type",
|
||||
"oldfieldtype": "Select",
|
||||
@ -61,7 +61,7 @@
|
||||
"fieldname": "posting_date",
|
||||
"fieldtype": "Date",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Posting Date",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "posting_date",
|
||||
@ -154,7 +154,7 @@
|
||||
"fieldname": "cheque_no",
|
||||
"fieldtype": "Data",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Reference Number",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "cheque_no",
|
||||
@ -177,6 +177,7 @@
|
||||
"fieldname": "user_remark",
|
||||
"fieldtype": "Small Text",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "User Remark",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "user_remark",
|
||||
@ -448,7 +449,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-01-05 10:54:54.294810",
|
||||
"modified": "2015-01-06 12:01:51.379685",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Journal Entry",
|
||||
|
@ -1,15 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12 col-sm-5 text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
<div class="col-sm-5 hidden-xs">
|
||||
{% if(doc.docstatus===0) { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="docstatus,=,0">{%= __("Draft") %}</span><br>
|
||||
{% } %}
|
||||
{%= doc.user_remark %}
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs text-right">
|
||||
{%= doc.get_formatted("total_debit") %}
|
||||
</div>
|
||||
</div>
|
@ -51,7 +51,7 @@
|
||||
"fieldname": "supplier_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Name",
|
||||
"oldfieldname": "supplier_name",
|
||||
"oldfieldtype": "Data",
|
||||
@ -476,7 +476,7 @@
|
||||
"fieldname": "outstanding_amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Outstanding Amount",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "outstanding_amount",
|
||||
@ -880,7 +880,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-01-05 10:57:10.892210",
|
||||
"modified": "2015-01-06 17:07:12.151596",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice",
|
||||
|
@ -1,43 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-8">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
|
||||
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
|
||||
<span class="indicator red filterable"
|
||||
title="{%= doc.get_formatted("due_date")%}"
|
||||
data-filter="outstanding_amount,>,0|due_date,<,Today">
|
||||
{%= __("Overdue: ") + comment_when(doc.due_date) %}
|
||||
</span>
|
||||
{% } else { %}
|
||||
<span class="indictator orange filterable"
|
||||
data-filter="outstanding_amount,>,0|due,>=,Today"
|
||||
title="{%= __("Payment Pending") %}">
|
||||
{%= doc.get_formatted("due_date") %}</span>
|
||||
{% } %}
|
||||
{% } %}
|
||||
{% if(doc.outstanding_amount==0 && doc.docstatus==1) { %}
|
||||
<span class="indicator green filterable"
|
||||
title="{%= doc.get_formatted("due_date")%}"
|
||||
data-filter="outstanding_amount,=,0">
|
||||
{%= __("Paid") %}
|
||||
</span>
|
||||
{% } %}
|
||||
{% if(doc.docstatus===0) { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
<!-- <div class="col-xs-1 text-right">
|
||||
{% var completed = cint((doc.grand_total - doc.outstanding_amount) * 100 / doc.grand_total), title = __("Outstanding Amount") + ": " + doc.get_formatted("outstanding_amount") %}
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div> -->
|
||||
<div class="col-xs-2 text-right">
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
|
||||
{%= doc.get_formatted("grand_total_import") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -4,5 +4,16 @@
|
||||
// render
|
||||
frappe.listview_settings['Purchase Invoice'] = {
|
||||
add_fields: ["supplier", "supplier_name", "grand_total", "outstanding_amount", "due_date", "company",
|
||||
"currency"]
|
||||
"currency"],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.outstanding_amount > 0 && doc.docstatus==1) {
|
||||
if(frappe.datetime.get_diff(doc.due_date) < 0) {
|
||||
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<,Today"];
|
||||
} else {
|
||||
return [__("Unpaid"), "orange", "outstanding_amount,>,0|due,>=,Today"];
|
||||
}
|
||||
} else if(doc.outstanding_amount==0 && doc.docstatus==1) {
|
||||
return [__("Paid"), "green", "outstanding_amount,=,0"];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -45,7 +45,7 @@
|
||||
"fieldname": "customer_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Name",
|
||||
"oldfieldname": "customer_name",
|
||||
"oldfieldtype": "Data",
|
||||
@ -515,7 +515,7 @@
|
||||
{
|
||||
"fieldname": "outstanding_amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Outstanding Amount",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "outstanding_amount",
|
||||
@ -1192,7 +1192,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-01-05 10:57:31.054236",
|
||||
"modified": "2015-01-06 11:55:32.975513",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
|
@ -1,43 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-8">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
|
||||
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
|
||||
<span class="indicator red filterable"
|
||||
title="{%= doc.get_formatted("due_date")%}"
|
||||
data-filter="outstanding_amount,>,0|due_date,<,Today">
|
||||
{%= __("Overdue") %}
|
||||
</span>
|
||||
{% } else { %}
|
||||
<span class="indicator orange filterable"
|
||||
data-filter="outstanding_amount,>,0|due_date,>=,Today"
|
||||
title="{%= __("Payment Pending") %}">
|
||||
{%= doc.get_formatted("due_date") %}</span>
|
||||
{% } %}
|
||||
{% } %}
|
||||
{% if(doc.outstanding_amount==0 && doc.docstatus==1) { %}
|
||||
<span class="indicator green filterable"
|
||||
title="{%= doc.get_formatted("due_date")%}"
|
||||
data-filter="outstanding_amount,=,0">
|
||||
{%= __("Paid") %}
|
||||
</span>
|
||||
{% } %}
|
||||
{% if(doc.docstatus===0) { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
<!-- <div class="col-xs-1 text-right">
|
||||
{% var completed = cint((doc.grand_total - doc.outstanding_amount) * 100 / doc.grand_total), title = __("Outstanding Amount") + ": " + doc.get_formatted("outstanding_amount") %}
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div> -->
|
||||
<div class="col-xs-2 text-right">
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted("grand_total_export") %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -5,5 +5,14 @@
|
||||
frappe.listview_settings['Sales Invoice'] = {
|
||||
add_fields: ["customer", "customer_name", "grand_total", "outstanding_amount", "due_date", "company",
|
||||
"currency"],
|
||||
filters: [["outstanding_amount", ">", "0"]]
|
||||
filters: [["outstanding_amount", ">", "0"]],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.outstanding_amount==0) {
|
||||
return [__("Paid"), "green", "oustanding_amount,=,0"]
|
||||
} else if (doc.outstanding_amount > 0 && doc.due_date > frappe.datetime.get_today()) {
|
||||
return [__("Unpaid"), "orange", "oustanding_amount,>,0|due_date,>,Today"]
|
||||
} else if (doc.outstanding_amount > 0 && doc.due_date <= frappe.datetime.get_today()) {
|
||||
return [__("Overdue"), "red", "oustanding_amount,>,0|due_date,<=,Today"]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@
|
||||
{
|
||||
"fieldname": "supplier_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Name",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "supplier_name",
|
||||
@ -183,7 +183,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2014-12-24 16:23:47.943887",
|
||||
"modified": "2015-01-06 17:32:39.936580",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier",
|
||||
|
@ -1,15 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-sm-8 col-xs-12 text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
{% if(doc.supplier_name != doc.name) { %}
|
||||
<span style="margin-right: 8px; display: inline-block">
|
||||
{%= doc.supplier_name %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
<div class="col-sm-4 hidden-xs">
|
||||
<span class="indicator darkgrey filterable"
|
||||
data-filter="supplier_type,=,{%= doc.supplier_type %}">
|
||||
{%= doc.supplier_type %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
@ -31,7 +31,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Full Name",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "customer_name",
|
||||
@ -78,6 +78,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Customer Group",
|
||||
"oldfieldname": "customer_group",
|
||||
"oldfieldtype": "Link",
|
||||
@ -266,7 +267,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2015-01-01 14:30:00.368262",
|
||||
"modified": "2015-01-06 17:08:55.045595",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Customer",
|
||||
|
@ -1,28 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
{% if(doc.customer_name != doc.name) { %}
|
||||
<span style="margin-right: 8px; display: inline-block">
|
||||
{%= doc.customer_name %}</span>
|
||||
{% } %}
|
||||
<span style="margin-right: 8px; display: inline-block"
|
||||
title="{%= doc.customer_type %}" class="filterable"
|
||||
data-filter="customer_type,=,{%= doc.customer_type %}">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs text-ellipsis">
|
||||
<span class="indicator darkgrey filterable"
|
||||
data-filter="customer_group,=,{%= doc.customer_group %}">
|
||||
{%= doc.customer_group %}</span>
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs text-ellipsis">
|
||||
{% if(doc.territory) { %}
|
||||
<a class="h6 text-muted filterable"
|
||||
data-filter="territory,=,{%= doc.territory %}">
|
||||
<i class="icon-map-marker"></i>
|
||||
{%= doc.territory %}</a>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
@ -28,7 +28,7 @@
|
||||
"fieldname": "lead_name",
|
||||
"fieldtype": "Data",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Name",
|
||||
"oldfieldname": "lead_name",
|
||||
"oldfieldtype": "Data",
|
||||
@ -63,7 +63,7 @@
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Status",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "status",
|
||||
@ -77,7 +77,7 @@
|
||||
"fieldname": "source",
|
||||
"fieldtype": "Select",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Source",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "source",
|
||||
@ -331,7 +331,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2015-01-01 14:30:02.458843",
|
||||
"modified": "2015-01-06 17:13:05.622160",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Lead",
|
||||
|
@ -1,12 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12 col-sm-9 text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
<span style="margin-right: 8px; display: inline-block">
|
||||
{%= doc.company_name %}</span>
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs">
|
||||
<span class="indicator
|
||||
{%= doc.status=="Open" ? "red" : "darkgrey" %} filterable"
|
||||
data-filter="status,=,{%= doc.status %}">{%= __(doc.status) %}</span>
|
||||
</div>
|
||||
</div>
|
@ -1,3 +1,9 @@
|
||||
frappe.listview_settings['Lead'] = {
|
||||
add_fields: ["territory", "company_name", "status", "source"]
|
||||
add_fields: ["territory", "company_name", "status", "source"],
|
||||
get_indicator: function(doc) {
|
||||
var indicator = [__(doc.status), "darkgrey", "status,=," + doc.status];
|
||||
if(doc.status==="Open") indicator[1] = "red";
|
||||
if(doc.status==="Opportunity") indicator[1] = "green";
|
||||
return indicator;
|
||||
}
|
||||
};
|
||||
|
@ -81,7 +81,7 @@
|
||||
"fieldname": "customer_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer / Lead Name",
|
||||
"permlevel": 0,
|
||||
"read_only": 1
|
||||
@ -800,7 +800,7 @@
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"max_attachments": 1,
|
||||
"modified": "2015-01-05 12:33:02.162194",
|
||||
"modified": "2015-01-06 17:17:04.598365",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Quotation",
|
||||
|
@ -1,16 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12 col-sm-8 text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
<span class="indicator {%= doc.status=="Draft" ? "red" :
|
||||
(doc.status=="Ordered" ? "green": "blue") %}
|
||||
filterable"
|
||||
data-filter="status,=,{%= doc.status %}">{%= __(doc.status) %}</span>
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs text-right">
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_export') %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,4 +1,11 @@
|
||||
frappe.listview_settings['Quotation'] = {
|
||||
add_fields: ["customer_name", "quotation_to", "grand_total", "status",
|
||||
"company", "currency", "order_type", "lead", "customer"]
|
||||
add_fields: ["customer_name", "grand_total", "status",
|
||||
"company", "currency"],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.status==="Ordered") {
|
||||
return [__("Ordered"), "green", "status,=,Ordered"];
|
||||
} else if(doc.status==="Lost") {
|
||||
return [__("Lost"), "darkgrey", "status,=,Lost"];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -38,7 +38,7 @@
|
||||
"fieldname": "customer",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer",
|
||||
"oldfieldname": "customer",
|
||||
"oldfieldtype": "Link",
|
||||
@ -93,7 +93,7 @@
|
||||
"default": "Sales",
|
||||
"fieldname": "order_type",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Order Type",
|
||||
"oldfieldname": "order_type",
|
||||
"oldfieldtype": "Select",
|
||||
@ -509,6 +509,7 @@
|
||||
{
|
||||
"fieldname": "grand_total_export",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Grand Total",
|
||||
"oldfieldname": "grand_total_export",
|
||||
"oldfieldtype": "Currency",
|
||||
@ -1021,7 +1022,7 @@
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"issingle": 0,
|
||||
"modified": "2015-01-05 12:25:02.687860",
|
||||
"modified": "2015-01-06 17:28:44.639230",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Sales Order",
|
||||
|
@ -1,35 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs text-ellipsis">
|
||||
{% if(doc.per_delivered < 100 && doc.status!=="Stopped" &&
|
||||
frappe.datetime.get_diff(doc.delivery_date) < 0) { %}
|
||||
<span class="indicator red filterable"
|
||||
title="{%= doc.get_formatted("delivery_date")%}"
|
||||
data-filter="per_delivered,<,100|delivery_date,<,Today|status,!=,Stopped">
|
||||
{%= __("Overdue") %}
|
||||
</span>
|
||||
{% } else if(doc.per_delivered < 100 && doc.status!=="Stopped") { %}
|
||||
<span class="indicator orange filterable"
|
||||
data-filter="per_delivered,<,100|status,!=,Stopped"
|
||||
title="{%= __("Pending") %}">
|
||||
{%= doc.get_formatted("delivery_date") || "Pending" %}</span>
|
||||
{% } else if(doc.per_delivered == 100 && doc.status!=="Stopped") { %}
|
||||
<span class="filterable indicator green"
|
||||
data-filter="per_delivered,=,100|status,!=,Stopped">
|
||||
{%= __("Delivered") %}
|
||||
</span>
|
||||
{% } else if(doc.status==="Stopped") { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="status,=,Stopped">{%= __("Stopped") %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs text-ellipsis text-right">
|
||||
<div title="{%= doc.get_formatted('grand_total_export') %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,6 +1,18 @@
|
||||
frappe.listview_settings['Sales Order'] = {
|
||||
add_fields: ["`tabSales Order`.`grand_total`", "`tabSales Order`.`company`", "`tabSales Order`.`currency`",
|
||||
"`tabSales Order`.`customer`", "`tabSales Order`.`customer_name`", "`tabSales Order`.`per_delivered`",
|
||||
"`tabSales Order`.`per_billed`", "`tabSales Order`.`delivery_date`"],
|
||||
filters: [["per_delivered", "<", 100]]
|
||||
add_fields: ["grand_total", "customer_name", "currency", "delivery_date", "per_delivered", "per_billed",
|
||||
"status"],
|
||||
filters: [["per_delivered", "<", 100]],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.status==="Stopped") {
|
||||
return [__("Stopped"), "red", "status,=,Stopped"];
|
||||
} else if(doc.per_delivered < 100 && frappe.datetime.get_diff(doc.delivery_date) < 0) {
|
||||
return [__("Overdue"), "red", "per_delivered,<,100|delivery_date,<,Today|status,!=,Stopped"];
|
||||
} else if(doc.per_delivered < 100 && doc.status!=="Stopped") {
|
||||
return [__("Not Delivered"), "orange", "per_delivered,<,100|status,!=,Stopped"];
|
||||
} else if(doc.per_delivered == 100 && doc.per_billed < 100 && doc.status!=="Stopped") {
|
||||
return [__("To Bill"), "orange", "per_delivered,=,100|per_billed,<,100|status,!=,Stopped"];
|
||||
} else if(doc.per_delivered == 100 && doc.per_billed == 100 && doc.status!=="Stopped") {
|
||||
return [__("Completed"), "green", "per_delivered,=,100|per_billed,=,100|status,!=,Stopped"];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -53,7 +53,7 @@
|
||||
"fieldname": "customer_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Name",
|
||||
"permlevel": 0,
|
||||
"read_only": 1
|
||||
@ -531,6 +531,7 @@
|
||||
{
|
||||
"fieldname": "grand_total_export",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Grand Total",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "grand_total_export",
|
||||
@ -1013,7 +1014,7 @@
|
||||
"idx": 1,
|
||||
"in_create": 0,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-01-05 15:51:31.663904",
|
||||
"modified": "2015-01-06 17:34:32.623408",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Delivery Note",
|
||||
|
@ -1,28 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-8">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
{% if(doc.transporter_name) { %}
|
||||
<span style="margin-right: 8px;"
|
||||
title="{%= doc.transporter_name %}" class="filterable"
|
||||
data-filter="transporter_name,=,{%= doc.transporter_name %}">
|
||||
<i class="icon-truck text-muted"></i>
|
||||
</span>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
{% if(doc.docstatus===0) { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
|
||||
{% } else if(doc.docstatus===1) { %}
|
||||
<span class="indicator blue filterable"
|
||||
data-filter="docstatus,=,1">{%= __("Delivered") %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs text-right">
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_export') %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -113,6 +113,7 @@
|
||||
{
|
||||
"fieldname": "requested_by",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Requested For",
|
||||
"permlevel": 0
|
||||
},
|
||||
@ -157,7 +158,7 @@
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Status",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "status",
|
||||
@ -195,7 +196,7 @@
|
||||
"description": "% of materials ordered against this Material Request",
|
||||
"fieldname": "per_ordered",
|
||||
"fieldtype": "Percent",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "% Completed",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "per_ordered",
|
||||
@ -235,7 +236,7 @@
|
||||
"icon": "icon-ticket",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-01-05 15:17:13.466750",
|
||||
"modified": "2015-01-06 17:38:12.250644",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Material Request",
|
||||
|
@ -1,20 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-sm-10 col-xs-12 text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
<div class="col-sm-2 hidden-xs">
|
||||
{% if(doc.status=="Draft") { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="status,=,{%= doc.status %}">{%= doc.status %}</span>
|
||||
{% } else if(doc.status=="Submitted" && doc.per_ordered < 100) { %}
|
||||
<span class="indicator orange filterable"
|
||||
data-filter="per_ordered,<,100">{%= __("Pending") %}</span>
|
||||
{% } else if(doc.status=="Submitted" && doc.per_ordered == 100) { %}
|
||||
<span class="indicator blue filterable"
|
||||
data-filter="per_ordered,=,100">{%= __("Completed") %}</span>
|
||||
{% } else if(doc.status=="Stopped") { %}
|
||||
<span class="indicator red filterable"
|
||||
data-filter="status,=,Stopped">{%= __("Stopped") %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
@ -1,4 +1,13 @@
|
||||
frappe.listview_settings['Material Request'] = {
|
||||
add_fields: ["material_request_type", "status", "per_ordered"],
|
||||
filters: [["per_ordered", "<", 100]]
|
||||
filters: [["per_ordered", "<", 100]],
|
||||
get_status: function(doc) {
|
||||
if(doc.status=="Stopped") {
|
||||
return [__("Stopped"), "red", "status,=,Stopped"];
|
||||
} if(doc.docstatus==1 && doc.per_ordered < 100) {
|
||||
return [__("Pending"), "orange", "per_ordered,<,100"];
|
||||
} else if(doc.status==1 && doc.per_ordered == 100) {
|
||||
return [__("Completed"), "green", "per_ordered,=,100"];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -53,7 +53,7 @@
|
||||
"fieldname": "supplier_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Name",
|
||||
"permlevel": 0,
|
||||
"read_only": 1
|
||||
@ -411,6 +411,7 @@
|
||||
{
|
||||
"fieldname": "grand_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Grand Total",
|
||||
"oldfieldname": "grand_total_import",
|
||||
"oldfieldtype": "Currency",
|
||||
@ -766,7 +767,7 @@
|
||||
"icon": "icon-truck",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-12-24 14:31:25.348050",
|
||||
"modified": "2015-01-06 17:40:23.838112",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt",
|
||||
@ -844,5 +845,6 @@
|
||||
"read_only_onload": 1,
|
||||
"search_fields": "status, posting_date, supplier",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
"sort_order": "DESC",
|
||||
"title_field": "supplier_name"
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-10">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
<span style="margin-right: 8px; display: inline-block">
|
||||
<span class="filterable"
|
||||
data-filter="supplier,=,{%= doc.supplier %}">
|
||||
{%= doc.supplier_name %}</span></span>
|
||||
{% if(cint(doc.is_subcontracted)) { %}
|
||||
<span style="margin-right: 8px;"
|
||||
title="{%= __("Subcontracted") %}" class="filterable"
|
||||
data-filter="is_subcontracted,=,Yes">
|
||||
<i class="icon-cog text-muted"></i>
|
||||
</span>
|
||||
{% } %}
|
||||
{% if(doc.transporter_name) { %}
|
||||
<span style="margin-right: 8px;"
|
||||
title="{%= doc.transporter_name %}" class="filterable"
|
||||
data-filter="transporter_name,=,{%= doc.transporter_name %}">
|
||||
<i class="icon-truck text-muted"></i>
|
||||
</span>
|
||||
{% } %}
|
||||
{% if(doc.docstatus===0) { %}
|
||||
<span class="label label-danger filterable"
|
||||
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
|
||||
{%= doc.get_formatted("grand_total_import") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
3
erpnext/support/doctype/issue/issue_list.js
Normal file
3
erpnext/support/doctype/issue/issue_list.js
Normal file
@ -0,0 +1,3 @@
|
||||
frappe.listview_settings['Issue'] = {
|
||||
colwidths: {"subject": 6}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user