oracle-EBS-PL/sql AP GL总账付款凭证

oracle-EBS-PL/sql AP GL总账付款凭证

财务查询AP的付款明细,可以用此sql

oracleAP_Payments_GL_Voucher

oracleAP_Payments_GL_Voucher

代码如下:

select
ass.SEGMENT1 vendor_number,
ass.VENDOR_NAME,
gjb.name batchname,
gjh.NAME journalname,
gjh.DOC_SEQUENCE_VALUE glvoucherNumber,
ac.check_id,
TO_CHAR(ac.check_date,'yyyy-mm-dd') check_date,
ac.check_number,
ac.DOC_SEQUENCE_VALUE apvoucherNumber ,
gcc.segment1 ou_code,
gcc.segment3,
ac.amount,
nvl(xl.accounted_dr,0) accounted_dr,
nvl(xl.accounted_cr,0) accounted_cr,
xte.entity_code,
gir.je_header_id,
gjh.period_name,
xh.event_type_code
from xla.xla_ae_headers xh,
xla.xla_ae_lines xl,
xla.xla_transaction_entities xte,
gl.gl_code_combinations gcc,
ap.ap_checks_all ac,
gl.gl_import_references gir,
gl.gl_je_headers gjh,
gl.gl_je_batches gjb,
xla.xla_events xea,
ap_suppliers ass
where xh.ae_header_id = xl.ae_header_id
--and xte.entity_id = xh.entity_id
and ac.check_id = xte.Source_Id_Int_1(+)
and gir.gl_sl_link_id(+) = xl.gl_sl_link_id
and gir.je_header_id = gjh.je_header_id(+)
and xl.code_combination_id = gcc.code_combination_id
and gjh.je_batch_id = gjb.je_batch_id
And xte.Entity_Id = xea.Entity_Id(+)
And xte.Application_Id = xea.Application_Id(+)
And xea.Event_Id = xh.Event_Id (+)
And xea.Application_Id= xh.Application_Id (+)
--and xea.event_id = xh.event_id
and ass.vendor_id = ac.vendor_id
and xte.entity_code = 'AP_PAYMENTS'
and gjb.PARENT_JE_BATCH_ID is null
and TO_CHAR(ac.check_date,'yyyy-mm-dd') between '2020-03-30' and '2020-03-31'

 

 

----欢迎转载----
THE END
分享
二维码
< <上一篇
下一篇>>