[% IF ( borrower.borrowernumber ) %] [% IF borrower.category_type == 'I' %] [% borrower.surname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% ELSE %] [% IF invert_name %] [% borrower.surname %], [% borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% ELSE %] [% borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% borrower.surname %] [% END %] [% END %] ([% borrower.cardnumber %]) [% ELSIF ( borrowernumber ) %] [% IF category_type == 'I' %] [% surname %] [% IF othernames %] ([% othernames %]) [% END %] [% ELSE %] [% IF invert_name %] [% surname %], [% firstname %] [% IF othernames %] ([% othernames %]) [% END %] [% ELSE %] [% firstname %] [% IF othernames %] ([% othernames %]) [% END %] [% surname %] [% END %] [% END %] ([% cardnumber %]) [% END %]