Merge branch '1310' of github.com:webnotes/erpnext into 1310
diff --git a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py
index 41c5f3e..0c2078b 100644
--- a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py
+++ b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.py
@@ -21,7 +21,7 @@
 			d.debit, d.credit, d.cheque_no, d.cheque_date, d.remark]
 			
 		if d.against_invoice:
-			row += get_ageing_data(against_invoice_date, d.posting_date, d.credit or -1*d.debit)
+			row += get_ageing_data(d.posting_date, against_invoice_date, d.credit or -1*d.debit)
 		else:
 			row += ["", "", "", "", ""]
 			
@@ -74,4 +74,4 @@
 	for t in webnotes.conn.sql("""select name, posting_date from `tabSales Invoice`"""):
 		si_posting_date_map[t[0]] = t[1]
 		
-	return si_posting_date_map
\ No newline at end of file
+	return si_posting_date_map
diff --git a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py
index 8d3618f..a7e79bf 100644
--- a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py
+++ b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.py
@@ -21,7 +21,7 @@
 			d.debit, d.credit, d.cheque_no, d.cheque_date, d.remark]
 			
 		if d.against_voucher:
-			row += get_ageing_data(against_voucher_date, d.posting_date, d.debit or -1*d.credit)
+			row += get_ageing_data(d.posting_date, against_voucher_date, d.debit or -1*d.credit)
 		else:
 			row += ["", "", "", "", ""]
 			
@@ -73,4 +73,4 @@
 	for t in webnotes.conn.sql("""select name, posting_date from `tabPurchase Invoice`"""):
 		pi_posting_date_map[t[0]] = t[1]
 		
-	return pi_posting_date_map
\ No newline at end of file
+	return pi_posting_date_map