Friday, 15 November 2019

oracle withholding tax query In r12 : Oracle Payables withholding tax query

Oracle withholding tax query In r12 : Oracle Payables r12 withholding tax query

In this post , We will be discuss about the withholding tax query in r12. This query will help to extract the oracle withholding tax information's for the Invoices. This sql query will give the details of the Payables Invoices with withholding tax information's. Here below please find below the details for the Oracle Payables r12 withholding tax query.
 
oracle withholding tax query In r12 : Oracle Payables withholding tax query
 
 

Details SQL query for Oracle withholding tax Information's

This below query helps to extract the Withholding tax rates which has applied for the Payables Invoices in Oracle apps r12.
 
SELECT DISTINCT
  awt.*
FROM
  ap_tax_codes_all atc,
  ap_awt_tax_rates_all awt
WHERE
  awt.tax_name  = atc.name
AND atc.tax_id IN
  (
    SELECT DISTINCT
      aid.tax_code_id
    FROM
      ap_invoice_distributions_all aid,
      ap_tax_codes_all atc
    WHERE
      aid.tax_code_id    = atc.tax_id
    AND aid.tax_code_id IS NOT NULL
    AND atc.tax_type     = 'AWT'
    AND aid.invoice_id   = :INVOICE_ID
  )
 
 This below Query helps to extract the With holding tax groups information's which has applied in the Payables Invoice distributions  and in the Invoice Headers itself.

SELECT DISTINCT
  awt.*
FROM
  ap_awt_groups awt
WHERE
  awt.group_id IN
  (
    SELECT DISTINCT
      aid.awt_group_id
    FROM
      ap_invoice_distributions_all aid
    WHERE
      aid.awt_group_id IS NOT NULL
    AND aid.invoice_id  = :INVOICE_ID
    UNION
    SELECT DISTINCT
      aid.pay_awt_group_id
    FROM
      ap_invoice_distributions_all aid
    WHERE
      aid.pay_awt_group_id IS NOT NULL
    AND aid.invoice_id      = :INVOICE_ID
    UNION
    SELECT DISTINCT
      ai.awt_group_id
    FROM
      ap_invoices_all ai
    WHERE
      ai.awt_group_id IS NOT NULL
    AND ai.invoice_id  = :INVOICE_ID
    UNION
    SELECT DISTINCT
      ai.pay_awt_group_id
    FROM
      ap_invoices_all ai
    WHERE
      ai.pay_awt_group_id IS NOT NULL
    AND ai.invoice_id      = :INVOICE_ID
  );
 
 

AWT Withholding Tax Information's in Oracle Payables in r12

select aia.INVOICE_NUM,awg.NAME,aida.LINE_TYPE_LOOKUP_CODE from ap_invoices_all aia, ap_awt_groups awg
 , ap_invoice_distributions_all aida
 where aia.INVOICE_ID = aida.INVOICE_ID
 and awg.GROUP_ID = aida.PAY_AWT_GROUP_ID
 and aida.ORG_ID =qq.org_id
 and aida.ORG_ID = :P_ORG_D_ID
 

2 comments:

12345 said...

Good blog thanks for sharing this informative article. It would be helpful full to all.
Oracle Fusion HCM Online Training

Anonymous said...

I like this article very much, if Anyone Reads Your Blog, Each And Every one will appreciate you.
Oracle Fusion Financials Online Training

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *