added more listview templates

This commit is contained in:
Rushabh Mehta 2014-07-31 17:44:39 +05:30 committed by Anand Doshi
parent 18eb4f5015
commit 8544447b19
17 changed files with 219 additions and 43 deletions

View File

@ -440,7 +440,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
"modified": "2014-05-27 03:49:12.326026",
"modified": "2014-07-31 05:05:03.294068",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Voucher",

View File

@ -0,0 +1,20 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-10">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span class="text-muted" style="margin-right: 8px;">
{%= doc.get_formatted("posting_date") %}</span>
<span class="label label-info filterable"
data-filter="voucher_type,=,{%= doc.voucher_type %}">
{%= doc.voucher_type %}
</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">
{%= doc.get_formatted("total_debit") %}
</div>
</div>

View File

@ -0,0 +1,3 @@
frappe.listview_settings['Journal Voucher'] = {
add_fields: ["voucher_type", "posting_date", "total_debit", "company"]
};

View File

@ -128,8 +128,9 @@
}
],
"hide_toolbar": 1,
"icon": "icon-resize-horizontal",
"issingle": 1,
"modified": "2014-07-22 14:53:59.084438",
"modified": "2014-07-31 05:43:03.410832",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",
@ -139,7 +140,7 @@
{
"cancel": 0,
"create": 1,
"delete": 0,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts Manager",
@ -149,7 +150,7 @@
{
"cancel": 0,
"create": 1,
"delete": 0,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts User",

View File

@ -0,0 +1,43 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<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(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
<span class="label label-danger filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,>,0|due,<,Today">
{%= __("Overdue: ") + comment_when(doc.due_date) %}
</span>
{% } else { %}
<span class="label label-warning 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="label label-success filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,=,0">
<i class="icon-ok-sign"></i> {%= __("Paid") %}
</span>
{% } %}
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</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">
{%= doc.get_formatted("grand_total") %}
</div>
</div>

View File

@ -3,10 +3,6 @@
// render
frappe.listview_settings['Purchase Invoice'] = {
add_fields: ["`tabPurchase Invoice`.grand_total", "`tabPurchase Invoice`.outstanding_amount"],
add_columns: [{"content":"paid_amount", width:"10%", type:"bar-graph", label: "Paid"}],
prepare_data: function(data) {
data.paid_amount = flt(data.grand_total) ? (((flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total)) * 100) : 0;
}
add_fields: ["supplier", "supplier_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"]
};

View File

@ -0,0 +1,43 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span style="margin-right: 8px; display: inline-block">
<span class="filterable"
data-filter="customer,=,{%= doc.customer %}">
{%= doc.customer_name %}</span></span>
{% if(doc.outstanding_amount > 0 && doc.docstatus==1) { %}
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
<span class="label label-danger filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,>,0|due,<,Today">
{%= __("Overdue: ") + comment_when(doc.due_date) %}
</span>
{% } else { %}
<span class="label label-warning 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="label label-success filterable"
title="{%= doc.get_formatted("due_date")%}"
data-filter="outstanding_amount,=,0">
<i class="icon-ok-sign"></i> {%= __("Paid") %}
</span>
{% } %}
{% if(doc.docstatus===0) { %}
<span class="label label-danger filterable"
data-filter="docstatus,=,0">{%= __("Draft") %}</span>
{% } %}
</div>
</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">
{%= doc.get_formatted("grand_total") %}
</div>
</div>

View File

@ -3,14 +3,6 @@
// render
frappe.listview_settings['Sales Invoice'] = {
add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"],
add_columns: [{"content":"Percent Paid", width:"10%", type:"bar-graph",
label: "Payment Received"}],
prepare_data: function(data) {
if (data.docstatus === 1) {
data["Percent Paid"] = flt(data.grand_total)
? (((flt(data.grand_total) - flt(data.outstanding_amount)) / flt(data.grand_total)) * 100)
: 100.0;
}
}
add_fields: ["customer", "customer_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"]
};

View File

@ -27,33 +27,11 @@
"permlevel": 0,
"reqd": 0,
"width": "300px"
},
{
"fieldname": "taxable",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Taxable",
"oldfieldname": "taxable",
"oldfieldtype": "Select",
"options": "\nYes\nNo",
"permlevel": 0,
"reqd": 1
},
{
"depends_on": "eval:doc.taxable=='No'",
"fieldname": "exemption_limit",
"fieldtype": "Float",
"hidden": 0,
"in_list_view": 1,
"label": "Exemption Limit",
"oldfieldname": "exemption_limit",
"oldfieldtype": "Currency",
"permlevel": 0
}
],
"icon": "icon-flag",
"idx": 1,
"modified": "2014-05-27 03:49:10.133416",
"modified": "2014-07-31 07:25:26.606030",
"modified_by": "Administrator",
"module": "HR",
"name": "Earning Type",

View File

@ -0,0 +1,18 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-10">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
{% if(cint(doc.is_active)) { %}
<span class="label label-success filterable"
data-filter="is_active,=,Yes">{%= __("Active") %}</span>
{% } %}
{% if(cint(doc.is_default)) { %}
<span class="label label-success filterable"
data-filter="is_default,=,Yes">{%= __("Default") %}</span>
{% } %}
</div>
</div>
<div class="col-xs-2 text-right">
{%= doc.get_formatted("total_cost") %}
</div>
</div>

View File

@ -0,0 +1,3 @@
frappe.listview_settings['BOM'] = {
add_fields: ["is_active", "is_default", "total_cost"]
};

View File

@ -0,0 +1,29 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-9">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span style="margin-right: 8px; display: inline-block">
<span class="filterable"
data-filter="customer,=,{%= doc.customer %}">
{%= doc.customer_name %}</span></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-1 text-right">
{% var completed = doc.per_installed, title=__("% Installed") %}
{% include "templates/form_grid/includes/progress.html" %}
</div>
<div class="col-xs-2 text-right">
{%= doc.get_formatted("grand_total") %}
</div>
</div>

View File

@ -0,0 +1,4 @@
frappe.listview_settings['Delivery Note'] = {
add_fields: ["customer", "customer_name", "grand_total", "per_installed",
"transporter_name"]
};

View File

@ -0,0 +1,32 @@
<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">
{%= doc.get_formatted("grand_total") %}
</div>
</div>

View File

@ -0,0 +1,4 @@
frappe.listview_settings['Purchase Receipt'] = {
add_fields: ["supplier", "supplier_name", "grand_total", "is_subcontracted",
"transporter_name"]
};

View File

@ -0,0 +1,5 @@
frappe.listview_settings['Address'] = {
set_title_left: function() {
frappe.set_route("Module", "Selling");
}
}

View File

@ -0,0 +1,5 @@
frappe.listview_settings['Address'] = {
set_title_left: function() {
frappe.set_route("Module", "Selling");
}
}