首页 > Linux操作系统 > Linux操作系统 > 应交税额-进项税计算
包括手工发票和采购发票
select
gh.name,
gh.je_source,
ael.reference1,
aia.invoice_num,
ael.accounted_dr,
ael.accounted_cr
from
AP_AE_LINES_ALL ael,
GL_JE_LINES gjl,
AP_INVOICE_DISTRIBUTIONS_ALL ad,
AP_INVOICES_ALL aia,
gl_je_headers gh
where
ael.gl_sl_link_id=gjl.gl_sl_link_id
and ael.source_id=ad.invoice_distribution_id
and ad.invoice_id=aia.invoice_id
and gh.je_header_id=gjl.je_header_id
and gh.set_of_books_id=1
and gjl.code_combination_id in (1022,7950) and ael.code_combination_id in (1022,7950)
and gjl.period_name='03-2009'
union all
select
gh.je_source,
gh.name,
gh.description,
gjl.accounted_dr,
gjl.accounted_cr
from
GL_JE_LINES gjl,
gl_je_headers gh
where
gh.je_source='Manual'
and gh.je_header_id=gjl.je_header_id
and gh.set_of_books_id=1
and gjl.code_combination_id in (1022,7950)
and gjl.period_name='03-2009'
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/209689/viewspace-586907/ ,如需转载,请注明出处,否则将追究法律责任。