Description: New Record Group for Tax category
Level: Form
Enabled: checked
Trigger Event: WHEN-NEW-FORM-INSTANCE
Processing Mode: Not in Enter-Query Mode
Click on Actions and enter the following.
Seq: 10
Type:Builtin
Language: all
Builtin type: Create Record Group from Query
Argument: Paste your new SQL statement here. In this case it would be
SELECT tax_category_name,
tax_category_desc,
tax_category_id
FROM jai_tax_categories jtc
WHERE org_id = :HEADER.org_id
AND ( CASE
WHEN Substr(Get_gstin_no_po_fp(:HEADER.trx_id,
:HEADER.org_id), 1, 2) <>
Substr(
Get_gstin_no_po_tp(:HEADER.trx_id,
:HEADER.org_id), 1, 2)
AND ( Instr(tax_category_name, 'EXPORT')
+ Instr(tax_category_name, 'INTER_STATE')
+ Instr(tax_category_name, 'IMPORT') > 0 ) THEN 1
WHEN Substr(Get_gstin_no_po_fp(:HEADER.trx_id,
:HEADER.org_id), 1, 2) =
Substr
(
Get_gstin_no_po_tp(:HEADER.trx_id,
:HEADER.org_id), 1, 2)
AND ( Instr(tax_category_name, 'WITHIN_STATE')
+ Instr(tax_category_name, 'DOMESTIC') > 0 ) THEN 1
WHEN ( Instr(tax_category_name, 'EXPORT')
+ Instr(tax_category_name, 'INTER_STATE')
+ Instr(tax_category_name, 'IMPORT')
+ Instr(tax_category_name, 'WITHIN_STATE')
+ Instr(tax_category_name, 'DOMESTIC') = 0 ) THEN 1
ELSE 0
END ) = 1
AND Trunc(SYSDATE) BETWEEN Trunc(effective_from) AND Trunc(
Nvl(effective_to, SYSDATE + 1))
AND NOT EXISTS (SELECT 'TDS Rate Exists in Category'
FROM jai_tax_category_lines jtcl,
jai_regimes jr,
jai_tax_types jtt
WHERE jtcl.tax_category_id = jtc.tax_category_id
AND jtcl.regime_id = jr.regime_id
AND jtcl.tax_type_id = jtt.tax_type_id
AND jr.regime_type = 'W'
AND Nvl(jtt.wthld_trx_applicable_flag, 'N') = 'Y')
ORDER BY tax_category_name
Group Name: TEST_GROUP
Now, for below Tax Category LOV, will create a new Personalization:
Now Create New Record with below information
Seq:10
Type: Property
Language: All
Enabled: Checked
Object Type: LOV
Target Object: TAX_CATEGORIES
Property Name: GROUP_NAME
Value: TEST_GROUP
Same for below Tax Category LOV :
Save it.
Click Validate
Click Apply Now.
Go to tools Menu >> click Validate All
Once it is successfully validated you are ready to go.
Click ok and close personalization form.
Close your Transactions form completely.
Open it again and Query the same record as before.
Check for the change in the LOV.