SELECT b.customer_code, b.customer_name, * FROM txn_invoice_history_header a INNER JOIN customer b ON a.customer_id = b.customer_id WHERE a.org_id ='goldcrest' AND customer_code = '301P/036' AND invoice_no='INJNM000370-240216' order by a.created_date desc ---------------------------------------------------------------------------------------------------------------------- --d0113352-f17f-40e5-9dab-fa98ae102ebc invoice id select * from txn_mobile_collection_invoice where col_id= 'e4353956-dfa8-4452-9309-ebc9d7ed4fbe' --select * from txn_mobile_collection_header where col_id in('e4353956-dfa8-4452-9309-ebc9d7ed4fbe','224702ac-4a6e-40e0-8d1d-5441408c177b', '0fac120e-37cf-4b47-959d-9065aec0908b') order by created_date desc -- CCJNM000337-240216 this collection was cancelled select * from txn_invoice_history_header where invoice_id= 'eb727e42-0027-4ad9-80d3-5a16bd84285c'; select * from txn_invoice_history_header where invoice_no= 'INJNM000370-240216'; select * from di_mobile_txn_collection_invoices where invoice_id = 'd0113352-f17f-40e5-9dab-fa98ae102ebc' --db134f71-058f-41b8-a1a5-7b6b07959d0d This collection is missing in the Actual table -- processid = db134f71-058f-41b8-a1a5-7b6b07959d0d select * from txn_mobile_collection_invoice where inv_id = 'd0113352-f17f-40e5-9dab-fa98ae102ebc'