diff --git a/erpnext/stock/search_criteria/stock_ledger/__init__.py b/erpnext/stock/search_criteria/stock_ledger/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js new file mode 100644 index 00000000000..a47806fada8 --- /dev/null +++ b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js @@ -0,0 +1,20 @@ +// ERPNext - web based ERP (http://erpnext.com) +// Copyright (C) 2012 Web Notes Technologies Pvt Ltd +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +report.customize_filters = function() { + this.add_filter({fieldname:'item_name', label:'Item Name', fieldtype:'Data', options:'', parent:'Item'}); + this.add_filter({fieldname:'description', label:'Description', fieldtype:'Small Text', options: '', parent:'Item'}); +} \ No newline at end of file diff --git a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt new file mode 100644 index 00000000000..b80578ef0c9 --- /dev/null +++ b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt @@ -0,0 +1,36 @@ +# Search Criteria, stock_ledger +[ + + # These values are common in all dictionaries + { + 'creation': '2012-09-13 15:18:44', + 'docstatus': 0, + 'modified': '2012-09-13 15:38:45', + 'modified_by': u'Administrator', + 'owner': u'Administrator' + }, + + # These values are common for all Search Criteria + { + 'add_col': u'`tabItem`.`item_name`\n`tabItem`.`description`', + 'add_cond': u'`tabItem`.`name` = `tabStock Ledger Entry`.`item_code`', + 'add_tab': u'`tabItem`', + 'columns': u'Stock Ledger Entry\x01Item Code,Stock Ledger Entry\x01Warehouse,Stock Ledger Entry\x01Posting Date,Stock Ledger Entry\x01Posting Time,Stock Ledger Entry\x01Actual Quantity,Stock Ledger Entry\x01Bin Actual Qty After Transaction,Stock Ledger Entry\x01Voucher Type,Stock Ledger Entry\x01Voucher No', + 'criteria_name': u'Stock Ledger', + 'doc_type': u'Stock Ledger Entry', + 'doctype': 'Search Criteria', + 'filters': u'{"Stock Ledger Entry\\u0001Warehouse Type":[""],"Stock Ledger Entry\\u0001Company":[""],"Stock Ledger Entry\\u0001Is Cancelled":[""],"Stock Ledger Entry\\u0001Is Stock Entry":[""]}', + 'module': u'Stock', + 'name': '__common__', + 'page_len': 50, + 'sort_by': u'`tabStock Ledger Entry`.`posting_date`, `tabStock Ledger Entry`.`posting_time`, `tabStock Ledger Entry`.`name`', + 'sort_order': u'ASC', + 'standard': u'Yes' + }, + + # Search Criteria, stock_ledger + { + 'doctype': 'Search Criteria', + 'name': u'stock_ledger' + } +] \ No newline at end of file diff --git a/public/js/all-app.js b/public/js/all-app.js index f5531ed25fb..69ebde00207 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -394,8 +394,8 @@ if(r.exc){r.exc=JSON.parse(r.exc);if(r.exc instanceof Array){$.each(r.exc,functi if(r.docs){LocalDB.sync(r.docs);}} wn.request.call=function(opts){wn.request.prepare(opts);var ajax_args={url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success&&opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});show_alert('Unable to complete request: '+textStatus) opts.error&&opts.error(xhr)}};if(opts.progress_bar){var interval=null;$.extend(ajax_args,{xhr:function(){var xhr=jQuery.ajaxSettings.xhr();interval=setInterval(function(){if(xhr.readyState>2){var total=parseInt(xhr.getResponseHeader('Content-length'));var completed=parseInt(xhr.responseText.length);var percent=(100.0/total*completed).toFixed(2) -opts.progress_bar.css('width',(percent<10?10:percent)+'%');console.log(percent);}},50);return xhr;},complete:function(){clearInterval(interval);}})} -console.log(ajax_args);$.ajax(ajax_args);} +opts.progress_bar.css('width',(percent<10?10:percent)+'%');}},50);return xhr;},complete:function(){clearInterval(interval);}})} +$.ajax(ajax_args);} wn.call=function(opts){var args=$.extend({},opts.args) if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;} for(key in args){if(args[key]&&typeof args[key]!='string'){args[key]=JSON.stringify(args[key]);}} diff --git a/public/js/all-web.js b/public/js/all-web.js index 0102c83a93a..cba60d930bc 100644 --- a/public/js/all-web.js +++ b/public/js/all-web.js @@ -281,8 +281,8 @@ if(r.exc){r.exc=JSON.parse(r.exc);if(r.exc instanceof Array){$.each(r.exc,functi if(r.docs){LocalDB.sync(r.docs);}} wn.request.call=function(opts){wn.request.prepare(opts);var ajax_args={url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success&&opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});show_alert('Unable to complete request: '+textStatus) opts.error&&opts.error(xhr)}};if(opts.progress_bar){var interval=null;$.extend(ajax_args,{xhr:function(){var xhr=jQuery.ajaxSettings.xhr();interval=setInterval(function(){if(xhr.readyState>2){var total=parseInt(xhr.getResponseHeader('Content-length'));var completed=parseInt(xhr.responseText.length);var percent=(100.0/total*completed).toFixed(2) -opts.progress_bar.css('width',(percent<10?10:percent)+'%');console.log(percent);}},50);return xhr;},complete:function(){clearInterval(interval);}})} -console.log(ajax_args);$.ajax(ajax_args);} +opts.progress_bar.css('width',(percent<10?10:percent)+'%');}},50);return xhr;},complete:function(){clearInterval(interval);}})} +$.ajax(ajax_args);} wn.call=function(opts){var args=$.extend({},opts.args) if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;} for(key in args){if(args[key]&&typeof args[key]!='string'){args[key]=JSON.stringify(args[key]);}}