index function added to erp controller