/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_FIND_SOURCEBILLID') CREATE INDEX IDX_AR_FIND_SOURCEBILLID ON T_AR_FINARBILLENTRY ( FSRCID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_BUSBILLENTRY_SRCBILLID') CREATE INDEX IDX_AR_BUSBILLENTRY_SRCBILLID ON T_AR_BUSBILLENTRY ( FSRCBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_FIN_ASSTACT') CREATE INDEX IDX_AR_FIN_ASSTACT ON T_AR_FINARBILL ( FASSTACTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_FIN_SOURCEBILLID') CREATE INDEX IDX_AR_FIN_SOURCEBILLID ON T_AR_FINARBILL ( FSOURCEBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_JOU_ASSTACT') CREATE INDEX IDX_AR_JOU_ASSTACT ON T_AR_JOURNAL ( FASSTACTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_BUSBILL_ASSTACT') CREATE INDEX IDX_AR_BUSBILL_ASSTACT ON T_AR_BUSBILL ( FASSTACTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_BUSBILL_SOURCEBILLID') CREATE INDEX IDX_AR_BUSBILL_SOURCEBILLID ON T_AR_BUSBILL ( FSOURCEBILLID );

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