SELECT cm.trx_number ,fnd_flex_ext.get_segs('SQLGL', 'GL#', gcc.chart_of_accounts_id, ad.code_combination_id) account_number ,ra.gl_date ,ct.trx_number applied_trx_number ,ad.acctd_amount_dr ,ad.acctd_amount_cr FROM ar_distributions_all ad ,ar_receiv…