From 7fcb3c9865be43131e02c4a338a75979b47e39f9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 21 Jul 2014 17:51:14 +0530 Subject: [PATCH 1/3] [minor] Item query - search by description --- erpnext/controllers/queries.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 2650c66ac2..4a30eed652 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -167,7 +167,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): where tabItem.docstatus < 2 and (tabItem.end_of_life > %(today)s or ifnull(tabItem.end_of_life, '0000-00-00')='0000-00-00') and (tabItem.`{key}` LIKE %(txt)s - or tabItem.item_name LIKE %(txt)s) + or tabItem.item_name LIKE %(txt)s + or tabItem.description LIKE %(txt)s) {fcond} {mcond} order by if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999), From 4c5d7617fbccae85f2522acf248a91923ed44b5c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 21 Jul 2014 18:02:22 +0530 Subject: [PATCH 2/3] [minor] Update if missing, source and target warehouse in stock entry detail table, when they are specified in the form --- .../stock/doctype/stock_entry/stock_entry.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 7274ece1fa..dfcf07f506 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -230,6 +230,36 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ if(!row.t_warehouse) row.t_warehouse = this.frm.doc.to_warehouse; }, + source_mandatory: ["Material Issue", "Material Transfer", "Purchase Return"], + target_mandatory: ["Material Receipt", "Material Transfer", "Sales Return"], + + from_warehouse: function(doc) { + var me = this; + this.set_warehouse_if_missing("s_warehouse", doc.from_warehouse, function(row) { + return me.source_mandatory.indexOf(me.frm.doc.purpose)!==-1; + }); + }, + + to_warehouse: function(doc) { + var me = this; + this.set_warehouse_if_missing("t_warehouse", doc.to_warehouse, function(row) { + return me.target_mandatory.indexOf(me.frm.doc.purpose)!==-1; + }); + }, + + set_warehouse_if_missing: function(fieldname, value, condition) { + for (var i=0, l=(this.frm.doc.mtn_details || []).length; i Date: Mon, 21 Jul 2014 18:13:05 +0530 Subject: [PATCH 3/3] [fix] Show against account in General Ledger Print Format --- erpnext/accounts/report/general_ledger/general_ledger.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index 190d45555a..0fc02b16d0 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -27,7 +27,7 @@ {%= data[i].voucher_type%}
{%= data[i].voucher_no %} {%= data[i].account %} -
{%= __("Against") %}: {%= data[i].account %} +
{%= __("Against") %}: {%= data[i].against_account %}
{%= __("Remarks") %}: {%= data[i].remarks %} {%= format_currency(data[i].debit) %} {%= format_currency(data[i].credit) %}