/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
-- ar_busbill
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_BUSBILL_FSRCFINBILLID') CREATE INDEX IDX_AR_BUSBILL_FSRCFINBILLID ON T_AR_BUSBILL ( FSRCFINBILLID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'PK_T_AR_BUSBILL_E') CREATE INDEX PK_T_AR_BUSBILL_E on t_AR_BUSBILL_E ( FID );
-- ar_finarbill
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_FINENTRY_E_FID') CREATE INDEX IDX_AR_FINENTRY_E_FID ON T_AR_FINARBILLENTRY_E ( FID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'PK_T_AR_FINARBILLENTRY') CREATE INDEX PK_T_AR_FINARBILLENTRY ON T_AR_FINARBILLENTRY_E(FENTRYID);
-- _tc
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_BUSBILL_TC_TBILL') CREATE INDEX IDX_AR_BUSBILL_TC_TBILL ON T_AR_BUSBILL_TC ( FTBillId );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_BUSBILL_TC_TID') CREATE INDEX IDX_AR_BUSBILL_TC_TID ON T_AR_BUSBILL_TC ( FTId );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_FINARBILL_TC_TBILL') CREATE INDEX IDX_AR_FINARBILL_TC_TBILL ON T_AR_FINARBILL_TC ( FTBillId );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_FINARBILL_TC_TID') CREATE INDEX IDX_AR_FINARBILL_TC_TID ON T_AR_FINARBILL_TC ( FTId );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_REVCFMBILL_TC_TBILL') CREATE INDEX IDX_AR_REVCFMBILL_TC_TBILL ON T_AR_REVCFMBILL_TC ( FTBillId );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_REVCFMBILL_TC_TID') CREATE INDEX IDX_AR_REVCFMBILL_TC_TID ON T_AR_REVCFMBILL_TC ( FTId );

-- _wb
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_REVCFMBILL_WB_FK') CREATE INDEX IDX_AR_REVCFMBILL_WB_FK ON T_AR_REVCFMBILL_WB ( FID );
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
