Hi RolandP,
The condition in the function checks that if the project type is say 'Divya' the project code generated is 'DI-XXXX'.
XXXX is again autogenerated.
This id is stored in out of the box attribute Investment ID.
Please let me know for any further details.