mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 07:32:50 +00:00
-webnotes +frappe 💥
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
wn.pages['stock-ageing'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
frappe.pages['stock-ageing'].onload = function(wrapper) {
|
||||
frappe.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: wn._('Stock Ageing'),
|
||||
title: frappe._('Stock Ageing'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -16,12 +16,12 @@ wn.pages['stock-ageing'].onload = function(wrapper) {
|
||||
|
||||
}
|
||||
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
frappe.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
this._super({
|
||||
title: wn._("Stock Ageing"),
|
||||
title: frappe._("Stock Ageing"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -30,37 +30,37 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
},
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "name", name: wn._("Item"), field: "name", width: 300,
|
||||
{id: "name", name: frappe._("Item"), field: "name", width: 300,
|
||||
link_formatter: {
|
||||
open_btn: true,
|
||||
doctype: '"Item"'
|
||||
}},
|
||||
{id: "item_name", name: wn._("Item Name"), field: "item_name",
|
||||
{id: "item_name", name: frappe._("Item Name"), field: "item_name",
|
||||
width: 100, formatter: this.text_formatter},
|
||||
{id: "description", name: wn._("Description"), field: "description",
|
||||
{id: "description", name: frappe._("Description"), field: "description",
|
||||
width: 200, formatter: this.text_formatter},
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "average_age", name: wn._("Average Age"), field: "average_age",
|
||||
{id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
|
||||
{id: "average_age", name: frappe._("Average Age"), field: "average_age",
|
||||
formatter: this.currency_formatter},
|
||||
{id: "earliest", name: wn._("Earliest"), field: "earliest",
|
||||
{id: "earliest", name: frappe._("Earliest"), field: "earliest",
|
||||
formatter: this.currency_formatter},
|
||||
{id: "latest", name: wn._("Latest"), field: "latest",
|
||||
{id: "latest", name: frappe._("Latest"), field: "latest",
|
||||
formatter: this.currency_formatter},
|
||||
{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
|
||||
];
|
||||
},
|
||||
filters: [
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
{fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse..."},
|
||||
{fieldtype:"Select", label: wn._("Brand"), link:"Brand",
|
||||
{fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val;
|
||||
}, link_formatter: {filter_input: "brand"}},
|
||||
{fieldtype:"Select", label: wn._("Plot By"),
|
||||
{fieldtype:"Select", label: frappe._("Plot By"),
|
||||
options: ["Average Age", "Earliest", "Latest"]},
|
||||
{fieldtype:"Date", label: wn._("To Date")},
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
{fieldtype:"Date", label: frappe._("To Date")},
|
||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
@@ -76,7 +76,7 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
var me = this;
|
||||
|
||||
if(!this.data) {
|
||||
me._data = wn.report_dump.data["Item"];
|
||||
me._data = frappe.report_dump.data["Item"];
|
||||
me.item_by_name = me.make_name_map(me._data);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
||||
prepare_balances: function() {
|
||||
var me = this;
|
||||
var to_date = dateutil.str_to_obj(this.to_date);
|
||||
var data = wn.report_dump.data["Stock Ledger Entry"];
|
||||
var data = frappe.report_dump.data["Stock Ledger Entry"];
|
||||
|
||||
this.item_warehouse = {};
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
wn.pages['stock-analytics'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
frappe.pages['stock-analytics'].onload = function(wrapper) {
|
||||
frappe.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: wn._('Stock Analytics'),
|
||||
title: frappe._('Stock Analytics'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -16,4 +16,4 @@ wn.pages['stock-analytics'].onload = function(wrapper) {
|
||||
|
||||
}
|
||||
|
||||
wn.require("assets/erpnext/js/stock_analytics.js");
|
||||
frappe.require("assets/erpnext/js/stock_analytics.js");
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.require("assets/erpnext/js/stock_analytics.js");
|
||||
frappe.require("assets/erpnext/js/stock_analytics.js");
|
||||
|
||||
wn.pages['stock-balance'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
frappe.pages['stock-balance'].onload = function(wrapper) {
|
||||
frappe.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: wn._('Stock Balance'),
|
||||
title: frappe._('Stock Balance'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -20,58 +20,58 @@ wn.pages['stock-balance'].onload = function(wrapper) {
|
||||
erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
init: function(wrapper) {
|
||||
this._super(wrapper, {
|
||||
title: wn._("Stock Balance"),
|
||||
title: frappe._("Stock Balance"),
|
||||
doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
|
||||
"Stock Entry", "Project", "Serial No"],
|
||||
});
|
||||
},
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "name", name: wn._("Item"), field: "name", width: 300,
|
||||
{id: "name", name: frappe._("Item"), field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100},
|
||||
{id: "description", name: wn._("Description"), field: "description", width: 200,
|
||||
{id: "item_name", name: frappe._("Item Name"), field: "item_name", width: 100},
|
||||
{id: "description", name: frappe._("Description"), field: "description", width: 200,
|
||||
formatter: this.text_formatter},
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "opening_qty", name: wn._("Opening Qty"), field: "opening_qty", width: 100,
|
||||
{id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "opening_qty", name: frappe._("Opening Qty"), field: "opening_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "inflow_qty", name: wn._("In Qty"), field: "inflow_qty", width: 100,
|
||||
{id: "inflow_qty", name: frappe._("In Qty"), field: "inflow_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "outflow_qty", name: wn._("Out Qty"), field: "outflow_qty", width: 100,
|
||||
{id: "outflow_qty", name: frappe._("Out Qty"), field: "outflow_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "closing_qty", name: wn._("Closing Qty"), field: "closing_qty", width: 100,
|
||||
{id: "closing_qty", name: frappe._("Closing Qty"), field: "closing_qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
|
||||
{id: "opening_value", name: wn._("Opening Value"), field: "opening_value", width: 100,
|
||||
{id: "opening_value", name: frappe._("Opening Value"), field: "opening_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "inflow_value", name: wn._("In Value"), field: "inflow_value", width: 100,
|
||||
{id: "inflow_value", name: frappe._("In Value"), field: "inflow_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "outflow_value", name: wn._("Out Value"), field: "outflow_value", width: 100,
|
||||
{id: "outflow_value", name: frappe._("Out Value"), field: "outflow_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "closing_value", name: wn._("Closing Value"), field: "closing_value", width: 100,
|
||||
{id: "closing_value", name: frappe._("Closing Value"), field: "closing_value", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
];
|
||||
},
|
||||
|
||||
filters: [
|
||||
{fieldtype:"Select", label: wn._("Brand"), link:"Brand",
|
||||
{fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val || item._show;
|
||||
}, link_formatter: {filter_input: "brand"}},
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
{fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse...", filter: function(val, item, opts, me) {
|
||||
return me.apply_zero_filter(val, item, opts, me);
|
||||
}},
|
||||
{fieldtype:"Select", label: wn._("Project"), link:"Project",
|
||||
{fieldtype:"Select", label: frappe._("Project"), link:"Project",
|
||||
default_value: "Select Project...", filter: function(val, item, opts, me) {
|
||||
return me.apply_zero_filter(val, item, opts, me);
|
||||
}, link_formatter: {filter_input: "project"}},
|
||||
{fieldtype:"Date", label: wn._("From Date")},
|
||||
{fieldtype:"Label", label: wn._("To")},
|
||||
{fieldtype:"Date", label: wn._("To Date")},
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
{fieldtype:"Date", label: frappe._("From Date")},
|
||||
{fieldtype:"Label", label: frappe._("To")},
|
||||
{fieldtype:"Date", label: frappe._("To Date")},
|
||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
||||
],
|
||||
|
||||
setup_plot_check: function() {
|
||||
@@ -79,7 +79,7 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
},
|
||||
|
||||
prepare_data: function() {
|
||||
this.stock_entry_map = this.make_name_map(wn.report_dump.data["Stock Entry"], "name");
|
||||
this.stock_entry_map = this.make_name_map(frappe.report_dump.data["Stock Entry"], "name");
|
||||
this._super();
|
||||
},
|
||||
|
||||
@@ -87,7 +87,7 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({
|
||||
var me = this;
|
||||
var from_date = dateutil.str_to_obj(this.from_date);
|
||||
var to_date = dateutil.str_to_obj(this.to_date);
|
||||
var data = wn.report_dump.data["Stock Ledger Entry"];
|
||||
var data = frappe.report_dump.data["Stock Ledger Entry"];
|
||||
|
||||
this.item_warehouse = {};
|
||||
this.serialized_buying_rates = this.get_serialized_buying_rates();
|
||||
|
||||
@@ -1,250 +1,250 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt"
|
||||
|
||||
wn.module_page["Stock"] = [
|
||||
frappe.module_page["Stock"] = [
|
||||
{
|
||||
title: wn._("Documents"),
|
||||
title: frappe._("Documents"),
|
||||
top: true,
|
||||
icon: "icon-copy",
|
||||
items: [
|
||||
{
|
||||
label: wn._("Item"),
|
||||
description: wn._("All Products or Services."),
|
||||
label: frappe._("Item"),
|
||||
description: frappe._("All Products or Services."),
|
||||
doctype: "Item"
|
||||
},
|
||||
{
|
||||
label: wn._("Material Request"),
|
||||
description: wn._("Requests for items."),
|
||||
label: frappe._("Material Request"),
|
||||
description: frappe._("Requests for items."),
|
||||
doctype: "Material Request"
|
||||
},
|
||||
{
|
||||
label: wn._("Stock Entry"),
|
||||
description: wn._("Record item movement."),
|
||||
label: frappe._("Stock Entry"),
|
||||
description: frappe._("Record item movement."),
|
||||
doctype: "Stock Entry"
|
||||
},
|
||||
{
|
||||
label: wn._("Delivery Note"),
|
||||
description: wn._("Shipments to customers."),
|
||||
label: frappe._("Delivery Note"),
|
||||
description: frappe._("Shipments to customers."),
|
||||
doctype: "Delivery Note"
|
||||
},
|
||||
{
|
||||
label: wn._("Purchase Receipt"),
|
||||
description: wn._("Goods received from Suppliers."),
|
||||
label: frappe._("Purchase Receipt"),
|
||||
description: frappe._("Goods received from Suppliers."),
|
||||
doctype: "Purchase Receipt"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: wn._("Masters"),
|
||||
title: frappe._("Masters"),
|
||||
icon: "icon-book",
|
||||
items: [
|
||||
{
|
||||
label: wn._("Serial No"),
|
||||
description: wn._("Single unit of an Item."),
|
||||
label: frappe._("Serial No"),
|
||||
description: frappe._("Single unit of an Item."),
|
||||
doctype: "Serial No"
|
||||
},
|
||||
{
|
||||
label: wn._("Batch"),
|
||||
description: wn._("Batch (lot) of an Item."),
|
||||
label: frappe._("Batch"),
|
||||
description: frappe._("Batch (lot) of an Item."),
|
||||
doctype: "Batch"
|
||||
},
|
||||
{
|
||||
label: wn._("Warehouse"),
|
||||
description: wn._("Where items are stored."),
|
||||
label: frappe._("Warehouse"),
|
||||
description: frappe._("Where items are stored."),
|
||||
doctype: "Warehouse"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: wn._("Tools"),
|
||||
title: frappe._("Tools"),
|
||||
icon: "icon-wrench",
|
||||
items: [
|
||||
{
|
||||
doctype: "Stock Reconciliation",
|
||||
label: wn._("Stock Reconciliation"),
|
||||
description: wn._("Upload stock balance via csv.")
|
||||
label: frappe._("Stock Reconciliation"),
|
||||
description: frappe._("Upload stock balance via csv.")
|
||||
},
|
||||
{
|
||||
doctype: "Installation Note",
|
||||
label: wn._("Installation Note"),
|
||||
description: wn._("Installation record for a Serial No.")
|
||||
label: frappe._("Installation Note"),
|
||||
description: frappe._("Installation record for a Serial No.")
|
||||
},
|
||||
{
|
||||
label: wn._("Packing Slip"),
|
||||
label: frappe._("Packing Slip"),
|
||||
doctype: "Packing Slip",
|
||||
description: wn._("Split Delivery Note into packages.")
|
||||
description: frappe._("Split Delivery Note into packages.")
|
||||
},
|
||||
{
|
||||
doctype: "Price List",
|
||||
label: wn._("Price List"),
|
||||
description: wn._("Multiple Price list.")
|
||||
label: frappe._("Price List"),
|
||||
description: frappe._("Multiple Price list.")
|
||||
},
|
||||
{
|
||||
doctype: "Item Price",
|
||||
label: wn._("Item Price"),
|
||||
description: wn._("Multiple Item prices.")
|
||||
label: frappe._("Item Price"),
|
||||
description: frappe._("Multiple Item prices.")
|
||||
},
|
||||
{
|
||||
doctype: "Quality Inspection",
|
||||
label: wn._("Quality Inspection"),
|
||||
description: wn._("Incoming quality inspection.")
|
||||
label: frappe._("Quality Inspection"),
|
||||
description: frappe._("Incoming quality inspection.")
|
||||
},
|
||||
{
|
||||
route: "Form/Landed Cost Wizard/Landed Cost Wizard",
|
||||
label: wn._("Landed Cost Wizard"),
|
||||
description: wn._("Distribute transport overhead across items."),
|
||||
label: frappe._("Landed Cost Wizard"),
|
||||
description: frappe._("Distribute transport overhead across items."),
|
||||
doctype: "Landed Cost Wizard"
|
||||
},
|
||||
{
|
||||
route: "Form/Stock UOM Replace Utility/Stock UOM Replace Utility",
|
||||
label: wn._("UOM Replace Utility"),
|
||||
description: wn._("Change UOM for an Item."),
|
||||
label: frappe._("UOM Replace Utility"),
|
||||
description: frappe._("Change UOM for an Item."),
|
||||
doctype: "Stock UOM Replace Utility"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: wn._("Setup"),
|
||||
title: frappe._("Setup"),
|
||||
icon: "icon-cog",
|
||||
items: [
|
||||
{
|
||||
label: wn._("Stock Settings"),
|
||||
label: frappe._("Stock Settings"),
|
||||
route: "Form/Stock Settings",
|
||||
doctype: "Stock Settings",
|
||||
description: wn._("Settings for Stock Module")
|
||||
description: frappe._("Settings for Stock Module")
|
||||
},
|
||||
{
|
||||
route: "Sales Browser/Item Group",
|
||||
label: wn._("Item Group"),
|
||||
label: frappe._("Item Group"),
|
||||
doctype: "Item Group",
|
||||
description: wn._("Item classification.")
|
||||
description: frappe._("Item classification.")
|
||||
},
|
||||
{
|
||||
doctype: "UOM",
|
||||
label: wn._("Unit of Measure") + " (UOM)",
|
||||
description: wn._("e.g. Kg, Unit, Nos, m")
|
||||
label: frappe._("Unit of Measure") + " (UOM)",
|
||||
description: frappe._("e.g. Kg, Unit, Nos, m")
|
||||
},
|
||||
{
|
||||
doctype: "Brand",
|
||||
label: wn._("Brand"),
|
||||
description: wn._("Brand master.")
|
||||
label: frappe._("Brand"),
|
||||
description: frappe._("Brand master.")
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: wn._("Main Reports"),
|
||||
title: frappe._("Main Reports"),
|
||||
right: true,
|
||||
icon: "icon-table",
|
||||
items: [
|
||||
{
|
||||
label: wn._("Stock Ledger"),
|
||||
label: frappe._("Stock Ledger"),
|
||||
doctype: "Item",
|
||||
route: "query-report/Stock Ledger"
|
||||
},
|
||||
{
|
||||
label: wn._("Stock Balance"),
|
||||
label: frappe._("Stock Balance"),
|
||||
page: "stock-balance"
|
||||
},
|
||||
{
|
||||
label: wn._("Stock Projected Qty"),
|
||||
label: frappe._("Stock Projected Qty"),
|
||||
doctype: "Item",
|
||||
route: "query-report/Stock Projected Qty"
|
||||
},
|
||||
{
|
||||
label: wn._("Stock Ageing"),
|
||||
label: frappe._("Stock Ageing"),
|
||||
doctype: "Item",
|
||||
route: "query-report/Stock Ageing"
|
||||
},
|
||||
{
|
||||
label: wn._("Item-wise Price List Rate"),
|
||||
label: frappe._("Item-wise Price List Rate"),
|
||||
route: "Report/Item Price/Item-wise Price List Rate",
|
||||
doctype: "Item Price"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: wn._("Analytics"),
|
||||
title: frappe._("Analytics"),
|
||||
right: true,
|
||||
icon: "icon-bar-chart",
|
||||
items: [
|
||||
{
|
||||
label: wn._("Stock Analytics"),
|
||||
label: frappe._("Stock Analytics"),
|
||||
page: "stock-analytics"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: wn._("Reports"),
|
||||
title: frappe._("Reports"),
|
||||
right: true,
|
||||
icon: "icon-list",
|
||||
items: [
|
||||
{
|
||||
label: wn._("Ordered Items To Be Delivered"),
|
||||
label: frappe._("Ordered Items To Be Delivered"),
|
||||
route: "query-report/Ordered Items To Be Delivered",
|
||||
doctype: "Delivery Note"
|
||||
},
|
||||
{
|
||||
label: wn._("Purchase Order Items To Be Received"),
|
||||
label: frappe._("Purchase Order Items To Be Received"),
|
||||
route: "query-report/Purchase Order Items To Be Received",
|
||||
doctype: "Purchase Receipt"
|
||||
},
|
||||
{
|
||||
label: wn._("Item Shortage Report"),
|
||||
label: frappe._("Item Shortage Report"),
|
||||
route: "Report/Bin/Item Shortage Report",
|
||||
doctype: "Purchase Receipt"
|
||||
},
|
||||
{
|
||||
label: wn._("Serial No Service Contract Expiry"),
|
||||
label: frappe._("Serial No Service Contract Expiry"),
|
||||
route: "Report/Serial No/Serial No Service Contract Expiry",
|
||||
doctype: "Serial No"
|
||||
},
|
||||
{
|
||||
label: wn._("Serial No Status"),
|
||||
label: frappe._("Serial No Status"),
|
||||
route: "Report/Serial No/Serial No Status",
|
||||
doctype: "Serial No"
|
||||
},
|
||||
{
|
||||
label: wn._("Serial No Warranty Expiry"),
|
||||
label: frappe._("Serial No Warranty Expiry"),
|
||||
route: "Report/Serial No/Serial No Warranty Expiry",
|
||||
doctype: "Serial No"
|
||||
},
|
||||
{
|
||||
label: wn._("Purchase In Transit"),
|
||||
label: frappe._("Purchase In Transit"),
|
||||
route: "query-report/Purchase In Transit",
|
||||
doctype: "Purchase Order"
|
||||
},
|
||||
{
|
||||
label: wn._("Requested Items To Be Transferred"),
|
||||
label: frappe._("Requested Items To Be Transferred"),
|
||||
route: "query-report/Requested Items To Be Transferred",
|
||||
doctype: "Material Request"
|
||||
},
|
||||
{
|
||||
label: wn._("Batch-Wise Balance History"),
|
||||
label: frappe._("Batch-Wise Balance History"),
|
||||
route: "query-report/Batch-Wise Balance History",
|
||||
doctype: "Batch"
|
||||
},
|
||||
{
|
||||
label: wn._("Warehouse-Wise Stock Balance"),
|
||||
label: frappe._("Warehouse-Wise Stock Balance"),
|
||||
route: "query-report/Warehouse-Wise Stock Balance",
|
||||
doctype: "Warehouse"
|
||||
},
|
||||
{
|
||||
label: wn._("Item Prices"),
|
||||
label: frappe._("Item Prices"),
|
||||
route: "query-report/Item Prices",
|
||||
doctype: "Price List"
|
||||
},
|
||||
{
|
||||
label: wn._("Itemwise Recommended Reorder Level"),
|
||||
label: frappe._("Itemwise Recommended Reorder Level"),
|
||||
route: "query-report/Itemwise Recommended Reorder Level",
|
||||
doctype: "Item"
|
||||
},
|
||||
{
|
||||
label: wn._("Delivery Note Trends"),
|
||||
label: frappe._("Delivery Note Trends"),
|
||||
route: "query-report/Delivery Note Trends",
|
||||
doctype: "Delivery Note"
|
||||
},
|
||||
{
|
||||
label: wn._("Purchase Receipt Trends"),
|
||||
label: frappe._("Purchase Receipt Trends"),
|
||||
route: "query-report/Purchase Receipt Trends",
|
||||
doctype: "Purchase Receipt"
|
||||
},
|
||||
@@ -253,5 +253,5 @@ wn.module_page["Stock"] = [
|
||||
]
|
||||
|
||||
pscript['onload_stock-home'] = function(wrapper) {
|
||||
wn.views.moduleview.make(wrapper, "Stock");
|
||||
frappe.views.moduleview.make(wrapper, "Stock");
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.pages['stock-ledger'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
frappe.pages['stock-ledger'].onload = function(wrapper) {
|
||||
frappe.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: wn._('Stock Ledger'),
|
||||
title: frappe._('Stock Ledger'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -12,12 +12,12 @@ wn.pages['stock-ledger'].onload = function(wrapper) {
|
||||
wrapper.appframe.add_module_icon("Stock")
|
||||
}
|
||||
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
frappe.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
this._super({
|
||||
title: wn._("Stock Ledger"),
|
||||
title: frappe._("Stock Ledger"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -28,29 +28,29 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
setup_columns: function() {
|
||||
this.hide_balance = (this.is_default("item_code") || this.voucher_no) ? true : false;
|
||||
this.columns = [
|
||||
{id: "posting_datetime", name: wn._("Posting Date"), field: "posting_datetime", width: 120,
|
||||
{id: "posting_datetime", name: frappe._("Posting Date"), field: "posting_datetime", width: 120,
|
||||
formatter: this.date_formatter},
|
||||
{id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160,
|
||||
{id: "item_code", name: frappe._("Item Code"), field: "item_code", width: 160,
|
||||
link_formatter: {
|
||||
filter_input: "item_code",
|
||||
open_btn: true,
|
||||
doctype: '"Item"',
|
||||
}},
|
||||
{id: "description", name: wn._("Description"), field: "description", width: 200,
|
||||
{id: "description", name: frappe._("Description"), field: "description", width: 200,
|
||||
formatter: this.text_formatter},
|
||||
{id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100,
|
||||
{id: "warehouse", name: frappe._("Warehouse"), field: "warehouse", width: 100,
|
||||
link_formatter: {filter_input: "warehouse"}},
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "qty", name: wn._("Qty"), field: "qty", width: 100,
|
||||
{id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "qty", name: frappe._("Qty"), field: "qty", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "balance", name: wn._("Balance Qty"), field: "balance", width: 100,
|
||||
{id: "balance", name: frappe._("Balance Qty"), field: "balance", width: 100,
|
||||
formatter: this.currency_formatter,
|
||||
hidden: this.hide_balance},
|
||||
{id: "balance_value", name: wn._("Balance Value"), field: "balance_value", width: 100,
|
||||
{id: "balance_value", name: frappe._("Balance Value"), field: "balance_value", width: 100,
|
||||
formatter: this.currency_formatter, hidden: this.hide_balance},
|
||||
{id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120},
|
||||
{id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160,
|
||||
{id: "voucher_type", name: frappe._("Voucher Type"), field: "voucher_type", width: 120},
|
||||
{id: "voucher_no", name: frappe._("Voucher No"), field: "voucher_no", width: 160,
|
||||
link_formatter: {
|
||||
filter_input: "voucher_no",
|
||||
open_btn: true,
|
||||
@@ -60,11 +60,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
|
||||
},
|
||||
filters: [
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
{fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse...", filter: function(val, item, opts) {
|
||||
return item.warehouse == val || val == opts.default_value;
|
||||
}},
|
||||
{fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...",
|
||||
{fieldtype:"Link", label: frappe._("Item Code"), link:"Item", default_value: "Select Item...",
|
||||
filter: function(val, item, opts) {
|
||||
return item.item_code == val || !val;
|
||||
}},
|
||||
@@ -72,20 +72,20 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val || item._show;
|
||||
}, link_formatter: {filter_input: "brand"}},
|
||||
{fieldtype:"Data", label: wn._("Voucher No"),
|
||||
{fieldtype:"Data", label: frappe._("Voucher No"),
|
||||
filter: function(val, item, opts) {
|
||||
if(!val) return true;
|
||||
return (item.voucher_no && item.voucher_no.indexOf(val)!=-1);
|
||||
}},
|
||||
{fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) {
|
||||
{fieldtype:"Date", label: frappe._("From Date"), filter: function(val, item) {
|
||||
return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Label", label: wn._("To")},
|
||||
{fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) {
|
||||
{fieldtype:"Label", label: frappe._("To")},
|
||||
{fieldtype:"Date", label: frappe._("To Date"), filter: function(val, item) {
|
||||
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
|
||||
}},
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
@@ -115,8 +115,8 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
prepare_data: function() {
|
||||
var me = this;
|
||||
if(!this.item_by_name)
|
||||
this.item_by_name = this.make_name_map(wn.report_dump.data["Item"]);
|
||||
var data = wn.report_dump.data["Stock Ledger Entry"];
|
||||
this.item_by_name = this.make_name_map(frappe.report_dump.data["Item"]);
|
||||
var data = frappe.report_dump.data["Stock Ledger Entry"];
|
||||
var out = [];
|
||||
|
||||
var opening = {
|
||||
@@ -133,7 +133,7 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
|
||||
}
|
||||
|
||||
// clear balance
|
||||
$.each(wn.report_dump.data["Item"], function(i, item) {
|
||||
$.each(frappe.report_dump.data["Item"], function(i, item) {
|
||||
item.balance = item.balance_value = 0.0;
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
wn.pages['stock-level'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
frappe.pages['stock-level'].onload = function(wrapper) {
|
||||
frappe.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: wn._('Stock Level'),
|
||||
title: frappe._('Stock Level'),
|
||||
single_column: true
|
||||
});
|
||||
|
||||
@@ -15,14 +15,14 @@ wn.pages['stock-level'].onload = function(wrapper) {
|
||||
;
|
||||
}
|
||||
|
||||
wn.require("assets/erpnext/js/stock_grid_report.js");
|
||||
frappe.require("assets/erpnext/js/stock_grid_report.js");
|
||||
|
||||
erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
var me = this;
|
||||
|
||||
this._super({
|
||||
title: wn._("Stock Level"),
|
||||
title: frappe._("Stock Level"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -31,18 +31,18 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
});
|
||||
|
||||
this.wrapper.bind("make", function() {
|
||||
wn.utils.set_footnote(me, me.wrapper.get(0),
|
||||
frappe.utils.set_footnote(me, me.wrapper.get(0),
|
||||
"<ul> \
|
||||
<li style='font-weight: bold;'> \
|
||||
Projected Qty = Actual Qty + Planned Qty + Requested Qty \
|
||||
+ Ordered Qty - Reserved Qty </li> \
|
||||
<ul> \
|
||||
<li>"+wn._("Actual Qty: Quantity available in the warehouse.") +"</li>"+
|
||||
"<li>"+wn._("Planned Qty: Quantity, for which, Production Order has been raised,")+
|
||||
wn._("but is pending to be manufactured.")+ "</li> " +
|
||||
"<li>"+wn._("Requested Qty: Quantity requested for purchase, but not ordered.") + "</li>" +
|
||||
"<li>" + wn._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "</li>" +
|
||||
"<li>" + wn._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "</li>" +
|
||||
<li>"+frappe._("Actual Qty: Quantity available in the warehouse.") +"</li>"+
|
||||
"<li>"+frappe._("Planned Qty: Quantity, for which, Production Order has been raised,")+
|
||||
frappe._("but is pending to be manufactured.")+ "</li> " +
|
||||
"<li>"+frappe._("Requested Qty: Quantity requested for purchase, but not ordered.") + "</li>" +
|
||||
"<li>" + frappe._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "</li>" +
|
||||
"<li>" + frappe._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "</li>" +
|
||||
"</ul> \
|
||||
</ul>");
|
||||
});
|
||||
@@ -50,57 +50,57 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160,
|
||||
{id: "item_code", name: frappe._("Item Code"), field: "item_code", width: 160,
|
||||
link_formatter: {
|
||||
filter_input: "item_code",
|
||||
open_btn: true,
|
||||
doctype: '"Item"',
|
||||
}},
|
||||
{id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100,
|
||||
{id: "item_name", name: frappe._("Item Name"), field: "item_name", width: 100,
|
||||
formatter: this.text_formatter},
|
||||
{id: "description", name: wn._("Description"), field: "description", width: 200,
|
||||
{id: "description", name: frappe._("Description"), field: "description", width: 200,
|
||||
formatter: this.text_formatter},
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100,
|
||||
{id: "brand", name: frappe._("Brand"), field: "brand", width: 100,
|
||||
link_formatter: {filter_input: "brand"}},
|
||||
{id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100,
|
||||
{id: "warehouse", name: frappe._("Warehouse"), field: "warehouse", width: 100,
|
||||
link_formatter: {filter_input: "warehouse"}},
|
||||
{id: "uom", name: wn._("UOM"), field: "uom", width: 60},
|
||||
{id: "actual_qty", name: wn._("Actual Qty"),
|
||||
{id: "uom", name: frappe._("UOM"), field: "uom", width: 60},
|
||||
{id: "actual_qty", name: frappe._("Actual Qty"),
|
||||
field: "actual_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "planned_qty", name: wn._("Planned Qty"),
|
||||
{id: "planned_qty", name: frappe._("Planned Qty"),
|
||||
field: "planned_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "requested_qty", name: wn._("Requested Qty"),
|
||||
{id: "requested_qty", name: frappe._("Requested Qty"),
|
||||
field: "requested_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "ordered_qty", name: wn._("Ordered Qty"),
|
||||
{id: "ordered_qty", name: frappe._("Ordered Qty"),
|
||||
field: "ordered_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "reserved_qty", name: wn._("Reserved Qty"),
|
||||
{id: "reserved_qty", name: frappe._("Reserved Qty"),
|
||||
field: "reserved_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "projected_qty", name: wn._("Projected Qty"),
|
||||
{id: "projected_qty", name: frappe._("Projected Qty"),
|
||||
field: "projected_qty", width: 80, formatter: this.currency_formatter},
|
||||
{id: "re_order_level", name: wn._("Re-Order Level"),
|
||||
{id: "re_order_level", name: frappe._("Re-Order Level"),
|
||||
field: "re_order_level", width: 80, formatter: this.currency_formatter},
|
||||
{id: "re_order_qty", name: wn._("Re-Order Qty"),
|
||||
{id: "re_order_qty", name: frappe._("Re-Order Qty"),
|
||||
field: "re_order_qty", width: 80, formatter: this.currency_formatter},
|
||||
];
|
||||
},
|
||||
|
||||
filters: [
|
||||
{fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...",
|
||||
{fieldtype:"Link", label: frappe._("Item Code"), link:"Item", default_value: "Select Item...",
|
||||
filter: function(val, item, opts) {
|
||||
return item.item_code == val || !val;
|
||||
}},
|
||||
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
{fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse...", filter: function(val, item, opts) {
|
||||
return item.warehouse == val || val == opts.default_value;
|
||||
}},
|
||||
|
||||
{fieldtype:"Select", label: wn._("Brand"), link:"Brand",
|
||||
{fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
|
||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||
return val == opts.default_value || item.brand == val;
|
||||
}},
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
|
||||
{fieldtype:"Button", label: frappe._("Reset Filters")}
|
||||
],
|
||||
|
||||
setup_filters: function() {
|
||||
@@ -134,7 +134,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
if(!this._data) {
|
||||
this._data = [];
|
||||
this.item_warehouse_map = {};
|
||||
this.item_by_name = this.make_name_map(wn.report_dump.data["Item"]);
|
||||
this.item_by_name = this.make_name_map(frappe.report_dump.data["Item"]);
|
||||
this.calculate_quantities();
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
|
||||
["Purchase Order Item", "ordered_qty"],
|
||||
["Sales Order Item", "reserved_qty"]],
|
||||
function(i, v) {
|
||||
$.each(wn.report_dump.data[v[0]], function(i, item) {
|
||||
$.each(frappe.report_dump.data[v[0]], function(i, item) {
|
||||
var row = me.get_row(item.item_code, item.warehouse);
|
||||
row[v[1]] += flt(item.qty);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user