created grid report, report dump and general ledger report
diff --git a/public/js/all-app.js b/public/js/all-app.js
index 49d299c..b5e6dda 100644
--- a/public/js/all-app.js
+++ b/public/js/all-app.js
@@ -400,7 +400,7 @@
  *	lib/js/core.js
  */
 if(!console){var console={log:function(txt){}}}
-window._version_number="820949d75a1ddbb59843ce9171e6c532b5f5e6650784839c2a66d84a";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
+window._version_number="d58703b2c2e2a5dd1294cd924eb13c57161cf583571b48248ed44bbc";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
 
 /*
  *	lib/js/legacy/globals.js
diff --git a/public/js/all-web.js b/public/js/all-web.js
index eea537a..96d1930 100644
--- a/public/js/all-web.js
+++ b/public/js/all-web.js
@@ -287,7 +287,7 @@
  *	lib/js/core.js
  */
 if(!console){var console={log:function(txt){}}}
-window._version_number="820949d75a1ddbb59843ce9171e6c532b5f5e6650784839c2a66d84a";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
+window._version_number="d58703b2c2e2a5dd1294cd924eb13c57161cf583571b48248ed44bbc";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
 
 /*
  *	lib/js/legacy/globals.js
diff --git a/public/js/report-legacy.js b/public/js/report-legacy.js
index 5a3b93f..acf91bc 100644
--- a/public/js/report-legacy.js
+++ b/public/js/report-legacy.js
@@ -171,10 +171,10 @@
 _r.DataTable.prototype.set_sort_option_disabled=function(label,disabled){var s=this.sort_sel;if(disabled){for(var i=0;i<s.options.length;i++){if(s.options[i]&&s.options[i].text==label){this.disabled_options[label]=s.options[i];s.remove(i);}}}else{if(this.disabled_options[label]){try{s.add(this.disabled_options[label],s.options[s.options.length-1]);}catch(e){try{s.add(this.disabled_options[label],s.options.length-1);}catch(e){}}
 this.disabled_options[label]=null;}}}
 _r.DataTable.prototype.add_sort_option=function(label,val){var s=this.sort_sel;s.options[s.options.length]=new Option(label,val,false,s.options.length==0?true:false);}
-_r.DataTable.prototype.update_query=function(no_limit){if((_r.rb_con.cur_rb&&_r.rb_con.cur_rb.get_query)||(this.search_criteria&&this.search_criteria.custom_query)){}else{if(!sel_val(this.sort_sel)){this.sort_sel.selectedIndex=0;}
+_r.DataTable.prototype.update_query=function(no_limit){if((_r.rb_con.cur_rb&&_r.rb_con.cur_rb.get_query)||(this.search_criteria&&this.search_criteria.custom_query)){}else{var me=this;var sort_by=null,sort_order="";if(sel_val(this.sort_sel)){sort_by=sel_val(this.sort_sel);sort_order=this.sort_order;}else if(_r.rb_con.cur_rb.sc.sort_by){sort_by=(_r.rb_con.cur_rb.sc.sort_by||"").split(",");sort_by=$.map(sort_by,function(v){return v.trim()+" "+(me.sort_order||"");}).join(", ");sort_order="";}else{this.sort_sel.selectedIndex=0;sort_by=sel_val(this.sort_sel);sort_order=this.sort_order;}
 this.query+=NEWLINE
-+' ORDER BY '+sel_val(this.sort_sel)
-+' '+this.sort_order;}
++' ORDER BY '+sort_by
++' '+sort_order;}
 if(no_limit||this.no_limit){if(this.show_query)alert(this.query);return;}
 this.query+=' LIMIT '+(this.start_rec-1)+','+this.page_len;if(this.show_query)
 alert(this.query);}