Update accounts_payable.py
diff --git a/accounts/report/accounts_payable/accounts_payable.py b/accounts/report/accounts_payable/accounts_payable.py
index d9a0ca2..a618118 100644
--- a/accounts/report/accounts_payable/accounts_payable.py
+++ b/accounts/report/accounts_payable/accounts_payable.py
@@ -54,7 +54,7 @@
 				else:
 					ageing_based_on_date = gle.posting_date
 					
-				row += get_ageing_data(ageing_based_on_date, age_on, outstanding_amount)
+				row += get_ageing_data(age_on, ageing_based_on_date, outstanding_amount)
 				data.append(row)
 				
 	return columns, data
@@ -130,4 +130,4 @@
 		(gle.account, report_date, gle.voucher_type, gle.voucher_no, gle.name))[0][0]
 		
 	outstanding_amount = flt(gle.credit) - flt(gle.debit) - flt(payment_amount)
-	return outstanding_amount
\ No newline at end of file
+	return outstanding_amount