zoukankan      html  css  js  c++  java
  • Account Inquiry (总账与子账的关联 Payables Purchase Invoices)

    select aia.invoice_num,
           aila.line_number,
           aia.invoice_id,
           pha.segment1 po_number,
           pv.vendor_name,
           pv.segment1 supplier_num,
           pha.currency_code,
           pla.line_num,
           plla.shipment_num,
           pla.item_description,
           pla.unit_price,
           plla.quantity,
           plla.quantity_received,
           plla.quantity_billed,
           rt.transaction_type,
           rt.transaction_date
    --,AIDA.*
      from gl.gl_je_headers                h,
           gl.gl_je_lines                  l,
           gl.gl_code_combinations         gcc,
           gl.gl_import_references         gir,
           apps.xla_ae_lines               xal,
           xla.xla_distribution_links      xdl,
           ap.ap_invoice_distributions_all aida,
           ap.ap_invoices_all              aia,
           ap.ap_invoice_lines_all         aila,
           po.rcv_transactions             rt,
           po.po_headers_all               pha,
           po.po_lines_all                 pla,
           po.po_line_locations_all        plla,
           po.po_distributions_all         pda,
           apps.po_vendors                 pv
     where h.je_header_id = l.je_header_id
       and l.code_combination_id = gcc.code_combination_id
       and gcc.segment1 = '02'
          --and gcc.segment2 in ('21200101', '21200201')
       and gcc.segment2 = '000000'
       and l.je_header_id = gir.je_header_id
       and l.je_line_num = gir.je_line_num
       and gir.gl_sl_link_id = xal.gl_sl_link_id
       and xal.ae_header_id = xdl.ae_header_id
       and xal.ae_line_num = xdl.ae_line_num
       and xdl.source_distribution_id_num_1 = aida.invoice_distribution_id
       and aida.invoice_id = aia.invoice_id
       and aida.po_distribution_id = aila.po_distribution_id
       and aia.invoice_id = aila.invoice_id
       and aida.po_distribution_id = pda.po_distribution_id
       and aida.rcv_transaction_id = rt.transaction_id
       and pda.po_header_id = pha.po_header_id
       and pda.po_header_id = pla.po_header_id
       and pda.po_line_id = pla.po_line_id
       and pha.po_header_id = pla.po_header_id
       and pla.po_header_id = plla.po_header_id
       and pla.po_line_id = plla.po_line_id
       and pda.line_location_id = plla.line_location_id
       and pha.vendor_id = pv.vendor_id
       and h.ledger_id = 2021 --UTSC
       and h.je_source = 'Payables'
       and h.je_category = 'Purchase Invoices'
       and h.status = 'P'
       and h.period_name in ('2010-11', '2010-10')

             

                成长

           /      |     \

        学习   总结   分享

    QQ交流群:122230156

  • 相关阅读:
    最近面试有感,不要耍小聪明,面试官都是开了上帝视角的
    Mac OS X上编写 ASP.NET vNext 系列中断和再开声明
    Mac OS X 上编写 ASP.NET vNext (二) IDE配置
    Mac OS X上编写 ASP.NET vNext(一)KRE环境搭建
    Redhat Linux /etc/profile 与 /etc/bashrc 的区别
    IIS7 Application Pool Integrate Mode 和 Classic Mode 的区别
    Linux 学习笔记(一) 入门
    SQL Server 常用分页SQL
    winform 如何控制输入法
    winform 记录全局异常捕获
  • 原文地址:https://www.cnblogs.com/benio/p/1923157.html
Copyright © 2011-2022 走看看