/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
EXEC p_DropIdx 'IDX_AR_FIN_ORG', 'T_AR_FINARBILL';
 EXEC P_ALTERPK 'PK_T_AR_INVOICESTAFFCFG', 'T_AR_INVOICESTAFFCFG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_ISC_FSTATUS') CREATE INDEX IDX_AR_ISC_FSTATUS ON T_AR_INVOICESTAFFCFG ( FSTATUS );


 EXEC P_ALTERPK 'PK_T_AR_INVOICESTAFFCFG_L', 'T_AR_INVOICESTAFFCFG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_ISC_FID') CREATE INDEX IDX_AR_ISC_FID ON T_AR_INVOICESTAFFCFG_L ( FLOCALEID ,FID );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
