Added js,py and txt files related to Lease Agreement and its reports
diff --git a/accounts/Module Def/Accounts/Accounts.txt b/accounts/Module Def/Accounts/Accounts.txt
index 35e7e5d..512b460 100644
--- a/accounts/Module Def/Accounts/Accounts.txt
+++ b/accounts/Module Def/Accounts/Accounts.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-09-25 10:50:34',
 		'docstatus': 0,
-		'modified': '2011-07-27 11:43:40',
+		'modified': '2011-07-28 12:01:10',
 		'modified_by': 'Administrator',
 		'owner': 'Administrator'
 	},
@@ -358,7 +358,7 @@
 	# Module Def Item
 	{
 		'display_name': 'Lease Agreement List',
-		'doc_name': 'Lease Agreement List',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 33
@@ -367,7 +367,7 @@
 	# Module Def Item
 	{
 		'display_name': 'Lease Monthly Future Installment Inflows',
-		'doc_name': 'Lease Monthly Future Installment Inflows',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 34
@@ -376,7 +376,7 @@
 	# Module Def Item
 	{
 		'display_name': 'Lease Overdue Age Wise',
-		'doc_name': 'Lease Overdue Age Wise',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 35
@@ -385,7 +385,7 @@
 	# Module Def Item
 	{
 		'display_name': 'Lease Overdue List',
-		'doc_name': 'Lease Overdue List',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 36
@@ -394,7 +394,7 @@
 	# Module Def Item
 	{
 		'display_name': 'Lease Receipts Client Wise',
-		'doc_name': 'Lease Receipts Client Wise',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 37
@@ -402,8 +402,8 @@
 
 	# Module Def Item
 	{
-		'display_name': 'Lease Receipt Summary Year to Date',
-		'doc_name': 'Lease Receipt Summary Year to Date',
+		'display_name': 'Lease Receipt Summary Month Wise',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 38
@@ -412,7 +412,7 @@
 	# Module Def Item
 	{
 		'display_name': 'Lease Yearly Future Installment Inflows',
-		'doc_name': 'Lease Yearly Future Installment Inflows',
+		'doc_name': 'GL Entry',
 		'doc_type': 'Reports',
 		'doctype': 'Module Def Item',
 		'idx': 39
diff --git a/accounts/doctype/lease_agreement/lease_agreement.js b/accounts/doctype/lease_agreement/lease_agreement.js
index 8c681a1..83e8500 100644
--- a/accounts/doctype/lease_agreement/lease_agreement.js
+++ b/accounts/doctype/lease_agreement/lease_agreement.js
@@ -1,5 +1,17 @@
 $.extend(cur_frm.cscript, {
-	Generate: function(doc, dt, dn) {
+	Generate: function(doc, dt, dn) {msgprint(doc);
+		if(doc.installment_amount==''){
+			msgprint('Set Installment Amount before generating schedule');
+			return;
+		}
+		if(doc.no_of_installments==''){
+			msgprint('Set Number of Installments before generating schedule');
+			return;
+		}
+		if(doc.start_date==''){
+			msgprint('Set Start Date before generating schedule');
+			return;
+		}
 		cur_frm.cscript.clear_installments(doc);
 		tot=0;i=0;
 		while(tot<flt(doc.invoice_amount)-flt(doc.down_payment)){
diff --git a/accounts/doctype/lease_agreement/lease_agreement.txt b/accounts/doctype/lease_agreement/lease_agreement.txt
index 1d35a10..c221020 100644
--- a/accounts/doctype/lease_agreement/lease_agreement.txt
+++ b/accounts/doctype/lease_agreement/lease_agreement.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2011-07-22 17:47:57',
 		'docstatus': 0,
-		'modified': '2011-07-27 12:54:48',
+		'modified': '2011-07-27 15:33:55',
 		'modified_by': 'Administrator',
 		'owner': 'Administrator'
 	},
@@ -19,7 +19,7 @@
 		'name': '__common__',
 		'section_style': 'Simple',
 		'show_in_menu': 0,
-		'version': 20
+		'version': 21
 	},
 
 	# These values are common for all DocField
@@ -114,7 +114,7 @@
 		'fieldname': 'account',
 		'fieldtype': 'Link',
 		'idx': 3,
-		'label': 'Account',
+		'label': 'Lessee Account',
 		'options': 'Account',
 		'permlevel': 0,
 		'reqd': 1
diff --git a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
new file mode 100644
index 0000000..4cb3d2b
--- /dev/null
+++ b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
@@ -0,0 +1,11 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=sys_defaults.year_start_date;
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
new file mode 100644
index 0000000..e749d1b
--- /dev/null
+++ b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
@@ -0,0 +1,13 @@
+data =[
+		['Agreement No.','Data','100px',''],
+		['Lessee Name','Data','300px',''],
+		['Amount','Currency','120px','']
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.sql b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.sql
new file mode 100644
index 0000000..6097b2f
--- /dev/null
+++ b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.sql
@@ -0,0 +1,3 @@
+select la.name, la.account, la.invoice_amount
+from `tabLease Agreement` la
+where start_date between '%(date)s' and '%(date1)s' order by la.name
diff --git a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt
index 77e4633..c57f059 100644
--- a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt
+++ b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2011-07-26 17:01:34',
 		'docstatus': 0,
-		'modified': '2011-07-26 18:25:54',
+		'modified': '2011-07-28 11:18:26',
 		'modified_by': 'Administrator',
 		'owner': 'Administrator'
 	},
diff --git a/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
new file mode 100644
index 0000000..2d89611
--- /dev/null
+++ b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
@@ -0,0 +1,14 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date());
+//	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1;
+
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
new file mode 100644
index 0000000..8e5b8ad
--- /dev/null
+++ b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
@@ -0,0 +1,13 @@
+data =[
+		['Month','Data','100px',''],
+		['Year','Data','100px',''],
+		['Amount','Currency','120px','']
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.sql b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.sql
new file mode 100644
index 0000000..564a3fd
--- /dev/null
+++ b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.sql
@@ -0,0 +1,9 @@
+select date_format(due_date,'%M') as mnt,year(due_date),sum(amount)
+
+from `tabLease Agreement` la,`tabLease Installment` lai
+
+where la.name=lai.parent and (lai.cheque_date is null or lai.cheque_date > '%(date)s')
+
+group by date_format(due_date,'%M-%Y')
+
+order by year(due_date),month(due_date)
\ No newline at end of file
diff --git a/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
new file mode 100644
index 0000000..2d89611
--- /dev/null
+++ b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
@@ -0,0 +1,14 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date());
+//	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1;
+
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
new file mode 100644
index 0000000..869d46a
--- /dev/null
+++ b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
@@ -0,0 +1,14 @@
+data =[
+		['Agreement No.','Data','100px',''],
+		['Lessee Name','Data','300px',''],
+		['Amount','Currency','120px',''],
+		['Age','Data','100px','']
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql
new file mode 100644
index 0000000..1789f7e
--- /dev/null
+++ b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql
@@ -0,0 +1,7 @@
+select la.name,la.account,lai.amount,cast('%(date)s' as date)-due_date as age
+
+from `tabLease Agreement` la,`tabLease Installment` lai
+
+where la.name=lai.parent and lai.due_date<cast('%(date)s' as date) and (lai.cheque_date is null or lai.cheque_date > cast('%(date)s' as date))
+
+order by cast('%(date)s' as date)-due_date desc
\ No newline at end of file
diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
new file mode 100644
index 0000000..2d89611
--- /dev/null
+++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
@@ -0,0 +1,14 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date());
+//	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1;
+
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
new file mode 100644
index 0000000..5e16489
--- /dev/null
+++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
@@ -0,0 +1,16 @@
+data =[
+		['Lessee Name','Data','300px',''],
+		['Below 30 Days','Currency','120px',''],
+		['Below 90 Days','Currency','120px',''],
+		['Below 180 Days','Currency','120px',''],
+		['Below 360 Days','Currency','120px',''],
+		['Above 360 Days','Currency','120px',''],
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql
new file mode 100644
index 0000000..2e6912e
--- /dev/null
+++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql
@@ -0,0 +1,9 @@
+select account,sum(od_30)as od_30,sum(od_90)as od_90,sum(od_180)as od_180,sum(od_360)as od_360,sum(od_1yr)as od_1yr from
+(
+	select account,case when age<=30 then amount end as od_30,case when age between 31 and 90 then amount end as od_90,case when age between 91 and 180 then amount end as od_180,case when age between 181 and 360 then amount end as od_360,case when age>360 then amount end as od_1yr from
+	(
+		select la.account,lai.amount,cast('%(date)s' as date)-due_date as age
+		from `tabLease Agreement` la,`tabLease Installment` lai
+		where la.name=lai.parent and lai.due_date<'%(date)s' and (lai.cheque_date is null or lai.cheque_date > '%(date)s')
+	)a
+)b group by account order by account
diff --git a/accounts/search_criteria/lease_receipt_summary_year_to_date/__init__.py b/accounts/search_criteria/lease_receipt_summary_month_wise/__init__.py
similarity index 100%
rename from accounts/search_criteria/lease_receipt_summary_year_to_date/__init__.py
rename to accounts/search_criteria/lease_receipt_summary_month_wise/__init__.py
diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
new file mode 100644
index 0000000..4cb3d2b
--- /dev/null
+++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
@@ -0,0 +1,11 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=sys_defaults.year_start_date;
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
new file mode 100644
index 0000000..8e5b8ad
--- /dev/null
+++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
@@ -0,0 +1,13 @@
+data =[
+		['Month','Data','100px',''],
+		['Year','Data','100px',''],
+		['Amount','Currency','120px','']
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql
new file mode 100644
index 0000000..cdd48b8
--- /dev/null
+++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql
@@ -0,0 +1,5 @@
+SELECT date_format(gl.posting_date,'%M'),year(gl.posting_date),sum(gl.credit) as amount
+FROM `tabGL Entry` gl, `tabAccount` a
+WHERE gl.account=a.name and a.master_type='Customer' and gl.credit>0 and gl.posting_date between '%(date)s' and '%(date1)s'
+GROUP BY month(gl.posting_date),year(gl.posting_date)
+ORDER BY year(gl.posting_date),month(gl.posting_date)
diff --git a/accounts/search_criteria/lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt
similarity index 69%
rename from accounts/search_criteria/lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt
rename to accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt
index 04f16bb..f63462f 100644
--- a/accounts/search_criteria/lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt
+++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt
@@ -1,11 +1,11 @@
-# Search Criteria, lease_receipt_summary_year_to_date
+# Search Criteria, lease_receipt_summary_month_wise
 [
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2011-07-26 18:06:32',
+		'creation': '2011-07-27 18:48:29',
 		'docstatus': 0,
-		'modified': '2011-07-26 18:27:43',
+		'modified': '2011-07-28 09:59:51',
 		'modified_by': 'Administrator',
 		'owner': 'Administrator'
 	},
@@ -13,21 +13,18 @@
 	# These values are common for all Search Criteria
 	{
 		'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company',
-		'criteria_name': 'Lease Receipt Summary (Year to date)',
+		'criteria_name': 'Lease Receipt Summary Month Wise',
 		'doc_type': 'GL Entry',
 		'doctype': 'Search Criteria',
 		'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}",
 		'module': 'Accounts',
 		'name': '__common__',
-		'page_len': 50,
-		'sort_by': '`tabGL Entry`.`company`',
-		'sort_order': 'DESC',
 		'standard': 'Yes'
 	},
 
-	# Search Criteria, lease_receipt_summary_year_to_date
+	# Search Criteria, lease_receipt_summary_month_wise
 	{
 		'doctype': 'Search Criteria',
-		'name': 'lease_receipt_summary_year_to_date'
+		'name': 'lease_receipt_summary_month_wise'
 	}
 ]
\ No newline at end of file
diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
new file mode 100644
index 0000000..4cb3d2b
--- /dev/null
+++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
@@ -0,0 +1,11 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=sys_defaults.year_start_date;
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
new file mode 100644
index 0000000..b84ff9f
--- /dev/null
+++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
@@ -0,0 +1,12 @@
+data =[
+		['Lessee Name','Data','300px',''],
+		['Amount','Currency','120px','']
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
new file mode 100644
index 0000000..f951388
--- /dev/null
+++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
@@ -0,0 +1,5 @@
+SELECT gl.account,sum(gl.credit) as amount
+FROM `tabGL Entry` gl, `tabAccount` a
+WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s'
+GROUP BY gl.account
+ORDER BY posting_date
diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt
index 69795df..25c15c2 100644
--- a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt
+++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2011-07-26 18:12:22',
+		'creation': '2011-07-28 12:13:41',
 		'docstatus': 0,
-		'modified': '2011-07-26 18:27:18',
+		'modified': '2011-07-28 12:16:13',
 		'modified_by': 'Administrator',
 		'owner': 'Administrator'
 	},
@@ -13,12 +13,13 @@
 	# These values are common for all Search Criteria
 	{
 		'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company',
-		'criteria_name': 'Lease Receipts Client wise',
+		'criteria_name': 'Lease Receipts Client Wise',
 		'doc_type': 'GL Entry',
 		'doctype': 'Search Criteria',
 		'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}",
 		'module': 'Accounts',
 		'name': '__common__',
+		'page_len': 50,
 		'standard': 'Yes'
 	},
 
diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
new file mode 100644
index 0000000..2d89611
--- /dev/null
+++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
@@ -0,0 +1,14 @@
+report.customize_filters = function() {
+	this.hide_all_filters();
+
+	this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1});
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date());
+//	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date());
+
+	this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1;
+
+}
+
+$dh(this.mytabs.tabs['More Filters']);
+$dh(this.mytabs.tabs['Select Columns']);
diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
new file mode 100644
index 0000000..0163ba6
--- /dev/null
+++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
@@ -0,0 +1,12 @@
+data =[
+		['Year','Data','100px',''],
+		['Amount','Currency','120px','']
+	]
+
+for d in data:
+	colnames.append(d[0])
+	coltypes.append(d[1])
+	colwidths.append(d[2])
+	coloptions.append(d[3])
+	col_idx[d[0]] = len(colnames)-1
+
diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql
new file mode 100644
index 0000000..ec6c816
--- /dev/null
+++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql
@@ -0,0 +1,9 @@
+select year(date_sub(due_date,interval 6 MONTH)) as yr,sum(amount)
+
+from `tabLease Agreement` la,`tabLease Installment` lai
+
+where la.name=lai.parent and (lai.cheque_date is null or lai.cheque_date > '%(date)s')
+
+group by year(date_sub(due_date,interval 6 MONTH))
+
+order by yr
\ No newline at end of file