Fix translate buying/page/purchase_analytics/purchase_analytics.js
This commit is contained in:
parent
b0e466d55c
commit
21fc1f2652
@ -4,7 +4,7 @@
|
|||||||
wn.pages['purchase-analytics'].onload = function(wrapper) {
|
wn.pages['purchase-analytics'].onload = function(wrapper) {
|
||||||
wn.ui.make_app_page({
|
wn.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
title: 'Purchase Analytics',
|
title: wn._('Purchase Analytics'),
|
||||||
single_column: true
|
single_column: true
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) {
|
|||||||
erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
||||||
init: function(wrapper) {
|
init: function(wrapper) {
|
||||||
this._super({
|
this._super({
|
||||||
title: "Purchase Analytics",
|
title: wn._("Purchase Analytics"),
|
||||||
page: wrapper,
|
page: wrapper,
|
||||||
parent: $(wrapper).find('.layout-main'),
|
parent: $(wrapper).find('.layout-main'),
|
||||||
appframe: wrapper.appframe,
|
appframe: wrapper.appframe,
|
||||||
@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
|||||||
|
|
||||||
this.tree_grids = {
|
this.tree_grids = {
|
||||||
"Supplier Type": {
|
"Supplier Type": {
|
||||||
label: "Supplier Type / Supplier",
|
label: wn._("Supplier Type / Supplier"),
|
||||||
show: true,
|
show: true,
|
||||||
item_key: "supplier",
|
item_key: "supplier",
|
||||||
parent_field: "parent_supplier_type",
|
parent_field: "parent_supplier_type",
|
||||||
@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Supplier": {
|
"Supplier": {
|
||||||
label: "Supplier",
|
label: wn._("Supplier"),
|
||||||
show: false,
|
show: false,
|
||||||
item_key: "supplier",
|
item_key: "supplier",
|
||||||
formatter: function(item) {
|
formatter: function(item) {
|
||||||
@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
|||||||
this.tree_grid = this.tree_grids[this.tree_type];
|
this.tree_grid = this.tree_grids[this.tree_type];
|
||||||
|
|
||||||
var std_columns = [
|
var std_columns = [
|
||||||
{id: "check", name: "Plot", field: "check", width: 30,
|
{id: "check", name: wn._("Plot"), field: "check", width: 30,
|
||||||
formatter: this.check_formatter},
|
formatter: this.check_formatter},
|
||||||
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
|
||||||
formatter: this.tree_formatter},
|
formatter: this.tree_formatter},
|
||||||
@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
|||||||
this.columns = std_columns.concat(this.columns);
|
this.columns = std_columns.concat(this.columns);
|
||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
{fieldtype:"Select", label: "Tree Type", options:["Supplier Type", "Supplier",
|
{fieldtype:"Select", label: wn._("Tree Type"), options:["Supplier Type", "Supplier",
|
||||||
"Item Group", "Item"],
|
"Item Group", "Item"],
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
return me.apply_zero_filter(val, item, opts, me);
|
return me.apply_zero_filter(val, item, opts, me);
|
||||||
}},
|
}},
|
||||||
{fieldtype:"Select", label: "Based On", options:["Purchase Invoice",
|
{fieldtype:"Select", label: wn._("Based On"), options:["Purchase Invoice",
|
||||||
"Purchase Order", "Purchase Receipt"]},
|
"Purchase Order", "Purchase Receipt"]},
|
||||||
{fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]},
|
{fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]},
|
||||||
{fieldtype:"Select", label: "Company", link:"Company",
|
{fieldtype:"Select", label: wn._("Company"), link:"Company",
|
||||||
default_value: "Select Company..."},
|
default_value: "Select Company..."},
|
||||||
{fieldtype:"Date", label: "From Date"},
|
{fieldtype:"Date", label: wn._("From Date")},
|
||||||
{fieldtype:"Label", label: "To"},
|
{fieldtype:"Label", label: wn._("To")},
|
||||||
{fieldtype:"Date", label: "To Date"},
|
{fieldtype:"Date", label: wn._("To Date")},
|
||||||
{fieldtype:"Select", label: "Range",
|
{fieldtype:"Select", label: wn._("Range"),
|
||||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||||
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||||
{fieldtype:"Button", label: "Reset Filters"}
|
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||||
],
|
],
|
||||||
setup_filters: function() {
|
setup_filters: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
wn.report_dump.data["Supplier Type"] = [{
|
wn.report_dump.data["Supplier Type"] = [{
|
||||||
name: "All Supplier Types",
|
name: wn._("All Supplier Types"),
|
||||||
id: "All Supplier Types",
|
id: "All Supplier Types",
|
||||||
}].concat(wn.report_dump.data["Supplier Type"]);
|
}].concat(wn.report_dump.data["Supplier Type"]);
|
||||||
|
|
||||||
wn.report_dump.data["Supplier"].push({
|
wn.report_dump.data["Supplier"].push({
|
||||||
name: "Not Set",
|
name: wn._("Not Set"),
|
||||||
parent_supplier_type: "All Supplier Types",
|
parent_supplier_type: "All Supplier Types",
|
||||||
id: "Not Set",
|
id: "Not Set",
|
||||||
});
|
});
|
||||||
|
|
||||||
wn.report_dump.data["Item"].push({
|
wn.report_dump.data["Item"].push({
|
||||||
name: "Not Set",
|
name: wn._("Not Set"),
|
||||||
parent_item_group: "All Item Groups",
|
parent_item_group: "All Item Groups",
|
||||||
id: "Not Set",
|
id: "Not Set",
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user