fixed MIFOSX-301 issues and added loan type and template type to loan

Hi Keith,

Added support to different template types and loan types for loan.

Regards
Ashok