Frontend URL : https://loantap.in/banking/reconcile-excess-accounts
Main Query :
/*Get excess_amount, lan_id, sublan_id where acccount is Loan Account Excess and sum(credit-debit) is greater than 0 */ SELECT loan_entries.ID as data_id, 'excess' as category, sum(credit-debit) as excess_amount, lan_id, sublan_id FROM loan_entries where account='Loan Account Excess' group by sublan_id having sum(credit-debit)>0
/*Get lapp_id*/ SELECT pquery.*,meta_value as lapp_id FROM [module.previous_query_no /] as pquery JOIN sublan ON pquery.sublan_id=sublan.object_id AND coll_id='sublan' AND meta_key='lapp_id'
Columns Used in UI :
Sublan_Id Column have action link: open transaction page in new window