Thursday, 19 November 2015

Query AR Invoice Details with Tax in India Locallization

SELECT   jat.trx_number, jatl.line_number trx_line_number, jattl.tax_line_no,
         jatl.line_amount, ax.tax_type, ax.tax_name,
         SUM (jattl.tax_amount) tax_amount
    FROM jai_ar_trxs jat,
         jai_ar_trx_lines jatl,
         jai_ar_trx_tax_lines jattl,
         jai_cmn_taxes_all ax
   WHERE jat.customer_trx_id = jatl.customer_trx_id
     AND jattl.link_to_cust_trx_line_id = jatl.customer_trx_line_id
     AND ax.tax_id = jattl.tax_id
     AND jattl.tax_amount <> 0
     AND jat.complete_flag = 'Y'
     --AND trx_number = '100025'
     AND TRUNC (jat.creation_date) BETWEEN '01-AUG-2015' AND '30-SEP-2015'
GROUP BY jat.trx_number,
         jatl.line_number,
         jattl.tax_line_no,
         jatl.line_amount,
         ax.tax_type,
         ax.tax_name;

No comments:

Post a Comment