Tuesday, 6 September 2016

Indian Localization Tax Summary Query of oracle Apps R12.2.5

Query:-

SELECT SUM(DECODE(jtc.TAX_TYPE,'Excise',jrpt.TAX_AMOUNT,0)) EXCISE_AMT
             ,SUM(DECODE(JTC.TAX_TYPE,'Other Excise',jrpt.TAX_AMOUNT,0)) EDU_CESS
             ,SUM(DECODE(JTC.TAX_TYPE,'Addl. Excise',jrpt.TAX_AMOUNT,0)) ADDL_EXCISE
             ,SUM(DECODE(JTC.TAX_TYPE,'SERVICE-EC',jrpt.TAX_AMOUNT,0)) EDU_CESS_SER_EC
             ,SUM(DECODE(JTC.TAX_TYPE,'CST',jrpt.TAX_AMOUNT,0)) CST
             ,SUM(DECODE(JTC.TAX_TYPE,'Freight',jrpt.TAX_AMOUNT,0)) FREIGHT
             ,(SUM(DECODE(JTC.TAX_TYPE,'Freight',jrpt.TAX_AMOUNT,0)))+ (SUM(DECODE(JTC.TAX_TYPE,'Insurance',jrpt.TAX_AMOUNT,0))) FREIGHT
             ,SUM(DECODE(JTC.TAX_NAME,'VAT 4 % On Purchase',jrpt.TAX_AMOUNT,0)) + SUM(DECODE(JTC.TAX_NAME,'VAT Addi. 1 % On Purchase',jrpt.TAX_AMOUNT,0)) LST
             ,SUM(DECODE(JTC.TAX_TYPE,'Service',jrpt.TAX_AMOUNT,0)) SERVICE
             ,SUM(DECODE(JTC.TAX_NAME,'ADHOC TOLL TAX',jrpt.TAX_AMOUNT,0)) AD_TOLL    
         ,SUUM(DECODE(JTC.TAX_NAME,'Less TOLL TAX',jrpt.TAX_AMOUNT,0)) LESS_TOLL  
--        into :cp_excise1,
--             :cp_edu_cess1,
--             :cp_addl_excise1,
--             :cp_edu_cess_Ser1,
--             :cp_cst1,
--             :cp_frt1,
--             :cp_lst1,
--             :cp_Service1,
--             :cp_ad_toll1,
--         :cp_less_toll1
        FROM  --ja_in_ap_tax_distributions jrpt,
                  JAI_AP_MATCH_INV_TAXES jrpt,
             --ja_in_tax_codes         jtc
             JAI_CMN_TAXES_ALL jtc
        where jrpt.tax_id  = jtc.tax_id
        and   jrpt.invoice_id = 413189 --:invoice_id2; --413261  --
       -- and   jrpt.po_distribution_id =787878 --:po_distribution_id1; -- 787879; --

       SELECT * FROM JAI_CMN_TAXES_ALL
       WHERE TAX_TYPE LIKE  '%VAT%'

No comments:

Post a Comment

Script to update salespersons customer site wise in oracle apps R12

SELECT * FROM HZ_PARTIES WHERE PARTY_NAME LIKE 'DEENA VISION%'; SELECT * FROM HZ_CUST_ACCOUNTS_ALL WHERE PARTY_ID =94043 ; SE...