The following lines contain the word 'select', 'insert', 'update' or 'delete':
'select decode( ''' || ret_type || ''',
''ENTERED'', sum(round(nvl(dist.amount_cr,(dist.amount_dr)*-1),2)),
''ACCTD'', sum(nvl(dist.acctd_amount_cr,(dist.acctd_amount_dr)*-1)))
from ar_distributions_all dist, gl_code_combinations glc
where dist.source_id = ' || adj_id ||
' and dist.source_Table = ''ADJ''
and dist.source_Type in ( ''ADJ'',
''TAX'',
''FINCHRG'',
''ADJ_NON_REC_TAX'',
''DEFERRED_TAX'',
''FINCHRG_NON_REC_TAX'')
and glc.code_combination_id = dist.code_combination_id
and glc.chart_of_accounts_id = ' || coa_id ||
' ' || co_seg_where;
l_stmt := 'select FA_RX_FLEX_PKG.GET_VALUE(101,''GL#'', ' || coa_id || ', ''GL_BALANCING'',dist.CODE_COMBINATION_ID), ' ||
' dist.code_Combination_id from ar_distributions_all dist, gl_code_combinations glc where dist.source_id = ' || adj_id ||
' and dist.source_Table = ''ADJ'' and dist.source_Type in ( ''ADJ'', ''TAX'', ''FINCHRG'', ''DEFERRED_TAX'', ' ||
' ''FINCHRG_NON_REC_TAX'') and glc.code_combination_id = dist.code_combination_id and glc.chart_of_accounts_id = ' ||
coa_id || ' ' || co_seg_where;
l_stmt := 'select adj.code_combination_id from ar_adjustments_all adj, gl_code_combinations glc ' ||
' where adj.adjustment_id = ' || adj_id ||
' and glc.code_combination_id = adj.code_combination_id ' ||
' and glc.chart_of_accounts_id = ' || coa_id || ' ' || co_seg_where;
select set_of_books_id
into var.books_id
from ar_system_parameters_all
where org_id = p_reporting_entity;
'arrx_adj.aradj_bind(:CURSOR_SELECT);',
select CHART_OF_ACCOUNTS_ID,CURRENCY_CODE,NAME
into var.chart_of_accounts_id,var.functional_currency_code,var.organization_name
from GL_SETS_OF_BOOKS
where SET_OF_BOOKS_ID = var.books_id;
acct_stmt := 'select distinct ACCOUNTING_METHOD FROM ar_system_parameters_all SYSPARAM where ACCOUNTING_METHOD is not null ' || L_SYSPARAM_ORG_WHERE ;
fa_rx_util_pkg.debug('ARTX_ASSIGN_SELECT_LIST');
-->>SELECT_START<<--
fa_rx_util_pkg.assign_column('10',NULL ,'ORGANIZATION_NAME' ,'arrx_adj.var.organization_name' ,'VARCHAR2',50);
OR (trx.trx_date < (select min(org1.effective_start_date) from
hz_organization_profiles org1 where org1.party_id = party.party_id)
AND (trunc(trx.creation_date) between NVL(org.effective_start_date,
trunc(trx.creation_date)) and NVL(org.effective_end_date, trunc(trx.creation_date))
OR (trunc(trx.creation_date) < (select min(org1.effective_start_date)
from hz_organization_profiles org1 where org1.party_id = party.party_id)
AND org.effective_end_date is NULL))))/*bug5968198*/ /*bug6674534*//*Bug7206486*/
and (trx.trx_date between NVL(per.effective_start_date, trx.trx_date)
and NVL(per.effective_end_date, trx.trx_date)
OR (trx.trx_date < (select min(per1.effective_start_date) from
hz_person_profiles per1 where per1.party_id = party.party_id)
AND (trunc(trx.creation_date) between NVL(per.effective_start_date,
trunc(trx.creation_date)) and NVL(per.effective_end_date, trunc(trx.creation_date))
OR (trunc(trx.creation_date) < (select min(per1.effective_start_date)
from hz_person_profiles per1 where per1.party_id = party.party_id)
AND per.effective_end_date is NULL)))) ' || /*bug5968198*/ /*bug6674534*/
CURRENCY_CODE_WHERE || ' ' ||
INVOICE_TYPE_WHERE || ' ' ||
DUE_DATE_WHERE || ' ' ||
TRX_DATE_WHERE || ' ' ||
ADJ_TYPE_WHERE || ' ' ||
GL_DATE_WHERE || ' ' ||
ADJ_ACCT_WHERE || ' ' ||
SEQ_NAME_WHERE || ' ' ||
SEQ_NUMBER_WHERE || ' ' ||
SHOW_BILL_WHERE || ' ' ||
L_CUST_ORG_WHERE || ' ' ||
L_PAY_ORG_WHERE || ' ' ||
L_ADJ_ORG_WHERE || ' ' ||
L_TRX_ORG_WHERE;
select meaning into l_Yes from AR_LOOKUPS
where lookup_type = 'YES/NO' and lookup_code = 'Y';
select meaning into l_No from AR_LOOKUPS
where lookup_type = 'YES/NO' and lookup_code = 'N';