164: BEGIN
165: SELECT NVL( ln_commitment_bal, 0) - (NVL(SUM( ARA.AMOUNT),0) * -1)
166: INTO ln_invoice_bal
167: FROM ra_customer_trx RCT
168: ,ra_cust_trx_line_gl_dist_all RCTD
169: ,ra_cust_trx_types_all RCTT
170: ,hz_cust_accounts HCA
171: ,hz_parties HZP
172: ,gl_code_combinations GCC