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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_ORG_APP') CREATE INDEX IDX_AR_ORG_APP ON T_AR_BALANCE ( FORGID ,FSTOPDATE  DESC );


 EXEC P_ALTERPK 'PK_T_AR_JOURNAL', 'T_AR_JOURNAL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_JOU_ORG_DATE') CREATE INDEX IDX_AR_JOU_ORG_DATE ON T_AR_JOURNAL ( FORGID ,FBIZDATE );



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