/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_AR_GLIMPORTBILL', 'T_AR_GLIMPORTBILL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_GLIMPTBILL_ORG_ACCOUNT') CREATE INDEX IDX_AR_GLIMPTBILL_ORG_ACCOUNT ON T_AR_GLIMPORTBILL ( FORGID ,FACCOUNTID );


 EXEC P_ALTERPK 'PK_T_AR_GLIMPORTSCHEME', 'T_AR_GLIMPORTSCHEME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_GLIMPT_NUMBER') CREATE INDEX IDX_AR_GLIMPT_NUMBER ON T_AR_GLIMPORTSCHEME ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_AR_GLIMPORTSCHEMEENTRY', 'T_AR_GLIMPORTSCHEMEENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_GLIMPTENTRY_ID') CREATE INDEX IDX_AR_GLIMPTENTRY_ID ON T_AR_GLIMPORTSCHEMEENTRY ( FID );


 EXEC P_ALTERPK 'PK_T_AR_GLIMPORTSCHEME_L', 'T_AR_GLIMPORTSCHEME_L', 'FPKID', '1';

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



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