---Extract Query of GST Tax Type Account
SELECT jtt.regime_code,jtt.regime_name, jtt.tax_type_code "Tax Type Code",jtt.tax_type_name "Tax Type",
jtt.effective_from "Start Date", jtt.effective_to "End Date",
led.name ledger_name,
hou1.name org_name,
hou.name organization_name,
hl.description location_name
/*jta.TAX_ACCOUNT_ID,
jta.TAX_ACCOUNT_ENTITY_CODE,
jta.TAX_ACCOUNT_ENTITY_ID,
jta.ORGANIZATION_TYPE,
jta.Org_Id,
jta.ORGANIZATION_ID,
jta.LOCATION_ID,*/
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.INTERIM_RECOVERY_CCID)"Interim Recovery Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.RECOVERY_CCID)"Recovery Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.INTERIM_LIABILITY_CCID)"Interim Liability Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.LIABILITY_CCID)"Liability Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.EXPENSE_CCID) "Expense Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.ROUNDING_CCID)"Rounding Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.SUSPENSE_CCID)"Suspense Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.ADVRCPT_SUSPENSE_CCID) "Advanced Suspense Account"
,(Select CONCATENATED_SEGMENTS from gl_code_combinations_kfv Where CODE_COMBINATION_ID=jta.ISO_SUSPENSE_CCID) "ISO Suspense Account"
FROM jai_tax_accounts jta,
hr_all_organization_units hou,
hr_all_organization_units hou1,
hr_locations hl,
gl_ledgers led
,jai_tax_types_v jtt
WHERE jta.organization_id = hou.organization_id(+)
AND jta.location_id = hl.location_id(+)
AND jta.ledger_id = led.LEDGER_ID(+)
AND jta.org_id = hou1.organization_id(+)
AND jta.ledger_id = 2041 ---Parameter pass Leger ID
AND jta.tax_account_entity_id = jtt.tax_type_id
ORDER BY jtt.tax_type_code;