From 805fdf313c866d909edd92ef381beb48f612214c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 26 Feb 2013 12:23:39 +0530 Subject: [PATCH] shifted item name and description fields to the left of stock reports --- public/js/stock_analytics.js | 2 +- startup/report_data_map.py | 2 +- stock/page/stock_ageing/stock_ageing.js | 10 +++++----- stock/page/stock_balance/stock_balance.js | 11 +++++------ stock/page/stock_ledger/stock_ledger.js | 5 +++-- stock/page/stock_level/stock_level.js | 14 +++++++------- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/public/js/stock_analytics.js b/public/js/stock_analytics.js index 5ebe65f803..d6a994cd1c 100644 --- a/public/js/stock_analytics.js +++ b/public/js/stock_analytics.js @@ -53,8 +53,8 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ formatter: this.check_formatter}, {id: "name", name: "Item", field: "name", width: 300, formatter: this.tree_formatter}, - {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, {id: "brand", name: "Brand", field: "brand", width: 100}, + {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, {id: "opening", name: "Opening", field: "opening", hidden: true, formatter: this.currency_formatter} ]; diff --git a/startup/report_data_map.py b/startup/report_data_map.py index 93995a9922..ba3b546b2c 100644 --- a/startup/report_data_map.py +++ b/startup/report_data_map.py @@ -87,7 +87,7 @@ data_map = { }, "Stock Ledger Entry": { "columns": ["name", "posting_date", "posting_time", "item_code", "warehouse", "actual_qty as qty", - "voucher_type", "voucher_no", "ifnull(incoming_rate,0) as incoming_rate"], + "voucher_type", "voucher_no", "ifnull(incoming_rate,0) as incoming_rate", "stock_uom"], "conditions": ["ifnull(is_cancelled, 'No')='No'"], "order_by": "posting_date, posting_time, name", "links": { diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js index fb607712c8..edad9a76a1 100644 --- a/stock/page/stock_ageing/stock_ageing.js +++ b/stock/page/stock_ageing/stock_ageing.js @@ -48,6 +48,11 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({ open_btn: true, doctype: '"Item"' }}, + {id: "item_name", name: "Item Name", field: "item_name", + width: 100, formatter: this.text_formatter}, + {id: "description", name: "Description", field: "description", + width: 200, formatter: this.text_formatter}, + {id: "brand", name: "Brand", field: "brand", width: 100}, {id: "average_age", name: "Average Age", field: "average_age", formatter: this.currency_formatter}, {id: "earliest", name: "Earliest", field: "earliest", @@ -55,11 +60,6 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({ {id: "latest", name: "Latest", field: "latest", formatter: this.currency_formatter}, {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "item_name", name: "Item Name", field: "item_name", - width: 100, formatter: this.text_formatter}, - {id: "description", name: "Description", field: "description", - width: 200, formatter: this.text_formatter}, ]; }, filters: [ diff --git a/stock/page/stock_balance/stock_balance.js b/stock/page/stock_balance/stock_balance.js index bec13372b3..dccf498a9e 100644 --- a/stock/page/stock_balance/stock_balance.js +++ b/stock/page/stock_balance/stock_balance.js @@ -42,7 +42,11 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({ this.columns = [ {id: "name", name: "Item", field: "name", width: 300, formatter: this.tree_formatter}, - + {id: "item_name", name: "Item Name", field: "item_name", width: 100}, + {id: "description", name: "Description", field: "description", width: 200, + formatter: this.text_formatter}, + {id: "brand", name: "Brand", field: "brand", width: 100}, + {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, {id: "opening_qty", name: "Opening Qty", field: "opening_qty", width: 100, formatter: this.currency_formatter}, {id: "inflow_qty", name: "In Qty", field: "inflow_qty", width: 100, @@ -60,11 +64,6 @@ erpnext.StockBalance = erpnext.StockAnalytics.extend({ formatter: this.currency_formatter}, {id: "closing_value", name: "Closing Value", field: "closing_value", width: 100, formatter: this.currency_formatter}, - {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "item_name", name: "Item Name", field: "item_name", width: 100}, - {id: "description", name: "Description", field: "description", width: 200, - formatter: this.text_formatter}, ]; }, diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js index 6d945bb5f2..9af8894761 100644 --- a/stock/page/stock_ledger/stock_ledger.js +++ b/stock/page/stock_ledger/stock_ledger.js @@ -52,9 +52,12 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ open_btn: true, doctype: '"Item"', }}, + {id: "description", name: "Description", field: "description", width: 200, + formatter: this.text_formatter}, {id: "warehouse", name: "Warehouse", field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, {id: "brand", name: "Brand", field: "brand", width: 100}, + {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, {id: "qty", name: "Qty", field: "qty", width: 100, formatter: this.currency_formatter}, {id: "balance", name: "Balance Qty", field: "balance", width: 100, @@ -69,8 +72,6 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ open_btn: true, doctype: "dataContext.voucher_type" }}, - {id: "description", name: "Description", field: "description", width: 200, - formatter: this.text_formatter}, ]; }, diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js index 3607b00fa4..75819a5f11 100644 --- a/stock/page/stock_level/stock_level.js +++ b/stock/page/stock_level/stock_level.js @@ -69,8 +69,15 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ open_btn: true, doctype: '"Item"', }}, + {id: "item_name", name: "Item Name", field: "item_name", width: 100, + formatter: this.text_formatter}, + {id: "description", name: "Description", field: "description", width: 200, + formatter: this.text_formatter}, + {id: "brand", name: "Brand", field: "brand", width: 100, + link_formatter: {filter_input: "brand"}}, {id: "warehouse", name: "Warehouse", field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, + {id: "uom", name: "UOM", field: "uom", width: 60}, {id: "actual_qty", name: "Actual Qty", field: "actual_qty", width: 80, formatter: this.currency_formatter}, {id: "planned_qty", name: "Planned Qty", @@ -87,13 +94,6 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ field: "re_order_level", width: 80, formatter: this.currency_formatter}, {id: "re_order_qty", name: "Re-Order Qty", field: "re_order_qty", width: 80, formatter: this.currency_formatter}, - {id: "uom", name: "UOM", field: "uom", width: 60}, - {id: "brand", name: "Brand", field: "brand", width: 100, - link_formatter: {filter_input: "brand"}}, - {id: "item_name", name: "Item Name", field: "item_name", width: 100, - formatter: this.text_formatter}, - {id: "description", name: "Description", field: "description", width: 200, - formatter: this.text_formatter}, ]; },