Thursday 25 November 2021

Query to get PO tax amount against po header id (zx_lines join with po) in oracle fusion

 SELECT 

       sum(((nvl(zl.taxable_amt,0) *nvl(zl.tax_rate,0))/100) )tax_amount

  FROM zx_lines              zl,

       po_line_locations_all pll,

       po_lines_all          pl,

       po_headers_all        ph

 WHERE     zl.trx_id = pll.po_header_id

       AND zl.trx_line_id = pll.line_location_id

       AND zl.entity_code = 'PURCHASE_ORDER'

       AND pl.po_header_id = pll.po_header_id

       AND pl.po_line_id = pll.po_line_id

       AND pl.po_header_id = ph.po_header_id

       AND ph.po_header_id = 300000003243945 --po_headers_all.po_header_id

       order by pl.po_line_id

No comments:

Post a Comment

Query to get Business unit (ORGANIZATION_ID) Detail in oracle Fusion

  SELECT HAO.ORGANIZATION_ID AS BUSINESS_UNIT_ID,         HAOT.NAME,         HAO.BUSINESS_GROUP_ID,         HAO.EFFECTIVE_START_DATE,       ...