Professional Documents
Culture Documents
ae_header_id,
je.ae_line_num,
SUM(amount_dr - amount_cr) OVER(PARTITION BY je.account ORDER BY
je.ae_header_id, je.ae_line_num) AS running_total,
je.amount_dr,
je.amount_cr,
je.amount_dr - je.amount_cr AS line_net,
entered_dr,
entered_cr,
je.description,
je.currency_code,
je.PERIOD_NAME,
je.PERIOD_YEAR,
je.PERIOD_NUM,
je.QUARTER_NUM,
-- TO_CHAR(je.accounting_date, 'DD/Mon/RRRR') ACCOUNTING_DATE,
TO_CHAR(je.GL_TRANSFER_DATE, 'DD/Mon/RRRR') GL_TRANSFER_DATE,
je.code_combination_id,
company,
company_desc,
cost_center,
cost_center_desc,
account,
account_desc,
-- parent_acc,
Branch,
Branch_desc,
Channel,
Channel_desc,
LOB,
LOB_desc,
Product,
Product_desc,
Intercompany,
Intercompany_desc,
future_1,
future_2,
je.application_id,
je.entity_id,
je.entity_code,
je.source_id_int_1,
-- je.sub_trx_id,
-- je.sub_trx_number,
-- je.sub_third_part_id,
-- je.sub_third_part_name,
-- je.sub_third_part_num,
je.product_code,
je.je_category_name,
je.je_header_description,
TO_CHAR(je.accounting_date, 'DD/Mon/RRRR') AS accounting_date,
je.created_by,
POSTED_DATE,
Journal_Batch
cc.segment1 AS company,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
1,
cc.segment1) AS company_desc,
cc.segment2 AS cost_center,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
2,
cc.segment2) AS
cost_center_desc,
cc.segment3 AS account,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
3,
cc.segment3) AS account_desc,
cc.segment4 AS Branch,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
4,
cc.segment4) AS Branch_desc,
cc.segment5 AS Channel,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
5,
cc.segment5) AS Channel_desc,
cc.segment6 AS LOB,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
6,
cc.segment6) AS LOB_desc,
cc.segment7 AS Product,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
7,
cc.segment7) AS Product_desc,
cc.segment8 AS Intercompany,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
8,
cc.segment8) AS
Intercompany_desc,
cc.segment9 AS future_1,
cc.segment10 AS future_2,
je_headers.application_id,
ent.entity_id,
ent.entity_code,
ent.source_id_int_1,
trx.customer_trx_id,
TO_CHAR(trx.trx_number),
trx.bill_to_customer_id,
prt.party_name AS customer_name,
cust_acc.account_number AS customer_account_number,
app.product_code,
je_headers.je_category_name,
je_headers.description AS je_header_description,
je_headers.accounting_date,
trx.created_by,
(SELECT distinct gjh.POSTED_DATE
FROM gl_je_batches GLB,
gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
xla_ae_lines xlal,
xla_ae_headers xlah,
xla_events xlae,
xla_transaction_entities xlate
WHERE GLB.je_batch_id = gjh.je_batch_id
AND gjh.je_header_id = gjl.je_header_id
AND gjl.je_header_id = gir.je_header_id
AND gjl.je_line_num = gir.je_line_num
AND gir.gl_sl_link_table = xlal.gl_sl_link_table
AND gir.gl_sl_link_id = xlal.gl_sl_link_id
AND xlal.ae_header_id = xlah.ae_header_id
AND xlah.event_id = xlae.event_id
AND xlae.entity_id = xlate.entity_id
AND xlae.application_id = xlate.application_id
and xlal.ae_header_id = je_lines.ae_header_id
and xlal.gl_sl_link_id = je_lines.gl_sl_link_id
and xlal.gl_sl_link_table = je_lines.gl_sl_link_table)
POSTED_DATE,
cc.segment1 AS company,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
1,
cc.segment1) AS company_desc,
cc.segment2 AS cost_center,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
2,
cc.segment2) AS
cost_center_desc,
cc.segment3 AS account,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
3,
cc.segment3) AS account_desc,
-- parent_account.ancestor_pk1_value AS parent_acc,
cc.segment4 AS Branch,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
4,
cc.segment4) AS Branch_desc,
cc.segment5 AS Channel,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
5,
cc.segment5) AS Channel_desc,
cc.segment6 AS LOB,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
6,
cc.segment6) AS LOB_desc,
cc.segment7 AS Product,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
7,
cc.segment7) AS Product_desc,
cc.segment8 AS Intercompany,
gl_flexfields_pkg.get_description_sql(cc.chart_of_accounts_id,
8,
cc.segment8) AS
Intercompany_desc,
cc.segment9 AS future_1,
cc.segment10 AS future_2,
je_headers.application_id,
ent.entity_id,
ent.entity_code,
ent.source_id_int_1,
rec.cash_receipt_id,
TO_CHAR(rec.receipt_number),
rec.pay_from_customer,
prt.party_name AS customer_name,
cust_acc.account_number AS customer_account_number,
app.product_code,
je_headers.je_category_name,
je_headers.description AS je_header_description,
je_headers.accounting_date,
rec.created_by,
(SELECT distinct gjh.POSTED_DATE
FROM gl_je_batches GLB,
gl_je_headers gjh,
gl_je_lines gjl,
gl_import_references gir,
xla_ae_lines xlal,
xla_ae_headers xlah,
xla_events xlae,
xla_transaction_entities xlate
WHERE GLB.je_batch_id = gjh.je_batch_id
AND gjh.je_header_id = gjl.je_header_id
AND gjl.je_header_id = gir.je_header_id
AND gjl.je_line_num = gir.je_line_num
AND gir.gl_sl_link_table = xlal.gl_sl_link_table
AND gir.gl_sl_link_id = xlal.gl_sl_link_id
AND xlal.ae_header_id = xlah.ae_header_id
AND xlah.event_id = xlae.event_id
AND xlae.entity_id = xlate.entity_id
AND xlae.application_id = xlate.application_id
and xlal.ae_header_id = je_lines.ae_header_id
and xlal.gl_sl_link_id = je_lines.gl_sl_link_id
and xlal.gl_sl_link_table = je_lines.gl_sl_link_table)
POSTED_DATE,